diff options
| author | Shauren <none@none> | 2010-07-28 10:33:14 +0200 |
|---|---|---|
| committer | Shauren <none@none> | 2010-07-28 10:33:14 +0200 |
| commit | 69a567b90e2728994ed11dbfd630ab32920e4f57 (patch) | |
| tree | a21c5049e58d33b14f3c6ca699b5f5798e66ac18 | |
| parent | c173e84f252453397c5360fd74958c3ed135a06f (diff) | |
Fixed loading checks for SCRIPT_COMMAND_CAST_SPELL
--HG--
branch : trunk
| -rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 1388ab44748..94295a8b564 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -4735,12 +4735,18 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) tablename,tmp.datalong2,tmp.id); continue; } - if (tmp.dataint & ~0x1) // 1 bit (0,1) + if (tmp.datalong2 != 4 && tmp.dataint & ~0x1) // 1 bit (0,1) { sLog.outErrorDb("Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", tablename,tmp.dataint,tmp.id); continue; } + else if (tmp.datalong2 == 4 && !GetCreatureTemplate(tmp.dataint)) + { + sLog.outErrorDb("Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u", + tablename,tmp.dataint,tmp.id); + continue; + } break; } |
