diff options
4 files changed, 23 insertions, 21 deletions
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp index 5b764367d06..4c796293aa3 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -1789,7 +1789,7 @@ struct TRINITY_DLL_DECL blade_of_azzinothAI : public NullCreatureAI void SpellHit(Unit *caster, const SpellEntry *spell) { if(spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE) - m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21431);//appear when hit by Illidan's glaive + me->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21431);//appear when hit by Illidan's glaive } }; diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp index ae3955ac6e2..7b772cbeb26 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp @@ -44,8 +44,8 @@ struct TRINITY_DLL_DECL molten_flameAI : public NullCreatureAI molten_flameAI(Creature *c) : NullCreatureAI(c) { float x, y, z; - m_creature->GetNearPoint(m_creature, x, y, z, 1, 50, M_PI*2*rand_norm()); - m_creature->GetMotionMaster()->MovePoint(0, x, y, z); + me->GetNearPoint(me, x, y, z, 1, 50, M_PI*2*rand_norm()); + me->GetMotionMaster()->MovePoint(0, x, y, z); } }; diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp index 8db7477ea1e..eb929787f5f 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp @@ -1522,7 +1522,9 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI for(Group::member_citerator itr = members.begin(); itr!= members.end(); itr++) { GroupMember = ((Player*)Unit::GetUnit((*m_creature), itr->guid)); - if(GroupMember && !GroupMember->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS) && GroupMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE) + if(!GroupMember) + continue; + if(!GroupMember->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS) && GroupMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE) { GroupMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH); GroupMember->SetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, QUEST_STATUS_NONE); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1f829f763f6..cbde7b7023c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2219,6 +2219,23 @@ void Spell::cast(bool skipCheck) if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE) CalculateDamageDoneForAllTargets(); + //are there any spells need to be triggered after hit? + // handle SPELL_AURA_ADD_TARGET_TRIGGER auras + Unit::AuraList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER); + for(Unit::AuraList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i) + { + if (!(*i)->isAffectedOnSpell(m_spellInfo)) + continue; + SpellEntry const *auraSpellInfo = (*i)->GetSpellProto(); + uint32 auraSpellIdx = (*i)->GetEffIndex(); + if(SpellEntry const *spellInfo = sSpellStore.LookupEntry(auraSpellInfo->EffectTriggerSpell[auraSpellIdx])) + { + // Calculate chance at that moment (can be depend for example from combo points) + int32 chance = m_caster->CalculateSpellDamage(auraSpellInfo, auraSpellIdx, (*i)->GetBasePoints(), NULL); + m_ChanceTriggerSpells.push_back(std::make_pair(spellInfo, chance * (*i)->GetStackAmount())); + } + } + if(m_customAttr & SPELL_ATTR_CU_CHARGE) EffectCharge(0); @@ -2240,23 +2257,6 @@ void Spell::cast(bool skipCheck) handle_immediate(); } - //are there any spells need to be triggered after hit? - // handle SPELL_AURA_ADD_TARGET_TRIGGER auras - Unit::AuraList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER); - for(Unit::AuraList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i) - { - if (!(*i)->isAffectedOnSpell(m_spellInfo)) - continue; - SpellEntry const *auraSpellInfo = (*i)->GetSpellProto(); - uint32 auraSpellIdx = (*i)->GetEffIndex(); - if(SpellEntry const *spellInfo = sSpellStore.LookupEntry(auraSpellInfo->EffectTriggerSpell[auraSpellIdx])) - { - // Calculate chance at that moment (can be depend for example from combo points) - int32 chance = m_caster->CalculateSpellDamage(auraSpellInfo, auraSpellIdx, (*i)->GetBasePoints(), NULL); - m_ChanceTriggerSpells.push_back(std::make_pair(spellInfo, chance * (*i)->GetStackAmount())); - } - } - // combo points should not be taken before SPELL_AURA_ADD_TARGET_TRIGGER auras are handled if(!m_IsTriggeredSpell) { |