Core/Spells: Fixed crash in EffectFeedPet
Closes issue #3728. Closes issue #3752. --HG-- branch : trunk
This commit is contained in:
@@ -5794,12 +5794,12 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
|
||||
if (benefit <= 0)
|
||||
return;
|
||||
|
||||
uint32 count = 1;
|
||||
_player->DestroyItemCount(foodItem,count,true);
|
||||
// TODO: fix crash when a spell has two effects, both pointed at the same item target
|
||||
|
||||
ExecuteLogEffectDestroyItem(effIndex, foodItem->GetEntry());
|
||||
|
||||
uint32 count = 1;
|
||||
_player->DestroyItemCount(foodItem, count, true);
|
||||
// TODO: fix crash when a spell has two effects, both pointed at the same item target
|
||||
|
||||
m_caster->CastCustomSpell(pet, m_spellInfo->EffectTriggerSpell[effIndex], &benefit, NULL, NULL, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user