Fix for CastSpell if the spellID is invalid thus not having a name

This commit is contained in:
Natedog2012 2015-01-24 10:57:23 -08:00 committed by Michael Cook (mackal)
parent 26018ec898
commit 069572fe15

View File

@ -148,7 +148,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
uint32 timer, uint32 timer_duration, uint32 type, int16 *resist_adjust)
{
Log.Out(Logs::Detail, Logs::Spells, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
(IsValidSpell(spell_id))?spells[spell_id].name:"UNKNOWN SPELL", spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
if(casting_spell_id == spell_id)
ZeroCastingVars();