diff options
author | megamage <none@none> | 2009-05-21 10:52:05 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-21 10:52:05 -0500 |
commit | 5fe179019fded52718f6fce9a76c052785df48a5 (patch) | |
tree | ace3db0feaba56ff9f452849c54b2ef25d1d840e /src/game/CreatureEventAIMgr.cpp | |
parent | 8d771cc9f7b8800ccf8a799740d0b95cc95b4cbe (diff) |
[7863] Implement for EVENT_T_SPAWNED map/zone/subzone only event conditions. Author: Alex
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureEventAIMgr.cpp')
-rw-r--r-- | src/game/CreatureEventAIMgr.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp index 5a163089d4c..1905fa72d41 100644 --- a/src/game/CreatureEventAIMgr.cpp +++ b/src/game/CreatureEventAIMgr.cpp @@ -283,6 +283,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() if (temp.ooc_los.repeatMax < temp.ooc_los.repeatMin) sLog.outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; + case EVENT_T_SPAWNED: + switch(temp.spawned.condition) + { + case SPAWNED_EVENT_ALWAY: + break; + case SPAWNED_EVENT_MAP: + if(!sMapStore.LookupEntry(temp.spawned.conditionValue1)) + sLog.outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + break; + case SPAWNED_EVENT_ZONE: + if(!GetAreaEntryByAreaID(temp.spawned.conditionValue1)) + sLog.outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + default: + sLog.outErrorDb("CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition); + break; + } + break; case EVENT_T_FRIENDLY_HP: if (temp.friendly_hp.repeatMax < temp.friendly_hp.repeatMin) sLog.outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); @@ -327,7 +344,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() case EVENT_T_AGGRO: case EVENT_T_DEATH: case EVENT_T_EVADE: - case EVENT_T_SPAWNED: case EVENT_T_REACHED_HOME: { if (temp.event_flags & EFLAG_REPEATABLE) |