mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implement number of hit indicators for UF and RoF
There is a small display bug with the initial cast of the spell, but it updates quickly enough that it shouldn't be too noticeable This still needs to be fixed though Changed SendBuffDurationPacket to take a Buffs_Struct by reference to allow more of the data to be obtained without more params Added Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
This commit is contained in:
@@ -534,7 +534,7 @@ struct SpellBuffFade_Struct {
|
||||
/*007*/ uint8 unknown7;
|
||||
/*008*/ uint32 spellid;
|
||||
/*012*/ uint32 duration;
|
||||
/*016*/ uint32 unknown016;
|
||||
/*016*/ uint32 num_hits;
|
||||
/*020*/ uint32 unknown020; //prolly global player ID
|
||||
/*024*/ uint32 slotid;
|
||||
/*028*/ uint32 bufffade;
|
||||
@@ -4602,11 +4602,13 @@ struct BuffIconEntry_Struct
|
||||
uint32 buff_slot;
|
||||
uint32 spell_id;
|
||||
uint32 tics_remaining;
|
||||
uint32 num_hits;
|
||||
};
|
||||
|
||||
struct BuffIcon_Struct
|
||||
{
|
||||
uint32 entity_id;
|
||||
uint8 all_buffs;
|
||||
uint16 count;
|
||||
BuffIconEntry_Struct entries[0];
|
||||
};
|
||||
|
||||
@@ -376,6 +376,7 @@ namespace RoF
|
||||
OUT(duration);
|
||||
eq->playerId = 0x7cde;
|
||||
OUT(slotid);
|
||||
OUT(num_hits);
|
||||
if (emu->bufffade == 1)
|
||||
eq->bufffade = 1;
|
||||
else
|
||||
@@ -414,7 +415,7 @@ namespace RoF
|
||||
|
||||
__packet->WriteUInt32(emu->entity_id);
|
||||
__packet->WriteUInt32(0); // PlayerID ?
|
||||
__packet->WriteUInt8(1); // 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);
|
||||
|
||||
for (uint16 i = 0; i < emu->count; ++i)
|
||||
@@ -429,10 +430,10 @@ namespace RoF
|
||||
__packet->WriteUInt32(buffslot);
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(0); // Unknown
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||
__packet->WriteString("");
|
||||
}
|
||||
__packet->WriteUInt8(0); // Unknown
|
||||
__packet->WriteUInt8(!emu->all_buffs); // Unknown
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
@@ -712,7 +712,8 @@ struct SpellBuffFade_Struct_Live {
|
||||
/*012*/ uint32 spellid;
|
||||
/*016*/ uint32 duration;
|
||||
/*020*/ uint32 playerId; // Global player ID?
|
||||
/*024*/ uint8 unknown0028[68];
|
||||
/*024*/ uint32 num_hits;
|
||||
/*028*/ uint8 unknown0028[64];
|
||||
/*092*/ uint32 slotid;
|
||||
/*096*/ uint32 bufffade;
|
||||
/*100*/
|
||||
@@ -726,7 +727,7 @@ struct SpellBuffFade_Struct {
|
||||
/*007*/ uint8 unknown7;
|
||||
/*008*/ uint32 spellid;
|
||||
/*012*/ uint32 duration;
|
||||
/*016*/ uint32 unknown016;
|
||||
/*016*/ uint32 num_hits;
|
||||
/*020*/ uint32 unknown020; // Global player ID?
|
||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
||||
/*028*/ uint32 slotid;
|
||||
@@ -741,6 +742,27 @@ struct BuffRemoveRequest_Struct
|
||||
/*08*/
|
||||
};
|
||||
|
||||
#if 0
|
||||
// not in use
|
||||
struct BuffIconEntry_Struct {
|
||||
/*000*/ uint32 buff_slot;
|
||||
/*004*/ uint32 spell_id;
|
||||
/*008*/ uint32 tics_remaining;
|
||||
/*012*/ uint32 num_hits;
|
||||
// char name[0]; caster name is also here sometimes
|
||||
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
|
||||
};
|
||||
|
||||
// not in use
|
||||
struct BuffIcon_Struct {
|
||||
/*000*/ uint32 entity_id;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
|
||||
/*009*/ uint16 count;
|
||||
/*011*/ BuffIconEntry_Struct entires[0];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct GMTrainee_Struct
|
||||
{
|
||||
/*000*/ uint32 npcid;
|
||||
|
||||
@@ -330,6 +330,7 @@ namespace Underfoot
|
||||
OUT(duration);
|
||||
OUT(slotid);
|
||||
OUT(bufffade); // Live (October 2011) sends a 2 rather than 0 when a buff is created, but it doesn't seem to matter.
|
||||
OUT(num_hits);
|
||||
eq->unknown008 = 1.0f;
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -348,7 +349,7 @@ namespace Underfoot
|
||||
*((uint32*)ptr) = emu->entity_id;
|
||||
ptr += sizeof(uint32);
|
||||
ptr += sizeof(uint32);
|
||||
*((uint8*)ptr) = 1;
|
||||
*((uint8*)ptr) = emu->all_buffs;
|
||||
ptr += sizeof(uchar);
|
||||
*((uint16*)ptr) = emu->count;
|
||||
ptr += sizeof(uint16);
|
||||
@@ -371,7 +372,9 @@ namespace Underfoot
|
||||
ptr += sizeof(uint32);
|
||||
*((uint32*)ptr) = emu->entries[i].tics_remaining;
|
||||
ptr += sizeof(uint32);
|
||||
*((uint32*)ptr) = emu->entries[i].num_hits;
|
||||
ptr += sizeof(uint32);
|
||||
*((uint8*)ptr) = !emu->all_buffs;
|
||||
ptr += 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ struct SpellBuffFade_Struct_Underfoot {
|
||||
/*008*/ float unknown008;
|
||||
/*012*/ uint32 spellid;
|
||||
/*016*/ uint32 duration;
|
||||
/*020*/ uint32 unknown016;
|
||||
/*020*/ uint32 num_hits;
|
||||
/*024*/ uint32 playerId; // Global player ID?
|
||||
/*028*/ uint32 unknown020;
|
||||
/*032*/ uint8 unknown0028[48];
|
||||
@@ -589,6 +589,25 @@ struct SpellBuffFade_Struct {
|
||||
/*036*/
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct BuffIconEntry_Struct {
|
||||
/*000*/ uint32 buff_slot;
|
||||
/*004*/ uint32 spell_id;
|
||||
/*008*/ uint32 tics_remaining;
|
||||
/*012*/ uint32 num_hits;
|
||||
// char name[0]; caster name is also here sometimes
|
||||
// uint8 unknownend; 1 when single, 0 when all opposite of all_buffs?
|
||||
};
|
||||
|
||||
struct BuffIcon_Struct {
|
||||
/*000*/ uint32 entity_id;
|
||||
/*004*/ uint32 unknown004;
|
||||
/*008*/ uint8 all_buffs; // 1 when updating all buffs, 0 when doing one
|
||||
/*009*/ uint16 count;
|
||||
/*011*/ BuffIconEntry_Struct entires[0];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct BuffRemoveRequest_Struct
|
||||
{
|
||||
/*00*/ uint32 SlotID;
|
||||
|
||||
Reference in New Issue
Block a user