aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-10-04 20:18:02 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-10-04 20:18:02 +0200
commitd08862a7928707258f8741d7cb368b4622abc08e (patch)
treef6f793e6833fa3d8a7ac4646165da260ce1a166e /src
parent3d0c5cbf9a82c9d29dbb58c635beb2d15e8fe47a (diff)
Core/SAI: Added new error for is using other script as sai
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 9a9b803452a..76937fcd7af 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -156,6 +156,10 @@ void SmartAIMgr::LoadSmartAIFromDB()
TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) is not using SmartAI, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
+
+ std::string scriptName = sObjectMgr->GetScriptName(creatureInfo->ScriptID);
+ if (!scriptName.empty())
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) is using other script", uint32(temp.entryOrGuid));
break;
}
case SMART_SCRIPT_TYPE_GAMEOBJECT:
@@ -195,22 +199,26 @@ void SmartAIMgr::LoadSmartAIFromDB()
CreatureData const* creature = sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid)));
if (!creature)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
continue;
}
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creature->id);
if (!creatureInfo)
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature (%u) guid (%u) does not exist, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) does not exist, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
continue;
}
if (creatureInfo->AIName != "SmartAI")
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) is not using SmartAI, skipped loading.", uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) is not using SmartAI, skipped loading.", creature->id, uint32(abs(temp.entryOrGuid)));
continue;
}
+
+ std::string scriptName = sObjectMgr->GetScriptName(creatureInfo->ScriptID);
+ if (!scriptName.empty())
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) is using other script", creature->id, uint32(abs(temp.entryOrGuid)));
}
temp.source_type = source_type;