138 lines
2.5 KiB
C++
138 lines
2.5 KiB
C++
#ifndef USER_CLASS_H
|
|
#define USER_CLASS_H
|
|
#include "base.h"
|
|
#include "enum.h"
|
|
#include "ida_sdk.h"
|
|
#include <string>
|
|
|
|
template<typename R, typename A, typename ... ARG> R CallT(A call_addr, const ARG ... arguments)
|
|
{
|
|
if (!call_addr)
|
|
{
|
|
return R();
|
|
}
|
|
const auto control = reinterpret_cast<R(*)(ARG...)>(call_addr);
|
|
try
|
|
{
|
|
return control(arguments ...);
|
|
}
|
|
catch (...)
|
|
{
|
|
|
|
}
|
|
return R();
|
|
}
|
|
|
|
|
|
class CAccountCargo;
|
|
class DB_UpdateAvatarJewelSlot;
|
|
class CInventory;
|
|
class CStackableItem;
|
|
class Inven_Item;
|
|
class CItem;
|
|
class CUserCharacInfo;
|
|
class CUser;
|
|
class PacketBuf;
|
|
class PacketGuard;
|
|
class InterfacePacketBuf;
|
|
class Dispatcher_ModItemAttr;
|
|
|
|
|
|
|
|
|
|
#pragma pack(push, 0x01)
|
|
|
|
class DNFFLib
|
|
{
|
|
public:
|
|
static int ConvertGBKtoUTF8(char* a2, char* a3)
|
|
{
|
|
return CallT<int>(base::DNFFLib::ConvertGBKtoUTF8, a2, a3);
|
|
}
|
|
|
|
static int ConvertUTF8toGBK(char* a2, char* a3)
|
|
{
|
|
return CallT<int>(base::DNFFLib::ConvertUTF8toGBK, a2, a3);
|
|
}
|
|
|
|
|
|
};
|
|
|
|
namespace WongWork
|
|
{
|
|
|
|
class CAvatarItemMgr
|
|
{
|
|
public:
|
|
//获取时装插槽数据
|
|
int getJewelSocketData(WongWork::CAvatarItemMgr* a2)
|
|
{
|
|
typedef int (*__func)(WongWork::CAvatarItemMgr* a1, void* a2);
|
|
return ((__func)base::WongWork::CAvatarItemMgr::getJewelSocketData)(this, a2);
|
|
}
|
|
};
|
|
|
|
class CHackAnalyzer
|
|
{
|
|
public:
|
|
int addServerHackCnt(CUserCharacInfo* a2, int a3, int a4, int a5, int a6)
|
|
{
|
|
typedef int (*__func)(WongWork::CHackAnalyzer* a1, CUserCharacInfo* a2, int a3, int a4, int a5, int a6);
|
|
|
|
return CallT<int>(base::WongWork::CHackAnalyzer::addServerHackCnt, this, a2, a3, a4, a5, a6);
|
|
return ((__func)base::WongWork::CHackAnalyzer::addServerHackCnt)(this, a2, a3, a4, a5, a6);
|
|
}
|
|
};
|
|
}
|
|
|
|
class CSecu_ProtectionField
|
|
{
|
|
public:
|
|
|
|
static CSecu_ProtectionField* Get()
|
|
{
|
|
return (CSecu_ProtectionField*)(*(int*)base::GlobalData::s_pSecuProtectionField);
|
|
}
|
|
|
|
int Check(CUser* a2, int a3)
|
|
{
|
|
return CallT<int>(base::CSecu_ProtectionField::Check, this, a2, a3);
|
|
}
|
|
|
|
};
|
|
|
|
class cUserHistoryLog
|
|
{
|
|
public:
|
|
|
|
};
|
|
|
|
class AvatarRechargeServer
|
|
{
|
|
public:
|
|
|
|
static AvatarRechargeServer* Get()
|
|
{
|
|
return CallT<AvatarRechargeServer*>(base::AvatarRechargeServer::Get);
|
|
}
|
|
|
|
char SendDurability(CUser* a2, char a3, short a4, char a5, int a6)
|
|
{
|
|
return CallT<char>(base::AvatarRechargeServer::SendDurability, this, a2, a3, a4, a5, a6);
|
|
}
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
#include "User.h"
|
|
#include "AccountCargo.h"
|
|
#include "Item.h"
|
|
#include "DataManager.h"
|
|
#include "Inventory.h"
|
|
#include "PacketBuf.h"
|
|
#include "SystemTime.h"
|
|
|
|
|
|
#endif // __DXFBASE_H__
|