[svn] *** Source: MaNGOS ***

* Implement localization of creature/gameobject name that say/yell. Author: evilstar (rewrited by: Vladimir)
* Fix auth login queue. Author: Derex
* Allowed switching INVTYPE_HOLDABLE items during combat, used correct spells for triggering global cooldown at weapon switch. Author: mobel/simak
* Fixed some format arg type/value pairs. Other warnings. Author: Vladimir
* [238_world.sql] Allow have team dependent graveyards at entrance map for instances. Author: Vladimir

NOTE:
Entrance map graveyards selected by same way as local (by distance from entrance) Until DB support will work in old way base at current DB data.

--HG--
branch : trunk
This commit is contained in:
visagalis
2008-11-14 17:03:03 -06:00
parent d1e759479b
commit bfa9e75161
31 changed files with 165 additions and 80 deletions

View File

@@ -1285,3 +1285,19 @@ void GameObject::CastSpell(Unit* target, uint32 spell)
//trigger->setDeathState(JUST_DIED);
//trigger->RemoveCorpse();
}
// overwrite WorldObject function for proper name localization
const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
{
if (loc_idx >= 0)
{
GameObjectLocale const *cl = objmgr.GetGameObjectLocale(GetEntry());
if (cl)
{
if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty())
return cl->Name[loc_idx].c_str();
}
}
return GetName();
}