aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorShauren <none@none>2010-07-27 19:18:44 +0200
committerShauren <none@none>2010-07-27 19:18:44 +0200
commitde2f63bcfbabb63abfa3a33399314f5a59fa0e58 (patch)
tree449965e1ba0dce0045a2ace70f6341209d55c6ef /src/server/game/Globals/ObjectMgr.cpp
parent57947ac30379d9a2d820d1ae3ad8e567908142fd (diff)
Added possibility to cast spells with triggered flag using SCRIPT_COMMAND_CAST_SPELL, original patch by Az@zel
Fixed SCRIPT_COMMAND_CAST_SPELL for casting on creatures with selected entry --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 139e3accdce..1388ab44748 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4709,13 +4709,13 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
{
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",
+ sLog.outErrorDb("Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA 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",
+ sLog.outErrorDb("Table `%s` using unknown flags in datalong2 (%u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u",
tablename,tmp.datalong2,tmp.id);
continue;
}
@@ -4725,16 +4725,22 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
{
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",
+ sLog.outErrorDb("Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tablename,tmp.datalong,tmp.id);
continue;
}
- if (tmp.datalong2 & ~0x3) // 2 bits
+ if (tmp.datalong2 > 4) // targeting type
{
- sLog.outErrorDb("Table `%s` using unknown flags in datalong2 (%u)i n SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ sLog.outErrorDb("Table `%s` using unknown target in datalong2 (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tablename,tmp.datalong2,tmp.id);
continue;
}
+ if (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;
+ }
break;
}