Add temp hack for num hits and UF

Not sure what I screwed up, could of sworn it was working right before,
but that was also 3 AM or something

Rewrote UF's OP_BuffCreate to use the Write* functions which are a bit
more straight forward
This commit is contained in:
Michael Cook (mackal) 2014-10-05 14:45:26 -04:00
parent b6be6c3709
commit 3ad7ab625d
2 changed files with 13 additions and 18 deletions

View File

@ -345,14 +345,10 @@ namespace Underfoot
__packet->pBuffer = new unsigned char[sz]; __packet->pBuffer = new unsigned char[sz];
memset(__packet->pBuffer, 0, sz); memset(__packet->pBuffer, 0, sz);
uchar *ptr = __packet->pBuffer; __packet->WriteUInt32(emu->entity_id);
*((uint32*)ptr) = emu->entity_id; __packet->WriteUInt32(0);
ptr += sizeof(uint32); __packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
ptr += sizeof(uint32); __packet->WriteUInt16(emu->count);
*((uint8*)ptr) = emu->all_buffs;
ptr += sizeof(uchar);
*((uint16*)ptr) = emu->count;
ptr += sizeof(uint16);
for (uint16 i = 0; i < emu->count; ++i) for (uint16 i = 0; i < emu->count; ++i)
{ {
@ -366,17 +362,13 @@ namespace Underfoot
buffslot += 14; buffslot += 14;
} }
*((uint32*)ptr) = buffslot; __packet->WriteUInt32(buffslot);
ptr += sizeof(uint32); __packet->WriteUInt32(emu->entries[i].spell_id);
*((uint32*)ptr) = emu->entries[i].spell_id; __packet->WriteUInt32(emu->entries[i].tics_remaining);
ptr += sizeof(uint32); __packet->WriteUInt32(emu->entries[i].num_hits);
*((uint32*)ptr) = emu->entries[i].tics_remaining; __packet->WriteString("");
ptr += sizeof(uint32);
*((uint32*)ptr) = emu->entries[i].num_hits;
ptr += sizeof(uint32);
*((uint8*)ptr) = !emu->all_buffs;
ptr += 1;
} }
__packet->WriteUInt8(!emu->all_buffs);
FINISH_ENCODE(); FINISH_ENCODE();
/* /*

View File

@ -3396,6 +3396,9 @@ void Mob::BuffProcess()
if(buffs[buffs_i].UpdateClient == true) if(buffs[buffs_i].UpdateClient == true)
{ {
CastToClient()->SendBuffDurationPacket(buffs[buffs_i]); CastToClient()->SendBuffDurationPacket(buffs[buffs_i]);
// Hack to get UF to play nicer, RoF seems fine without it
if (CastToClient()->GetClientVersion() == EQClientUnderfoot)
CastToClient()->SendBuffNumHitPacket(buffs[buffs_i], buffs_i);
buffs[buffs_i].UpdateClient = false; buffs[buffs_i].UpdateClient = false;
} }
} }