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/AI/SmartScripts | |
| 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/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 22 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 8 |
3 files changed, 1 insertions, 36 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 3285ce4dec9..2d6046cbddf 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -766,28 +766,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u player->GroupEventHappens(e.action.quest.quest, GetBaseObject()); break; } - case SMART_ACTION_CALL_CASTEDCREATUREORGO: - { - if (!GetBaseObject()) - break; - - ObjectList* targets = GetTargets(e, unit); - if (!targets) - break; - - for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) - { - if (IsPlayer((*itr))) - { - (*itr)->ToPlayer()->CastedCreatureOrGO(e.action.callCastedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.callCastedCreatureOrGO.spell); - TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_CASTEDCREATUREORGO: Player %u, target %u, spell %u", - (*itr)->GetGUIDLow(), e.action.callCastedCreatureOrGO.creature, e.action.callCastedCreatureOrGO.spell); - } - } - - delete targets; - break; - } case SMART_ACTION_REMOVEAURASFROMSPELL: { ObjectList* targets = GetTargets(e, unit); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index d12e8ab179c..2e0fd222b6e 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -727,13 +727,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } break; - case SMART_ACTION_CALL_CASTEDCREATUREORGO: - if (!IsCreatureValid(e, e.action.callCastedCreatureOrGO.creature)) - return false; - - if (!IsSpellValid(e, e.action.callCastedCreatureOrGO.spell)) - return false; - break; case SMART_ACTION_REMOVEAURASFROMSPELL: if (e.action.removeAura.spell != 0 && !IsSpellValid(e, e.action.removeAura.spell)) return false; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 4c0f5d1b25b..8337f9e15ee 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -417,7 +417,7 @@ enum SMART_ACTION SMART_ACTION_EVADE = 24, // No Params SMART_ACTION_FLEE_FOR_ASSIST = 25, // With Emote SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID - SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId + // none = 27, SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid, 0 removes all auras SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event) SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3... @@ -629,12 +629,6 @@ struct SmartAction struct { - uint32 creature; - uint32 spell; - } callCastedCreatureOrGO; - - struct - { uint32 spell; } removeAura; |
