aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Pet.cpp4
-rw-r--r--src/game/Unit.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 18b2de26c70..89979ef439a 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -204,12 +204,12 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
case SUMMON_PET:
petlevel=owner->getLevel();
- SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
+ SetUInt32Value(UNIT_FIELD_BYTES_0, 0x800); //class=mage
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
// this enables popup window (pet dismiss, cancel)
break;
case HUNTER_PET:
- SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
+ SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100); //class=warrior,gender=none,power=focus
SetSheath(SHEATH_STATE_MELEE);
SetByteValue(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_RENAME_NOT_ALLOWED : UNIT_RENAME_ALLOWED);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e845dff66cf..391e726596f 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13669,7 +13669,7 @@ void Unit::SetCharmedBy(Unit* charmer, CharmType type)
if(cinfo && cinfo->type == CREATURE_TYPE_DEMON)
{
//to prevent client crash
- //SetFlag(UNIT_FIELD_BYTES_0, 2048);
+ SetByteValue(UNIT_FIELD_BYTES_0, 1, (uint8)CLASS_MAGE);
//just to enable stat window
if(GetCharmInfo())
@@ -13764,6 +13764,7 @@ void Unit::RemoveCharmedBy(Unit *charmer)
CreatureInfo const *cinfo = ((Creature*)this)->GetCreatureInfo();
if(cinfo && cinfo->type == CREATURE_TYPE_DEMON)
{
+ SetByteValue(UNIT_FIELD_BYTES_0, 1, uint8(cinfo->unit_class));
if(GetCharmInfo())
GetCharmInfo()->SetPetNumber(0, true);
else