aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-22 22:44:27 -0600
committermegamage <none@none>2009-01-22 22:44:27 -0600
commitab4b9160f2d1d534832372422fd1e2bc514b808a (patch)
treeee5ec121b585b419ff8ec38193ec008d930e75da /src/game/Pet.cpp
parent4230318f962f5faeddf188d61a367a635a8bb81a (diff)
*Update to Mangos 7151.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index e5fd0d037e4..6a39aeb6d3b 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -777,11 +777,10 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(creature->getLevel())/4);
SetUInt32Value(UNIT_NPC_FLAGS, 0);
- CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(creature->GetCreatureInfo()->family);
- if( char* familyname = cFamily->Name[sWorld.GetDefaultDbcLocale()] )
- SetName(familyname);
+ if(CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
+ SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]);
else
- SetName(creature->GetName());
+ SetName(creature->GetNameForLocaleIdx(objmgr.GetDBCLocaleIndex()));
if(cinfo->type == CREATURE_TYPE_BEAST)
{