aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAISelector.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-14 18:31:31 -0500
committermegamage <none@none>2009-04-14 18:31:31 -0500
commit4f4c6aeaf533419a7933e8ff0ee6f09d976a04b7 (patch)
treef34fd730fd094fef70139ab88dadf86c1532b1d8 /src/game/CreatureAISelector.cpp
parent9ec70b5e72413290e73d5a0b3d462150aa8cb93c (diff)
[7666] For heroic mode creature use AIName from normal mode version in same way as done for ScriptName. Author: VladimirMangos
Also at creature templates loading check that AIName/ScriptName not set for heroic mode creature versions. --HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAISelector.cpp')
-rw-r--r--src/game/CreatureAISelector.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/game/CreatureAISelector.cpp b/src/game/CreatureAISelector.cpp
index 88384fd6f21..9250a254155 100644
--- a/src/game/CreatureAISelector.cpp
+++ b/src/game/CreatureAISelector.cpp
@@ -47,11 +47,8 @@ namespace FactorySelector
if(CreatureAI* scriptedAI = Script->GetAI(creature))
return scriptedAI;
- CreatureInfo const *cinfo = creature->GetCreatureInfo();
- assert(cinfo);
-
- // this seems to be useless
- std::string ainame=cinfo->AIName;
+ // AIname in db
+ std::string ainame=creature->GetAIName();
if(!ai_factory && !ainame.empty())
ai_factory = ai_registry.GetRegistryItem( ainame.c_str() );