aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-24 12:28:26 -0500
committermegamage <none@none>2009-05-24 12:28:26 -0500
commita4c88418ea85ac25d0ea92440ba24da98f44bba0 (patch)
treed8c1536b95f9bf621c93169a310d20421a8dad49 /src/game/Object.cpp
parent09b386a78621d177b28df24ca9e13ee25e6d042b (diff)
*Fix the bug that warlock pet is not shown in stat window.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index e3c69da5007..6eae3de5f33 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1914,9 +1914,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->SetCreatorGUID(GetGUID());
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction());
- // this enables pet details window (Shift+P)
- pet->GetCharmInfo()->SetPetNumber(pet_number, false);
-
pet->setPowerType(POWER_MANA);
pet->SetUInt32Value(UNIT_NPC_FLAGS , 0);
pet->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
@@ -1927,9 +1924,11 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
switch(petType)
{
case POSSESSED_PET:
- pet->SetUInt32Value(UNIT_FIELD_FLAGS,0);
+ pet->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
break;
case SUMMON_PET:
+ // this enables pet details window (Shift+P)
+ pet->GetCharmInfo()->SetPetNumber(pet_number, true);
pet->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
pet->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);