新增商城奖励系统
This commit is contained in:
99
src/sdk/DBMgr.h
Normal file
99
src/sdk/DBMgr.h
Normal file
@@ -0,0 +1,99 @@
|
||||
#pragma once
|
||||
#ifndef __DBMGR_H__
|
||||
#define __DBMGR_H__
|
||||
|
||||
|
||||
class DBMgr
|
||||
{
|
||||
public:
|
||||
unsigned char UnknownData_NULL[0x38];
|
||||
|
||||
public:
|
||||
|
||||
static DBMgr* G_CDBMgr()
|
||||
{
|
||||
return *(DBMgr**)base::GlobalData::s_db_mgr;
|
||||
}
|
||||
|
||||
int setUserIdx(int a2)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::setUserIdx, this, a2);
|
||||
}
|
||||
|
||||
int activateGlobalDB()
|
||||
{
|
||||
return CallT<int>(base::DBMgr::activateGlobalDB, this);
|
||||
}
|
||||
|
||||
DBMgr()
|
||||
{
|
||||
CallT<int>(base::DBMgr::DBMgr_make, this);
|
||||
}
|
||||
|
||||
~DBMgr()
|
||||
{
|
||||
CallT<int>(base::DBMgr::DBMgr_destroy, this);
|
||||
}
|
||||
|
||||
int Open(int a2, char* a3, char* a4, char* a5, char* a6, int a7)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::Open, this, a2, a3, a4, a5, a6, a7);
|
||||
}
|
||||
|
||||
int Open_2(int a2, char* a3, uint a4, char* a5, char* a6, char* a7, int a8)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::Open_2, this, a2, a3, a4, a5, a6, a7, a8);
|
||||
}
|
||||
|
||||
int Close()
|
||||
{
|
||||
return CallT<int>(base::DBMgr::Close, this);
|
||||
}
|
||||
|
||||
int Close_2(int a2)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::Close_2, this, a2);
|
||||
}
|
||||
|
||||
int GetServerType(int a2)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::GetServerType, this, a2);
|
||||
}
|
||||
|
||||
int addUserDBInfo(int a2, int* a3)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::addUserDBInfo, this, a2, a3);
|
||||
}
|
||||
|
||||
int removeUserDBInfo(int a2)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::removeUserDBInfo, this, a2);
|
||||
}
|
||||
|
||||
int GetDBHandleServerGroup(int a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::GetDBHandleServerGroup, this, a2, a3);
|
||||
}
|
||||
|
||||
int SetQueryCounterPointer(int* a2) //CQueryCounter*
|
||||
{
|
||||
return CallT<int>(base::DBMgr::SetQueryCounterPointer, this, a2);
|
||||
}
|
||||
|
||||
int GetDBHandle(int a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::DBMgr::GetDBHandle, this, a2, a3);
|
||||
}
|
||||
|
||||
int isActiveGlobalDB()
|
||||
{
|
||||
return CallT<int>(base::DBMgr::isActiveGlobalDB, this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __DBMGR_H__
|
||||
|
||||
17
src/sdk/MySQL.h
Normal file
17
src/sdk/MySQL.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "stdarg.h"
|
||||
#ifndef __MYSQL_H__
|
||||
#define __MYSQL_H__
|
||||
|
||||
|
||||
class MySQL
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __MYSQL_H__
|
||||
|
||||
71
src/sdk/ShutdowManager.h
Normal file
71
src/sdk/ShutdowManager.h
Normal file
@@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
#ifndef __SHUTDOWMANAGER_H__
|
||||
#define __SHUTDOWMANAGER_H__
|
||||
|
||||
|
||||
class CShutdowManager
|
||||
{
|
||||
public:
|
||||
|
||||
static CShutdowManager* G_CShutdowManager()
|
||||
{
|
||||
return CallT<CShutdowManager*>(base::CShutdowManager::GetInstanceShutdowManager);
|
||||
}
|
||||
|
||||
CShutdowManager()
|
||||
{
|
||||
CallT<int>(base::CShutdowManager::CShutdowManager_make, this);
|
||||
}
|
||||
|
||||
int EnableShutdown(bool a2)
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::EnableShutdown, this, a2);
|
||||
}
|
||||
|
||||
int GetLastMsgCount()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::GetLastMsgCount, this);
|
||||
}
|
||||
|
||||
int GetLastMsgResponseCount()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::GetLastMsgResponseCount, this);
|
||||
}
|
||||
|
||||
int IncrementLastMsgResponseCount()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::IncrementLastMsgResponseCount, this);
|
||||
}
|
||||
|
||||
int OnAllUserLogout()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::OnAllUserLogout, this);
|
||||
}
|
||||
|
||||
int Reset()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::Reset, this);
|
||||
}
|
||||
|
||||
int SendLastMsgDBQueue(CUser* a2)
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::SendLastMsgDBQueue, this, a2);
|
||||
}
|
||||
|
||||
int SendShutdownSignal()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::SendShutdownSignal, this);
|
||||
}
|
||||
|
||||
int WaitUntilExitThread()
|
||||
{
|
||||
return CallT<int>(base::CShutdowManager::WaitUntilExitThread, this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __SHUTDOWMANAGER_H__
|
||||
|
||||
@@ -9,7 +9,7 @@ class CSystemTime
|
||||
public:
|
||||
static CSystemTime* G_CSystemTime(void)
|
||||
{
|
||||
return *(CSystemTime**)base::CSystemTime::s_systemTime_;
|
||||
return *(CSystemTime**)base::GlobalData::s_systemTime_;
|
||||
}
|
||||
|
||||
CSystemTime()
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace base
|
||||
|
||||
namespace CSystemTime
|
||||
{
|
||||
const int s_systemTime_ = 0x0941F714;
|
||||
const int getCurSec = 0x080CBC9E;
|
||||
const int getCurTickCount = 0x081458AC;
|
||||
const int getCurDate = 0x0823445E;
|
||||
@@ -77,9 +76,27 @@ namespace base
|
||||
|
||||
|
||||
//base
|
||||
const int s_pSecuProtectionField = 0x0941F7CC;
|
||||
const int s_pItemVendingMachine = 0x0941F760;
|
||||
const int s_pSecuProtectionField = 0x0941F7CC; //0x18
|
||||
const int s_pItemVendingMachine = 0x0941F760; //0x20
|
||||
const int s_db_mgr = 0x0940BDAC; //0x38
|
||||
const int s_pCeraShop = 0x0941F744; //0x8
|
||||
const int s_pLogGameChannel = 0x0941F740; //0x10
|
||||
const int s_systemTime_ = 0x0941F714;
|
||||
}
|
||||
|
||||
namespace CShutdowManager
|
||||
{
|
||||
const int CShutdowManager_make = 0x082A6FA8;
|
||||
const int EnableShutdown = 0x082A6F70;
|
||||
const int GetLastMsgCount = 0x084ED1FE;
|
||||
const int GetLastMsgResponseCount = 0x084ED20A;
|
||||
const int IncrementLastMsgResponseCount = 0x084ED1EA;
|
||||
const int OnAllUserLogout = 0x082A36BC;
|
||||
const int Reset = 0x082A6F88;
|
||||
const int SendLastMsgDBQueue = 0x082A37C8;
|
||||
const int SendShutdownSignal = 0x082A35A6;
|
||||
const int WaitUntilExitThread = 0x082A396E;
|
||||
const int GetInstanceShutdowManager = 0x082A6FBB;
|
||||
}
|
||||
|
||||
namespace CParty
|
||||
@@ -346,6 +363,33 @@ namespace base
|
||||
}
|
||||
}
|
||||
|
||||
namespace DBMgr
|
||||
{
|
||||
const int setUserIdx = 0x0818FB1A;
|
||||
const int activateGlobalDB = 0x082A420C;
|
||||
const int DBMgr_make = 0x083F48DE;
|
||||
const int DBMgr_destroy = 0x083F4A1C;
|
||||
const int Open = 0x083F4BC4;
|
||||
const int Open_2 = 0x083F4D2E;
|
||||
const int Close = 0x083F4EA6;
|
||||
const int Close_2 = 0x083F4EE0;
|
||||
const int GetServerType = 0x083F4F10;
|
||||
const int addUserDBInfo = 0x083F4F9E;
|
||||
const int removeUserDBInfo = 0x083F5038;
|
||||
const int GetDBHandleServerGroup = 0x083F506C;
|
||||
const int SetQueryCounterPointer = 0x083F5150;
|
||||
const int GetDBHandle = 0x083F523E;
|
||||
const int isActiveGlobalDB = 0x083F533C;
|
||||
|
||||
}
|
||||
|
||||
namespace MySQL
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace CGM_Manager
|
||||
{
|
||||
const int isGM = 0x0829948C;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "ida_sdk.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
template<typename R, typename A, typename ... ARG> R CallT(A call_addr, const ARG ... arguments)
|
||||
{
|
||||
if (!call_addr)
|
||||
@@ -161,6 +162,9 @@ public:
|
||||
#include "Inventory.h"
|
||||
#include "PacketBuf.h"
|
||||
#include "SystemTime.h"
|
||||
#include "DBMgr.h"
|
||||
#include "MySQL.h"
|
||||
#include "ShutdowManager.h"
|
||||
|
||||
inline int ScanInt(bool* a2 = NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user