mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Changes to UF and above clients on how spell buff tics are synced.
This commit is contained in:
parent
b5f09d435f
commit
4c3947efa6
@ -4816,6 +4816,7 @@ struct BuffIcon_Struct
|
|||||||
uint8 all_buffs;
|
uint8 all_buffs;
|
||||||
uint16 count;
|
uint16 count;
|
||||||
uint8 type; // 0 = self buff window, 1 = self target window, 4 = group, 5 = PC, 7 = NPC
|
uint8 type; // 0 = self buff window, 1 = self target window, 4 = group, 5 = PC, 7 = NPC
|
||||||
|
int32 tic_timer;
|
||||||
BuffIconEntry_Struct entries[0];
|
BuffIconEntry_Struct entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -458,7 +458,7 @@ namespace RoF
|
|||||||
memset(__packet->pBuffer, 0, sz);
|
memset(__packet->pBuffer, 0, sz);
|
||||||
|
|
||||||
__packet->WriteUInt32(emu->entity_id);
|
__packet->WriteUInt32(emu->entity_id);
|
||||||
__packet->WriteUInt32(0); // PlayerID ?
|
__packet->WriteUInt32(emu->tic_timer);
|
||||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
|
|||||||
@ -527,7 +527,7 @@ namespace RoF2
|
|||||||
memset(__packet->pBuffer, 0, sz);
|
memset(__packet->pBuffer, 0, sz);
|
||||||
|
|
||||||
__packet->WriteUInt32(emu->entity_id);
|
__packet->WriteUInt32(emu->entity_id);
|
||||||
__packet->WriteUInt32(0); // PlayerID ?
|
__packet->WriteUInt32(emu->tic_timer);
|
||||||
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
__packet->WriteUInt8(emu->all_buffs); // 1 indicates all buffs on the player (0 to add or remove a single buff)
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
|
|||||||
@ -2219,25 +2219,6 @@ namespace SoD
|
|||||||
ptr += sizeof(uint32);
|
ptr += sizeof(uint32);
|
||||||
ptr += 1;
|
ptr += 1;
|
||||||
}
|
}
|
||||||
/*std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
|
|
||||||
|
|
||||||
uint8 write_var8 = 1;
|
|
||||||
ss.write((const char*)&emu->entity_id, sizeof(uint32));
|
|
||||||
ss.write((const char*)&emu->count, sizeof(uint16));
|
|
||||||
write_var8 = 0;
|
|
||||||
for(uint16 i = 0; i < emu->count; ++i)
|
|
||||||
{
|
|
||||||
ss.write((const char*)&emu->entries[i].buff_slot, sizeof(uint32));
|
|
||||||
ss.write((const char*)&emu->entries[i].spell_id, sizeof(uint32));
|
|
||||||
ss.write((const char*)&emu->entries[i].tics_remaining, sizeof(uint32));
|
|
||||||
ss.write((const char*)&write_var8, sizeof(uint8));
|
|
||||||
}
|
|
||||||
|
|
||||||
__packet->size = ss.str().length();
|
|
||||||
__packet->pBuffer = new unsigned char[__packet->size];
|
|
||||||
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
|
|
||||||
*/
|
|
||||||
|
|
||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -391,7 +391,7 @@ namespace UF
|
|||||||
memset(__packet->pBuffer, 0, sz);
|
memset(__packet->pBuffer, 0, sz);
|
||||||
|
|
||||||
__packet->WriteUInt32(emu->entity_id);
|
__packet->WriteUInt32(emu->entity_id);
|
||||||
__packet->WriteUInt32(0);
|
__packet->WriteUInt32(emu->tic_timer);
|
||||||
__packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
|
__packet->WriteUInt8(emu->all_buffs); // 1 = all buffs, 0 = 1 buff
|
||||||
__packet->WriteUInt16(emu->count);
|
__packet->WriteUInt16(emu->count);
|
||||||
|
|
||||||
|
|||||||
@ -5413,6 +5413,7 @@ void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
|
|||||||
bi->entity_id = GetID();
|
bi->entity_id = GetID();
|
||||||
bi->count = 1;
|
bi->count = 1;
|
||||||
bi->all_buffs = 0;
|
bi->all_buffs = 0;
|
||||||
|
bi->tic_timer = tic_timer.GetRemainingTime();
|
||||||
|
|
||||||
bi->entries[0].buff_slot = slot;
|
bi->entries[0].buff_slot = slot;
|
||||||
bi->entries[0].spell_id = buff.spellid;
|
bi->entries[0].spell_id = buff.spellid;
|
||||||
@ -5493,6 +5494,7 @@ EQApplicationPacket *Mob::MakeBuffsPacket(bool for_target)
|
|||||||
buff->entity_id = GetID();
|
buff->entity_id = GetID();
|
||||||
buff->count = count;
|
buff->count = count;
|
||||||
buff->all_buffs = 1;
|
buff->all_buffs = 1;
|
||||||
|
buff->tic_timer = tic_timer.GetRemainingTime();
|
||||||
// there are more types, the client doesn't seem to really care though. The others are also currently hard to fill in here ...
|
// there are more types, the client doesn't seem to really care though. The others are also currently hard to fill in here ...
|
||||||
// (see comment in common/eq_packet_structs.h)
|
// (see comment in common/eq_packet_structs.h)
|
||||||
if (for_target)
|
if (for_target)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user