diff options
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r-- | src/game/Pet.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 5bb5be55908..981f864136c 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -40,7 +40,7 @@ char const* petTypeSuffix[MAX_PET_TYPE] = "'s Companion" // MINI_PET }; -#define PET_XP_FACTOR 0.1f +#define PET_XP_FACTOR 0.05f Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner), m_petType(type), m_removed(false), m_happinessTimer(7500), m_duration(0), @@ -215,7 +215,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool case HUNTER_PET: 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); + SetByteFlag(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_CAN_BE_ABANDONED : UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED); SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); // this enables popup window (pet abandon, cancel) @@ -420,7 +420,7 @@ void Pet::SavePetToDB(PetSaveMode mode) << uint32(GetReactState()) << ", " << uint32(mode) << ", '" << name.c_str() << "', " - << uint32((GetByteValue(UNIT_FIELD_BYTES_2, 2) == UNIT_RENAME_ALLOWED)?0:1) << ", " + << uint32(HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ? 0 : 1) << ", " << curhealth << ", " << curmana << ", " << GetPower(POWER_HAPPINESS) << ", '"; @@ -785,7 +785,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) { SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100); SetSheath(SHEATH_STATE_MELEE); - SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED); + SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED); SetUInt32Value(UNIT_MOD_CAST_SPEED, creature->GetUInt32Value(UNIT_MOD_CAST_SPEED)); } return true; @@ -1949,7 +1949,7 @@ void Pet::SynchronizeLevelWithOwner() if (getLevel() > owner->getLevel()) { GivePetLevel(owner->getLevel()); - SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel())/4); + SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel())/5); SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP)-1); } break; |