mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 17:02:28 +00:00
Fix some memory leaks in Mob::SpellOnTarget
This should fix the memory leak introduced in the last commit and a few lingering memory leaks, don't think they should break anything
This commit is contained in:
parent
a06fe1d02e
commit
36d336e69c
@ -1,5 +1,8 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 10/24/2013 ==
|
||||
demonstar55: Fix some memory leaks in Mob::SpellOnTarget
|
||||
|
||||
== 10/21/2013 ==
|
||||
demonstar55: Changed GetMinLevel return 0 for more cases that EQ uses for some reason ...
|
||||
demonstar55: Added buff level restrictions, set the Spells:BuffLevelRestrictions to false to have the old behavior.
|
||||
|
||||
@ -3287,6 +3287,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
spelltar->GetBodyType() != BT_Undead &&
|
||||
spelltar->GetBodyType() != BT_Vampire)
|
||||
{
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3300,6 +3301,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
if(focus) {
|
||||
CheckHitsRemaining(b);
|
||||
Message_StringID(MT_Shout, SPELL_WOULDNT_HOLD);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3347,6 +3349,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
if(reflect_chance) {
|
||||
Message_StringID(MT_Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
|
||||
SpellOnTarget(spell_id, this, true, use_resist_adjust, resist_adjust);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3520,6 +3523,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
mlog(SPELLS__BUFFS, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
|
||||
if(!IsBardSong(spell_id))
|
||||
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user