From b4fce37c1499b8529c949f4289239a47fcf05bdd Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Wed, 27 Nov 2013 14:38:03 -0500 Subject: [PATCH] Quick fix to issue with self buffs casting_spell_targetid isn't guaranteed to be correct at that point in the code Quick fix for now --- zone/spells.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index fa0c6ccf9..758ea4dae 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -495,7 +495,8 @@ bool Mob::DoCastingChecks() Mob *spell_target = entity_list.GetMob(casting_spell_targetid); if (RuleB(Spells, BuffLevelRestrictions)) { - if(spell_target && !spell_target->CheckSpellLevelRestriction(spell_id)) { + // casting_spell_targetid is guaranteed to be what we went, check for ST_Self for now should work though + if (spell_target && spells[spell_id].targettype != ST_Self && !spell_target->CheckSpellLevelRestriction(spell_id)) { 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);