mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
This is close but no cigar yet.
This commit is contained in:
parent
d29937cba6
commit
ce728c4d0d
@ -59,6 +59,7 @@ public:
|
||||
void WriteUInt8(uint8 value) { *(uint8 *)(pBuffer + _wpos) = value; _wpos += sizeof(uint8); }
|
||||
void WriteUInt32(uint32 value) { *(uint32 *)(pBuffer + _wpos) = value; _wpos += sizeof(uint32); }
|
||||
void WriteUInt64(uint64 value) { *(uint64 *)(pBuffer + _wpos) = value; _wpos += sizeof(uint64); }
|
||||
void WriteSInt16(int32 value) { *(int16*)(pBuffer + _wpos) = value; _wpos += sizeof(int16); }
|
||||
void WriteUInt16(uint32 value) { *(uint16 *)(pBuffer + _wpos) = value; _wpos += sizeof(uint16); }
|
||||
void WriteSInt32(int32 value) { *(int32 *)(pBuffer + _wpos) = value; _wpos += sizeof(int32); }
|
||||
void WriteFloat(float value) { *(float *)(pBuffer + _wpos) = value; _wpos += sizeof(float); }
|
||||
|
||||
@ -101,6 +101,24 @@ void CRC32::SetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at)
|
||||
memcpy(in_data, (char*)&check, 4);
|
||||
}
|
||||
|
||||
unsigned long CRC32::GetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at)
|
||||
{
|
||||
unsigned long data;
|
||||
unsigned long check = 0xffffffff;
|
||||
|
||||
for (uint32 i = start_at; i < in_length; i++)
|
||||
{
|
||||
data = in_data[i];
|
||||
data = data ^ (check);
|
||||
data = data & 0x000000ff;
|
||||
check = check >> 8;
|
||||
data = CRC32Table[data];
|
||||
check = check ^ data;
|
||||
}
|
||||
|
||||
return check;
|
||||
}
|
||||
|
||||
uint32 CRC32::Update(const uint8* buf, uint32 bufsize, uint32 crc32var) {
|
||||
for(uint32 i=0; i < bufsize; i++)
|
||||
Calc(buf[i], crc32var);
|
||||
|
||||
@ -8,6 +8,7 @@ public:
|
||||
static uint32 Generate(const uint8* buf, uint32 bufsize);
|
||||
static uint32 GenerateNoFlip(const uint8* buf, uint32 bufsize); // Same as Generate(), but without the ~
|
||||
static void SetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at=4);
|
||||
static unsigned long GetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at = 4);
|
||||
|
||||
// Multiple buffer CRC32
|
||||
static uint32 Update(const uint8* buf, uint32 bufsize, uint32 crc32 = 0xFFFFFFFF);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -310,7 +310,7 @@ namespace Larion
|
||||
AltAbility = 0xFF
|
||||
};
|
||||
|
||||
const int SPELL_ID_MAX = 45000;
|
||||
const int SPELL_ID_MAX = 71999;
|
||||
const int SPELLBOOK_SIZE = 1120;
|
||||
const int SPELL_GEM_COUNT = static_cast<uint32>(CastingSlot::MaxGems);
|
||||
const int SPELL_GEM_RECAST_TIMER = 15;
|
||||
|
||||
@ -9,8 +9,8 @@ E(OP_ExpansionInfo)
|
||||
E(OP_SpawnAppearance)
|
||||
//E(OP_SendAATable)
|
||||
E(OP_PlayerProfile)
|
||||
E(OP_ZoneEntry)
|
||||
E(OP_ZoneSpawns)
|
||||
//E(OP_ZoneEntry)
|
||||
//E(OP_ZoneSpawns)
|
||||
|
||||
//list of packets we need to decode on the way in:
|
||||
D(OP_ZoneEntry)
|
||||
|
||||
@ -8,10 +8,12 @@ namespace Larion {
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE;
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_DISCIPLINES = 300;
|
||||
static const uint32 MAX_PP_DISCIPLINE_TIMERS = 25;
|
||||
static const uint32 MAX_PP_COMBAT_ABILITY_TIMERS = 25;
|
||||
static const uint32 MAX_PP_UNKNOWN_ABILITIES = 25;
|
||||
static const uint32 MAX_RECAST_TYPES = 25;
|
||||
static const uint32 MAX_ITEM_RECAST_TYPES = 100;
|
||||
static const uint32 BUFF_COUNT = 62;
|
||||
static const uint32 MAX_PP_LANGUAGE = 32;
|
||||
#pragma pack(1)
|
||||
|
||||
struct LoginInfo_Struct {
|
||||
|
||||
@ -2680,7 +2680,7 @@ namespace RoF2
|
||||
{
|
||||
float instrument_mod = 0.0f;
|
||||
uint8 effect_type = emu->buffs[r].effect_type;
|
||||
uint32 player_id = emu->buffs[r].player_id;;
|
||||
uint32 player_id = emu->buffs[r].player_id;
|
||||
|
||||
if (emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user