mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
Merge branch 'master' into 303
Conflicts: src/game/WorldSocket.cpp src/shared/Database/DBCStructure.h src/shared/Database/DBCfmt.cpp
This commit is contained in:
commit
6fae544fbe
23 changed files with 280 additions and 118 deletions
|
|
@ -2023,3 +2023,19 @@ TrainerSpellData const* Creature::GetTrainerSpells() const
|
|||
{
|
||||
return objmgr.GetNpcTrainerSpells(GetEntry());
|
||||
}
|
||||
|
||||
// overwrite WorldObject function for proper name localization
|
||||
const char* Creature::GetNameForLocaleIdx(int32 loc_idx) const
|
||||
{
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
CreatureLocale const *cl = objmgr.GetCreatureLocale(GetEntry());
|
||||
if (cl)
|
||||
{
|
||||
if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty())
|
||||
return cl->Name[loc_idx].c_str();
|
||||
}
|
||||
}
|
||||
|
||||
return GetName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue