diff options
author | Blaymoira <none@none> | 2009-03-21 07:56:52 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-21 07:56:52 +0100 |
commit | 4413bfb54862e057a9fdcb9d191d1453957612d7 (patch) | |
tree | 6ec2d9b4129d1cd7936dec979619692310644e39 /src/bindings/scripts/ScriptMgr.cpp | |
parent | 3120990ebd47e734074d96cd11fabf7ff75ae5dd (diff) |
*Redefinition of eventAI EVENT_T_OOC_LOS. Read updated docs/EventAI.txt for details. - by nofantasy
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/ScriptMgr.cpp')
-rw-r--r-- | src/bindings/scripts/ScriptMgr.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index a32d6442a89..4920b5f99a3 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -1002,9 +1002,27 @@ void LoadDatabase() error_db_log("TSCR: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); } break; + + case EVENT_T_OOC_LOS: + { + if (temp.event_param2 > VISIBLE_RANGE || temp.event_param2 <= 0) + { + error_db_log("SD2: Creature %u are using event(%u), but param2 (MaxAllowedRange=%u) are not within allowed range.", temp.creature_id, i, temp.event_param2); + temp.event_param2 = VISIBLE_RANGE; + } + + if (temp.event_param3 == 0 && temp.event_param4 == 0 && temp.event_flags & EFLAG_REPEATABLE) + { + error_db_log("SD2: Creature %u are using event(%u) with EFLAG_REPEATABLE, but param3(RepeatMin) and param4(RepeatMax) are 0. Repeatable disabled.", temp.creature_id, i); + temp.event_flags &= ~EFLAG_REPEATABLE; + } + if (temp.event_param4 < temp.event_param3) + error_db_log("SD2: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); + } + break; + case EVENT_T_RANGE: - case EVENT_T_OOC_LOS: case EVENT_T_FRIENDLY_HP: case EVENT_T_FRIENDLY_IS_CC: case EVENT_T_FRIENDLY_MISSING_BUFF: |