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:
tomrus88 2008-11-10 01:10:52 +03:00
commit 6fae544fbe
23 changed files with 280 additions and 118 deletions

View file

@ -1281,3 +1281,19 @@ void GameObject::Use(Unit* user)
spell->prepare(&targets);
}
// 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();
}