send graphic to target correctly (#1785)

This commit is contained in:
KayenEQ
2021-11-23 12:55:58 -05:00
committed by GitHub
parent 8d3a179ecc
commit 8f3cce6585
3 changed files with 20 additions and 8 deletions
+11 -3
View File
@@ -2910,13 +2910,21 @@ void Mob::CameraEffect(uint32 duration, uint32 intensity, Client *c, bool global
safe_delete(outapp);
}
void Mob::SendSpellEffect(uint32 effect_id, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect, Client *c) {
void Mob::SendSpellEffect(uint32 effect_id, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect, Client *c, uint32 caster_id, uint32 target_id) {
if (!caster_id) {
caster_id = GetID();
}
if (!target_id) {
target_id = GetID();
}
auto outapp = new EQApplicationPacket(OP_SpellEffect, sizeof(SpellEffect_Struct));
SpellEffect_Struct* se = (SpellEffect_Struct*) outapp->pBuffer;
se->EffectID = effect_id; // ID of the Particle Effect
se->EntityID = GetID();
se->EntityID2 = GetID(); // EntityID again
se->EntityID = caster_id; //casting graphic animation
se->EntityID2 = target_id; // //target graphic animation
se->Duration = duration; // In Milliseconds
se->FinishDelay = finish_delay; // Seen 0
se->Unknown020 = unk020; // Seen 3000