Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion include
Submodule include deleted from 887bbf
24 changes: 24 additions & 0 deletions include/API/Common/Common.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef COMMON___HPP
#define COMMON___HPP

#include "API/Language.hpp"
#include "SDK.h"
#include <string_view>

#define NAME_GET Common::NounSingular
#define NAME_SET Common::NounSingularSet

#define DESC_GET Common::Description
#define DESC_SET Common::DescriptionSet

class Common
{
public:
static std::string NounSingular(LANG lang, std::string_view identifier);
static void NounSingularSet(LANG lang, std::string_view identifier, FString value);

static std::string Description(LANG lang, std::string_view identifier);
static void DescriptionSet(LANG lang, std::string_view identifier, FString value);
};

#endif // !COMMON___HPP
33 changes: 33 additions & 0 deletions include/API/Common/CommonElementAttrParam.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef COMMONELEMENTATTRPARAM_HPP
#define COMMONELEMENTATTRPARAM_HPP

#include "API/GameObjectProxy.hpp"
#include "SDK.h"

class CommonElementAttrParam : public GameObjectProxy<FGDStCommon_ElementAttrParam>
{
public:
CommonElementAttrParam(FGDStCommon_ElementAttrParam& data) :
GameObjectProxy(data)
{};

int32_t GetFire() { return this->_object.fire; };
void SetFire(int32_t value) { this->_object.fire = value; }

int32_t GetWater() { return this->_object.water; };
void SetWater(int32_t value) { this->_object.water = value; }

int32_t GetWind() { return this->_object.wind; };
void SetWind(int32_t value) { this->_object.wind = value; }

int32_t GetEarth() { return this->_object.earth; };
void SetEarth(int32_t value) { this->_object.earth = value; }

int32_t GetShine() { return this->_object.shine; };
void SetShine(int32_t value) { this->_object.shine = value; }

int32_t GetDark() { return this->_object.dark; };
void SetDark(int32_t value) { this->_object.dark = value; }
};

#endif // !COMMONELEMENTATTRPARAM
34 changes: 34 additions & 0 deletions include/API/Common/CommonItemEffectParam.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#if !defined(COMMONITEMEFFECTPARAM_HPP)
#define COMMONITEMEFFECTPARAM_HPP

#include "API/GameObjectProxy.hpp"
#include "SDK.h"
#include <cstdint>
#include "API/Language.hpp"

class CommonItemEffectParam : public GameObjectProxy<FGDStCommon_ItemEffParam>
{
public:
CommonItemEffectParam(FGDStCommon_ItemEffParam& data) : GameObjectProxy(data){};

void SetStrength(int16_t value) { this->_object.val = value; }
int16_t GetStrength() { return this->_object.val; }

void SetTime(int16_t value) { this->_object.Time = value; }
int16_t GetTime() { return this->_object.Time; }

void SetIsRange(bool value) { this->_object.isRange = value; }
bool GetIsRange() { return this->_object.isRange; }

void SetEffect(EItemEffectType value){ this->_object.itemEffectType = static_cast<char>(value); }
EItemEffectType GetEffect() { return static_cast<EItemEffectType>(this->_object.itemEffectType); }

protected:
std::string getDescIdentifier() const { return this->_object.effDescId.ToString(); }

public:
std::string GetDescription(LANG lang);

};

#endif // COMMONITEMEFFECTPARAM_HPP
21 changes: 21 additions & 0 deletions include/API/Common/CommonItemTableSetting.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef COMMONITEMTABLESETTING_HPP
#define COMMONITEMTABLESETTING_HPP

#include "API/GameObjectProxy.hpp"
#include "API/Table/ItemTableDetail.hpp"
#include "Export.h"

class ML_API CommonItemTableSetting : public GameObjectProxy<FGDCommonItemTableSetting>
{
public:
CommonItemTableSetting(FGDCommonItemTableSetting& data) : GameObjectProxy(data)
{};

std::string GetIdentifier() const { return this->_object.tableId.ToString(); };

ItemTableDetail GetData(int index);
void SetData(int index, ItemTableDetail value);
void AddData(ItemTableDetail value);
};

#endif // !
27 changes: 27 additions & 0 deletions include/API/Common/CommonPickParamData.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef COMMONPICKPARAMDATA_HPP
#define COMMONPICKPARAMDATA_HPP

#include "CommonPickParamDataPickParam.hpp"
#include "CommonPickStatusParam.hpp"
#include <string>
#include "Export.h"

class ML_API CommonPickParamData : GameObjectProxy<FGDCommonPickParamData>
{
public:
CommonPickParamData(FGDCommonPickParamData& data) :
GameObjectProxy(data)
{};

std::string GetIdentifier() const { return this->_object.ID.ToString(); };
std::string GetGotIdentifier() const { return this->_object.gotId.ToString(); };
CommonPickStatusParam GetPickParamMin() { return CommonPickStatusParam(this->_object.pickParamMin); }
CommonPickStatusParam GetPickParamMax() { return CommonPickStatusParam(this->_object.pickParamMax); }
CommonPickParamDataPickParam GetPickInfo() { return CommonPickParamDataPickParam(this->_object.commonPickInfo); }

bool GetIsBoss() { return this->_object.isBoss; }
void SetIsBoss(bool value) { this->_object.isBoss = value; }

};

#endif // !COMMONPICKPARAMDATA_HPP
26 changes: 26 additions & 0 deletions include/API/Common/CommonPickParamDataPickParam.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef COMMONPICKPARAMDATAPICKPARAM
#define COMMONPICKPARAMDATAPICKPARAM

#include "API/GameObjectProxy.hpp"
#include "SDK.h"

class CommonPickParamDataPickParam : public GameObjectProxy<FGDCommonPickParamData_CommonPickParam>
{
public:
CommonPickParamDataPickParam(FGDCommonPickParamData_CommonPickParam& data) : GameObjectProxy(data){};

float GetRadius() { return this->_object.Radius; }
void SetRadius(float value) { this->_object.Radius = value; }

bool GetIsChangeSweetSpot() { return this->_object.isChangeSweetSpot; }
void SetIsChangeSweetSpot(bool value) { this->_object.isChangeSweetSpot = value; }

float GetWalkAroundSpeed() { return this->_object.walkAroundSpeed; }
void SetWalkAroundSpeed(float value) { this->_object.walkAroundSpeed = value; }

float GetHitEffPosRate() { return this->_object.hitEffPosRate; }
void SetHitEffPosRate(float value) { this->_object.hitEffPosRate = value; }

};

#endif // !COMMONPICKPARAMDATAPICKPARAM
29 changes: 29 additions & 0 deletions include/API/Common/CommonPickStatusParam.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef COMMONPICKSTAATUSPARAM_HPP
#define COMMONPICKSTAATUSPARAM_HPP

#include "API/GameObjectProxy.hpp"
#include "SDK.h"
#include "Export.h"

class ML_API CommonPickStatusParam : public GameObjectProxy<FGDStCommon_PickStatusParam>
{
public:
CommonPickStatusParam(FGDStCommon_PickStatusParam& data) : GameObjectProxy(data) {};

int32_t GetHP() { return this->_object.hp; }
void SetHP(int32_t value) { this->_object.hp = value; }

int32_t GetOffense() { return this->_object.offense; }
void SetOffense(int32_t value) { this->_object.offense = value; }

int32_t GetDefense() { return this->_object.defense; }
void SetDefense(int32_t value) { this->_object.defense = value; }

int32_t GetCritEvasion() { return this->_object.criticalRateEvasion; }
void SetCritEvasion(int32_t value) { this->_object.criticalRateEvasion = value; }

uint32_t GetExperience() { return this->_object.Exp; }
void SetExperience(uint32_t value) { this->_object.Exp = value; }
};

#endif // !COMMONPICKSTAATUSPARAM_HPP
41 changes: 41 additions & 0 deletions include/API/Common/CommonPriceInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#ifndef COMMONPRICEINFO_HPP
#define COMMONPRICEINFO_HPP

#include "API/GameObjectProxy.hpp"
#include "SDK.h"

class CommonPriceInfo : public GameObjectProxy<FGDStCommon_PriceInfo>
{
public:
CommonPriceInfo(FGDStCommon_PriceInfo& data) : GameObjectProxy(data)
{ };

int32_t GetBuyRich(int index) { return this->_object.priceBuyRichList.Data[index]; }
void SetBuyRich(int index, int32_t value) { this->_object.priceBuyRichList.Data[index] = value; }

int32_t GetSellRich(int index) { return this->_object.priceSellRichList.Data[index]; }
void SetSellRich(int index, int32_t value) { this->_object.priceSellRichList.Data[index] = value; }

int32_t GetBuySparkle(int index) { return this->_object.priceBuySparkleList.Data[index]; }
void SetBuySparkle(int index, int32_t value) { this->_object.priceBuySparkleList.Data[index] = value; }

int32_t GetBuyTourCoin(int index) { return this->_object.priceBuyTourCoinList.Data[index]; }
void SetBuyTourCoin(int index, int32_t value) { this->_object.priceBuyTourCoinList.Data[index] = value; }

int32_t GetGoddessSeed(int index) { return this->_object.priceBuyGoddessSeedList.Data[index]; }
void SetGoddessSeed(int index, int32_t value) { this->_object.priceBuyGoddessSeedList.Data[index] = value; }

int32_t GetShineGoddessSeed(int index) { return this->_object.priceBuyShineGoddessSeedList.Data[index]; }
void SetShineGoddessSeed(int index, int32_t value) { this->_object.priceBuyShineGoddessSeedList.Data[index] = value;}

int32_t GetRainbowGoddessSeed(int index) { return this->_object.priceBuyRainbowGoddessSeedList.Data[index]; }
void SetRainbowGoddessSeed(int index, int32_t value) { this->_object.priceBuyRainbowGoddessSeedList.Data[index] = value; }

int32_t GetTradeRebuildStone(int index) { return this->_object.priceTradeRebuildStoneList.Data[index]; }
void SetTradeRebuildStone(int index, int32_t value) { this->_object.priceTradeRebuildStoneList.Data[index] = value; }

int32_t GetBuyChestnut(int index) { return this->_object.priceBuyChestnut.Data[index]; }
void SetBuyChestnut(int index, int32_t value) { this->_object.priceBuyChestnut.Data[index] = value; }
};

#endif // !COMMONPRICEINFO_HPP
17 changes: 17 additions & 0 deletions include/API/Common/CommonSkillParam.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef COMMONSKILLPARAM_HPP
#define COMMONSKILLPARAM_HPP

#include "API/GameObjectProxy.hpp"
#include "SDK.h"

class CommonSkillParam : public GameObjectProxy<FGDStCommon_SkillParam>
{
public:
CommonSkillParam(FGDStCommon_SkillParam& data) : GameObjectProxy(data)
{};

FGDAuto GetParam(int index) { return this->getObject().prm[index]; }
void SetParam(int index, FGDAuto param) { this->getObject().prm[index] = param; }
};

#endif // !COMMONSKILLPARAM_HPP
44 changes: 44 additions & 0 deletions include/API/Engine/FName.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#ifndef FNAME_HPP
#define FNAME_HPP

#include "API/Function/Engine/FName/FnameToString.hpp"
#include "API/Function/Engine/FName/FNameCTor.hpp"
#include <string>
#include <string_view>

class FName
{
public:
uint32_t ComparisonIndex;
uint32_t Number;

FName(std::string_view value)
{
FNameCTor::call(reinterpret_cast<FName*>(this), static_cast<int>(value.size()), value.data(), 1);
}

FName(const FName& fname)
{
this->ComparisonIndex = fname.ComparisonIndex;
this->Number = fname.Number;
}

inline std::string ToString()
{
FString str;
FNameToString::call(this, &str);
return str.ToString();
}

bool operator==(const FName &o) const
{
return (ComparisonIndex == o.ComparisonIndex);
}

bool operator!=(const FName &o) const
{
return !(*this == o);
}
};

#endif // !FNAME_HPP
45 changes: 45 additions & 0 deletions include/API/Engine/FString.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#ifndef FSTRING_HPP
#define FSTRING_HPP

#include "TArray.hpp"
#include <cstdint>
#include <locale>

class FString : public TArray<wchar_t>
{
public:
inline FString() {};

FString(const wchar_t* other)
{
Max = Count = *other ? static_cast<int32_t>(std::wcslen(other)) + 1 : 0;

if (Count)
{
Data = const_cast<wchar_t*>(other);
}
};

inline bool IsValid() const
{
return Data != nullptr;
}

inline const wchar_t* c_str() const
{
return Data;
}

std::string ToString() const
{
const auto length = std::wcslen(Data);

std::string str(length, '\0');

std::use_facet<std::ctype<wchar_t>>(std::locale()).narrow(Data, Data + length, '?', &str[0]);

return str;
}
};

#endif //! FSTRING_HPP
Loading