aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-03-31 17:31:21 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-03-31 17:32:39 +0200
commitbacfbdc4ee2be1206ff06e5aa0c3c53991dff959 (patch)
tree8263cfda2bfa5190798714b2073306c2b7a65e01 /src
parent9c5e14b41eb1ad905dcbaf9ff3f1983268dd21e8 (diff)
Core/Sai: Added new db errors :P (hihi)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 93a9c6419b0..97e128361e4 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -990,6 +990,22 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
break;
}
+ case SMART_ACTION_EQUIP:
+ {
+
+ if (e.GetScriptType() == SMART_SCRIPT_TYPE_CREATURE)
+ {
+ int8 equipId = (int8)e.action.equip.entry;
+ EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(e.entryOrGuid, equipId);
+ if (!einfo)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u, skipped.", equipId, e.entryOrGuid);
+ return false;
+ }
+
+ }
+ break;
+ }
case SMART_ACTION_FOLLOW:
case SMART_ACTION_SET_ORIENTATION:
case SMART_ACTION_STORE_TARGET_LIST:
@@ -1026,7 +1042,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_MOVE_TO_POS:
case SMART_ACTION_RESPAWN_TARGET:
case SMART_ACTION_CLOSE_GOSSIP:
- case SMART_ACTION_EQUIP:
case SMART_ACTION_TRIGGER_TIMED_EVENT:
case SMART_ACTION_REMOVE_TIMED_EVENT:
case SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT: