*Set pet level up xp from 1/4 of owner xp to 1/10.
--HG-- branch : trunk
This commit is contained in:
+5
-3
@@ -39,6 +39,8 @@ char const* petTypeSuffix[MAX_PET_TYPE] =
|
|||||||
"'s Companion" // MINI_PET
|
"'s Companion" // MINI_PET
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define PET_XP_FACTOR 0.1f
|
||||||
|
|
||||||
Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner),
|
Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner),
|
||||||
m_petType(type), m_removed(false), m_happinessTimer(7500), m_duration(0),
|
m_petType(type), m_removed(false), m_happinessTimer(7500), m_duration(0),
|
||||||
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraRaidUpdateMask(0), m_loading(false),
|
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraRaidUpdateMask(0), m_loading(false),
|
||||||
@@ -666,7 +668,7 @@ void Pet::GivePetXP(uint32 xp)
|
|||||||
newXP -= nextLvlXP;
|
newXP -= nextLvlXP;
|
||||||
|
|
||||||
SetLevel( level + 1 );
|
SetLevel( level + 1 );
|
||||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)/4);
|
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR);
|
||||||
|
|
||||||
level = getLevel();
|
level = getLevel();
|
||||||
nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP);
|
nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP);
|
||||||
@@ -725,7 +727,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||||||
setPowerType(POWER_FOCUS);
|
setPowerType(POWER_FOCUS);
|
||||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
|
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
|
||||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
||||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(creature->getLevel())/4);
|
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(creature->getLevel())*PET_XP_FACTOR);
|
||||||
SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||||
|
|
||||||
if(CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
|
if(CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
|
||||||
@@ -850,7 +852,7 @@ bool Guardian::InitStatsForLevel(uint32 petlevel)
|
|||||||
}
|
}
|
||||||
case HUNTER_PET:
|
case HUNTER_PET:
|
||||||
{
|
{
|
||||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(petlevel)/4);
|
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(petlevel)*PET_XP_FACTOR);
|
||||||
//these formula may not be correct; however, it is designed to be close to what it should be
|
//these formula may not be correct; however, it is designed to be close to what it should be
|
||||||
//this makes dps 0.5 of pets level
|
//this makes dps 0.5 of pets level
|
||||||
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)) );
|
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)) );
|
||||||
|
|||||||
Reference in New Issue
Block a user