[7666] For heroic mode creature use AIName from normal mode version in same way as done for ScriptName.

Also at creature templates loading check that AIName/ScriptName not set for heroic mode creature versions.
This commit is contained in:
VladimirMangos 2009-04-14 02:10:32 +04:00
parent 1ebf1a5ba4
commit 721e005b84
6 changed files with 25 additions and 9 deletions

View file

@ -1993,12 +1993,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;
}