Show
Ignore:
Timestamp:
11/19/08 13:48:46 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: visagalis
Date: 2008-11-14 17:03:03-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Creature.cpp

    r229 r230  
    21832183    return objmgr.GetNpcTrainerSpells(GetEntry()); 
    21842184} 
     2185 
     2186// overwrite WorldObject function for proper name localization 
     2187const char* Creature::GetNameForLocaleIdx(int32 loc_idx) const 
     2188{ 
     2189    if (loc_idx >= 0) 
     2190    { 
     2191        CreatureLocale const *cl = objmgr.GetCreatureLocale(GetEntry()); 
     2192        if (cl) 
     2193        { 
     2194            if (cl->Name.size() > loc_idx && !cl->Name[loc_idx].empty()) 
     2195                return cl->Name[loc_idx].c_str(); 
     2196        } 
     2197    } 
     2198 
     2199    return GetName(); 
     2200}