aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.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/Creature.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/Creature.cpp')
-rw-r--r--src/game/Creature.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index cee08c1dd27..71631e4bdbc 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -2237,12 +2237,17 @@ uint32 Creature::getLevelForTarget( Unit const* target ) const
return level;
}
-std::string Creature::GetScriptName()
+std::string Creature::GetAIName() const
+{
+ return ObjectMgr::GetCreatureTemplate(GetEntry())->AIName;
+}
+
+std::string Creature::GetScriptName() const
{
return objmgr.GetScriptName(GetScriptId());
}
-uint32 Creature::GetScriptId()
+uint32 Creature::GetScriptId() const
{
return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptID;
}