From 45ff2cddb7bba6db377eb89777d21d2f18b5ac17 Mon Sep 17 00:00:00 2001 From: Trevius Date: Sat, 1 Nov 2014 11:50:55 -0500 Subject: [PATCH] Fixed potential crash related to Pets/Mercs buffs when targeting themselves. --- changelog.txt | 3 +++ zone/spell_effects.cpp | 2 +- zone/spells.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 0242a6d1d..b02d48bb8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 11/01/2014 == +Trevius: Fixed potential crash related to Pets/Mercs buffs when targeting themselves. + == 10/28/2014 == Uleat: Added Client::InterrogateInventory(). Can be invoked by #interrogateinv and is also called when Handle_OP_MoveItem() calls for SwapItemResync() diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 41e8f1e50..55a0a9c96 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -4161,7 +4161,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) EQApplicationPacket *outapp = MakeBuffsPacket(); entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater); - if(GetTarget() == this) { + if(IsClient() && GetTarget() == this) { CastToClient()->QueuePacket(outapp); } diff --git a/zone/spells.cpp b/zone/spells.cpp index 544da35a0..95cb76627 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3126,7 +3126,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, BIT_SoDAndLater); - if(GetTarget() == this) + if(IsClient() && GetTarget() == this) CastToClient()->QueuePacket(outapp); safe_delete(outapp);