diff options
author | megamage <none@none> | 2009-02-19 18:56:50 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-19 18:56:50 -0600 |
commit | ec52b48c46bcf17bbd12c9ad0b8a6b4e9e8f1937 (patch) | |
tree | c0a1cb88b469842117991403f041be84c66f9368 /src/game/ObjectMgr.cpp | |
parent | cb7a85994cc184cbf5dfe29164aa838c7ac2af57 (diff) |
[7305] Allow use datalong2 not only for set target for DB script cast but also caster (1 bit set target (target/source), 2 bit set caster (source/target)) Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 85706bc088e..2dd63e1691a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3895,6 +3895,21 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) } case SCRIPT_COMMAND_REMOVE_AURA: + { + if(!sSpellStore.LookupEntry(tmp.datalong)) + { + sLog.outErrorDb("Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA or SCRIPT_COMMAND_CAST_SPELL for script id %u", + tablename,tmp.datalong,tmp.id); + continue; + } + if(tmp.datalong2 & ~0x1) // 1 bits (0,1) + { + sLog.outErrorDb("Table `%s` using unknown flags in datalong2 (%u)i n SCRIPT_COMMAND_CAST_SPELL for script id %u", + tablename,tmp.datalong2,tmp.id); + continue; + } + break; + } case SCRIPT_COMMAND_CAST_SPELL: { if(!sSpellStore.LookupEntry(tmp.datalong)) @@ -3903,6 +3918,12 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) tablename,tmp.datalong,tmp.id); continue; } + if(tmp.datalong2 & ~0x3) // 2 bits + { + sLog.outErrorDb("Table `%s` using unknown flags in datalong2 (%u)i n SCRIPT_COMMAND_CAST_SPELL for script id %u", + tablename,tmp.datalong2,tmp.id); + continue; + } break; } } |