r5sdk/r5dev/common/netmessages.h
Kawe Mazidjatari 6feb41c285 Partial CNetChan class rebuild and implementation (see description)
* Adapt codebase to new class to reduce rune-like code.
* Fixed several bugs where the global CClient pointer was used instead of the instance in question to issue bans and display information about a certain client in CBanSystem and Pylon.
* Upgraded CBanSystem and Pylon to use IPv6 instead (including IPv4 mapped IPv6 addresses). This breaks all existing banlist files! All bans have to be re-issued or the existing file has to be updated to use IPv4 mapped IPv6 addresses and renamed to 'banlist.json', and moved to the root of the 'platform' folder.
2022-04-02 02:48:54 +02:00

51 lines
1.3 KiB
C++

#pragma once
struct CNetMessage
{
void* iNetMessageVTable;
int m_nGroup;
bool m_bReliable;
char padding[3];
void* m_NetChannel;
};
struct VecNetMessages
{
CNetMessage** items;
int64_t m_nAllocationCount;
int64_t m_nGrowSize;
int m_Size;
int padding_;
};
struct VecNetDataFragments
{
void** items;
int64_t m_nAllocationCount;
int64_t m_nGrowSize;
int m_Size;
int padding_;
};
namespace
{
//-------------------------------------------------------------------------
// MM_HEARTBEAT
//-------------------------------------------------------------------------
ADDRESS MM_Heartbeat__ToString = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x83\xEC\x38\xE8\x00\x00\x00\x00\x3B\x05\x00\x00\x00\x00", "xxxxx????xx????"); // server HeartBeat? (baseserver.cpp).
// 0x1402312A0 // 48 83 EC 38 E8 ? ? ? ? 3B 05 ? ? ? ? //
}
///////////////////////////////////////////////////////////////////////////////
class HMM_Heartbeat : public IDetour
{
virtual void debugp()
{
std::cout << "| FUN: MM_Heartbeat::ToString : 0x" << std::hex << std::uppercase << MM_Heartbeat__ToString.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HMM_Heartbeat);