diff options
| author | Nay <dnpd.dd@gmail.com> | 2013-08-30 16:42:49 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2013-08-30 19:32:08 +0100 |
| commit | 7776016106e748fee8cb3e052ec3c8e575e84a55 (patch) | |
| tree | a2a5f9df535dd7a22f90fe1e4e5fbbde5ea9e2a9 /src/server/game/Spells | |
| parent | aa5bc37e9cf301b0917dc4fd319c91c13aff654d (diff) | |
Core/Quests: Remove CastedCreatureOrGO method
- Remove EAI's ACTION_T_CAST_EVENT and ACTION_T_CAST_EVENT_ALL
- Remove SAI's SMART_ACTION_CALL_CASTEDCREATUREORGO
- Split QUEST_TRINITY_FLAGS_KILL_OR_CAST into QUEST_TRINITY_FLAGS_KILL and QUEST_TRINITY_FLAGS_CAST
- Assign QUEST_TRINITY_FLAGS_CAST to all the quests that were using RequiredSpellCastX
- (unrelated) Fix a warning in Player.cpp
- Replace CastedCreatureOrGO usage in scripts by KilledMonsterCredit
TODO: Convert the two EAI scripts commented out in the .sql to proper SAI
Closes #10667
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index f1c60cb4e90..866cd888c3e 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2569,17 +2569,9 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) { //AI functions if (spellHitTarget->GetTypeId() == TYPEID_UNIT) - { if (spellHitTarget->ToCreature()->IsAIEnabled) spellHitTarget->ToCreature()->AI()->SpellHit(m_caster, m_spellInfo); - // cast at creature (or GO) quest objectives update at successful cast finished (+channel finished) - // ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm...) - if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !spellHitTarget->ToCreature()->IsPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive()) - if (Player* p = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself()) - p->CastedCreatureOrGO(spellHitTarget->GetEntry(), spellHitTarget->GetGUID(), m_spellInfo->Id); - } - if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsAIEnabled) m_caster->ToCreature()->AI()->SpellHitTarget(spellHitTarget, m_spellInfo); @@ -2882,12 +2874,6 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo* target) HandleEffects(NULL, NULL, go, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET); CallScriptOnHitHandlers(); - - // cast at creature (or GO) quest objectives update at successful cast finished (+channel finished) - // ignore autorepeat/melee casts for speed (not exist quest for spells (hm...) - if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive()) - if (Player* p = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself()) - p->CastedCreatureOrGO(go->GetEntry(), go->GetGUID(), m_spellInfo->Id); CallScriptAfterHitHandlers(); } @@ -3641,40 +3627,6 @@ void Spell::update(uint32 difftime) if (m_timer == 0) { SendChannelUpdate(0); - - // channeled spell processed independently for quest targeting - // cast at creature (or GO) quest objectives update at successful cast channel finished - // ignore autorepeat/melee casts for speed (not exist quest for spells (hm...) - if (!IsAutoRepeat() && !IsNextMeleeSwingSpell()) - { - if (Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself()) - { - for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) - { - TargetInfo* target = &*ihit; - if (!IS_CRE_OR_VEH_GUID(target->targetGUID)) - continue; - - Unit* unit = m_caster->GetGUID() == target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target->targetGUID); - if (unit == NULL) - continue; - - p->CastedCreatureOrGO(unit->GetEntry(), unit->GetGUID(), m_spellInfo->Id); - } - - for (std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit) - { - GOTargetInfo* target = &*ihit; - - GameObject* go = m_caster->GetMap()->GetGameObject(target->targetGUID); - if (!go) - continue; - - p->CastedCreatureOrGO(go->GetEntry(), go->GetGUID(), m_spellInfo->Id); - } - } - } - finish(); } break; |
