mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11771] Avoid happines overflow in HandlePetAbandon :)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
cb685b3214
commit
336ebaa24a
2 changed files with 2 additions and 5 deletions
|
|
@ -553,10 +553,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recv_data)
|
|||
if (pet->IsPet())
|
||||
{
|
||||
if (pet->GetObjectGuid() == _player->GetPetGuid())
|
||||
{
|
||||
uint32 feelty = pet->GetPower(POWER_HAPPINESS);
|
||||
pet->SetPower(POWER_HAPPINESS, (feelty - 50000) > 0 ? (feelty - 50000) : 0);
|
||||
}
|
||||
pet->ModifyPower(POWER_HAPPINESS, -50000);
|
||||
|
||||
((Pet*)pet)->Unsummon(PET_SAVE_AS_DELETED, _player);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11770"
|
||||
#define REVISION_NR "11771"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue