添加进入人物和退出人物hook
This commit is contained in:
@@ -247,57 +247,141 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class InterfacePacketBuf
|
||||
class InterfacePacketBuf :public PacketBuf
|
||||
{
|
||||
public:
|
||||
int put_header(int a2, int a3)
|
||||
|
||||
InterfacePacketBuf()
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, int a2, int a3);
|
||||
return ((__func)base::InterfacePacketBuf::put_header)(this, a2, a3);
|
||||
CallT<int>(base::InterfacePacketBuf::InterfacePacketBuf_make, this);
|
||||
}
|
||||
|
||||
int put_byte(char a2)
|
||||
~InterfacePacketBuf()
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, char a2);
|
||||
return ((__func)base::InterfacePacketBuf::put_byte)(this, a2);
|
||||
}
|
||||
int put_short(short a2)
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, short a2);
|
||||
return ((__func)base::InterfacePacketBuf::put_short)(this, a2);
|
||||
CallT<int>(base::InterfacePacketBuf::InterfacePacketBuf_destroy, this);
|
||||
}
|
||||
|
||||
int put_int(int a2)
|
||||
int AcquirePacketBuf(PacketBuf* a2)
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, int a2);
|
||||
return ((__func)base::InterfacePacketBuf::put_int)(this, a2);
|
||||
return CallT<int>(base::InterfacePacketBuf::AcquirePacketBuf, this, a2);
|
||||
}
|
||||
|
||||
int put_binary(char* a2, int a3)
|
||||
int bind_packet(char* a2, int a3)
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, char* a2, int a3);
|
||||
return ((__func)base::InterfacePacketBuf::put_binary)(this, a2, a3);
|
||||
return CallT<int>(base::InterfacePacketBuf::bind_packet, this, a2, a3);
|
||||
}
|
||||
|
||||
int clear()
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::clear, this);
|
||||
}
|
||||
|
||||
int finalize(bool a2)
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, bool a2);
|
||||
return ((__func)base::InterfacePacketBuf::finalize)(this, a2);
|
||||
return CallT<int>(base::InterfacePacketBuf::finalize, this, a2);
|
||||
}
|
||||
|
||||
int put_str(const char* a2, int a3)
|
||||
int get()
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, const char* a2, int a3);
|
||||
return ((__func)base::InterfacePacketBuf::put_str)(this, a2, a3);
|
||||
return CallT<int>(base::InterfacePacketBuf::get, this);
|
||||
}
|
||||
|
||||
int put_packet(const Inven_Item* a2)
|
||||
int getLastError()
|
||||
{
|
||||
typedef int (*__func)(InterfacePacketBuf* a1, const Inven_Item* a2);
|
||||
return ((__func)base::InterfacePacketBuf::put_packet)(this, a2);
|
||||
return CallT<int>(base::InterfacePacketBuf::getLastError, this);
|
||||
}
|
||||
|
||||
int get_binary(char* a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_binary, this, a2, a3);
|
||||
}
|
||||
|
||||
int get_index()
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_index, this);
|
||||
}
|
||||
|
||||
int get_int(int* a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_int, this, a2);
|
||||
}
|
||||
|
||||
int get_len()
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_len, this);
|
||||
}
|
||||
|
||||
int get_packet(int a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_packet, this, a2);
|
||||
}
|
||||
|
||||
int get_short(short* a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::get_short, this, a2);
|
||||
}
|
||||
|
||||
int is_finallized()
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::is_finallized, this);
|
||||
}
|
||||
|
||||
int put_binary(char* a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_binary, this, a2, a3);
|
||||
}
|
||||
|
||||
int put_binary_c(char const* a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_binary_c, this, a2, a3);
|
||||
}
|
||||
|
||||
int put_byte(int a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_byte, this, a2);
|
||||
}
|
||||
|
||||
int put_header(int a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_header, this, a2, a3);
|
||||
}
|
||||
|
||||
int put_int(int a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_int, this, a2);
|
||||
}
|
||||
|
||||
int put_item_idx(ulong a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_item_idx, this, a2);
|
||||
}
|
||||
|
||||
int put_packet(Inven_Item const& a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_packet, this, a2);
|
||||
}
|
||||
|
||||
int put_short(int a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_short, this, a2);
|
||||
}
|
||||
|
||||
int put_str(char* a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_str, this, a2, a3);
|
||||
}
|
||||
|
||||
int put_str_c(char const* a2, int a3)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::put_str_c, this, a2, a3);
|
||||
}
|
||||
|
||||
int set_index(int a2)
|
||||
{
|
||||
return CallT<int>(base::InterfacePacketBuf::set_index, this, a2);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class PacketGuard
|
||||
|
||||
50
src/sdk/SystemTime.h
Normal file
50
src/sdk/SystemTime.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
#ifndef __SYSTEMTIME_H__
|
||||
#define __SYSTEMTIME_H__
|
||||
|
||||
#pragma pack(push, 0x01)
|
||||
|
||||
class CSystemTime
|
||||
{
|
||||
public:
|
||||
static CSystemTime* G_CSystemTime(void)
|
||||
{
|
||||
return *(CSystemTime**)base::CSystemTime::s_systemTime_;
|
||||
}
|
||||
|
||||
CSystemTime()
|
||||
{
|
||||
CallT<int>(base::CSystemTime::CSystemTime_make, this);
|
||||
}
|
||||
|
||||
~CSystemTime()
|
||||
{
|
||||
CallT<int>(base::CSystemTime::CSystemTime_destroy, this);
|
||||
}
|
||||
|
||||
int getCurSec()
|
||||
{
|
||||
return CallT<int>(base::CSystemTime::getCurSec, this);
|
||||
}
|
||||
|
||||
int getCurTickCount()
|
||||
{
|
||||
return CallT<int>(base::CSystemTime::getCurTickCount, this);
|
||||
}
|
||||
|
||||
int getCurDate()
|
||||
{
|
||||
return CallT<int>(base::CSystemTime::getCurDate, this);
|
||||
}
|
||||
|
||||
int update()
|
||||
{
|
||||
return CallT<int>(base::CSystemTime::update, this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif // __SYSTEMTIME_H__
|
||||
|
||||
@@ -2,11 +2,29 @@
|
||||
|
||||
namespace base
|
||||
{
|
||||
namespace DNFFLib
|
||||
{
|
||||
const int ConvertGBKtoUTF8 = 0x08108D0E;
|
||||
const int ConvertUTF8toGBK = 0x08108D4B;
|
||||
|
||||
}
|
||||
|
||||
namespace CGameManager
|
||||
{
|
||||
const int G_CGameManager = 0x080CC18E;
|
||||
}
|
||||
|
||||
namespace CSystemTime
|
||||
{
|
||||
const int s_systemTime_ = 0x0941F714;
|
||||
const int getCurSec = 0x080CBC9E;
|
||||
const int getCurTickCount = 0x081458AC;
|
||||
const int getCurDate = 0x0823445E;
|
||||
const int update = 0x082A68C8;
|
||||
const int CSystemTime_make = 0x082A6936;
|
||||
const int CSystemTime_destroy = 0x082A6986;
|
||||
}
|
||||
|
||||
namespace Dispatcher_UseJewel
|
||||
{
|
||||
const int dispatch_sig = 0x8217BD6;
|
||||
@@ -14,6 +32,22 @@ namespace base
|
||||
|
||||
}
|
||||
|
||||
namespace DisPatcher_MoveMap
|
||||
{
|
||||
const int process = 0x081C5330;
|
||||
const int dispatch_sig = 0x082595B2;
|
||||
}
|
||||
|
||||
namespace Inter_LoadEtc
|
||||
{
|
||||
const int dispatch_sig = 0x084C0264;
|
||||
}
|
||||
|
||||
namespace DisPatcher_ReturnToSelectCharacter
|
||||
{
|
||||
const int dispatch_sig = 0x081FD25C;
|
||||
}
|
||||
|
||||
namespace GlobalData
|
||||
{
|
||||
const int Init = 0x08299FA0;
|
||||
@@ -213,14 +247,33 @@ namespace base
|
||||
|
||||
namespace InterfacePacketBuf
|
||||
{
|
||||
const int put_header = 0x080CB8FC;
|
||||
const int AcquirePacketBuf = 0x0858E2A0;
|
||||
const int InterfacePacketBuf_make = 0x0858E294;
|
||||
const int bind_packet = 0x0848F39C;
|
||||
const int clear = 0x080CB8E6;
|
||||
const int finalize = 0x080CB958;
|
||||
const int get = 0x0822B766;
|
||||
const int getLastError = 0x086D18EE;
|
||||
const int get_binary = 0x0848F3F8;
|
||||
const int get_index = 0x08110B4C;
|
||||
const int get_int = 0x0848F3DC;
|
||||
const int get_len = 0x0848F438;
|
||||
const int get_packet = 0x0848F41C;
|
||||
const int get_short = 0x0848F3C0;
|
||||
const int is_finallized = 0x0848F44E;
|
||||
const int put_binary = 0x0811DF08;
|
||||
const int put_binary_c = 0x0815096A;
|
||||
const int put_byte = 0x080CB920;
|
||||
const int put_short = 0x80D9EA4;
|
||||
const int put_int = 0x80CB93C;
|
||||
const int put_binary = 0x811DF08;
|
||||
const int finalize = 0x80CB958;
|
||||
const int put_str = 0x0822B770;
|
||||
const int put_packet = 0x0822B794;
|
||||
const int put_header = 0x080CB8FC;
|
||||
const int put_int = 0x080CB93C;
|
||||
const int put_item_idx = 0x0822B794;
|
||||
const int put_packet = 0x0815098E;
|
||||
const int put_short = 0x080D9EA4;
|
||||
const int put_str = 0x081B73E4;
|
||||
const int put_str_c = 0x0822B770;
|
||||
const int set_index = 0x0822B7B0;
|
||||
const int InterfacePacketBuf_destroy = 0x0858E29A;
|
||||
|
||||
}
|
||||
|
||||
namespace PacketGuard
|
||||
|
||||
@@ -42,6 +42,22 @@ 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
|
||||
{
|
||||
|
||||
@@ -115,6 +131,7 @@ public:
|
||||
#include "DataManager.h"
|
||||
#include "Inventory.h"
|
||||
#include "PacketBuf.h"
|
||||
#include "SystemTime.h"
|
||||
|
||||
|
||||
#endif // __DXFBASE_H__
|
||||
|
||||
Reference in New Issue
Block a user