mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Modify pet leveling-logic slightly, making sure it'll pass up 5 FULL levels when tamed/unstabled
+ set XP to 0 if dropped DOWN to playerlevel (antihack with no excess XP allowed, thank you!) Disclaimer: No pets were harmed (much) during these changes - no need to call PETA! --HG-- branch : trunk
This commit is contained in:
@@ -2000,13 +2000,13 @@ void Pet::SynchronizeLevelWithOwner()
|
||||
{
|
||||
GivePetLevel(owner->getLevel());
|
||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel())/5);
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP)-1);
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
||||
}
|
||||
if (getLevel() < owner->getLevel()-5)
|
||||
{
|
||||
GivePetLevel(owner->getLevel()-5);
|
||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(owner->getLevel()-5)/5);
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP)-1);
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user