From 6a9693a1e470d8460c37b9159a878ea3c87913ea Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 17 Aug 2009 15:54:39 -0500 Subject: [8369] Some step back in triggered effect caster selection. Author: VladimirMangos (I do not know what spells this will fix) --HG-- branch : trunk --- src/game/Unit.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 57d38054df2..a5d2acfd008 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -906,7 +906,7 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I //if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2)) for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if(spellmgr.SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) + if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) { /*SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex); if(srange && GetSpellMaxRange(srange) == 0.0f) @@ -978,7 +978,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* //check unit target for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { - if(spellmgr.SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) + if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) { if(!Victim) { @@ -6076,6 +6076,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // Judgements of the Wise if (dummySpell->SpellIconID == 3017) { + //Mangos code, do not know if we need it + // triggered only at casted Judgement spells, not at additional Judgement effects + //if(!procSpell || procSpell->Category != 1210) + // return; target = this; triggered_spell_id = 31930; // replenishment @@ -12181,7 +12185,7 @@ void CharmInfo::InitCharmCreateSpells() { bool autocast = false; for(uint32 i = 0; i < MAX_SPELL_EFFECTS && !autocast; ++i) - if(spellmgr.SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) + if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) autocast = true; if(autocast) -- cgit v1.2.3