mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7877] Correctly set totem PvP state at loading and owner PvP state change, including GM totem case.
* Also set PvP state in proper way at pet loading if owner in PvP state.
This commit is contained in:
parent
e0e5ed7bd8
commit
bc4611e8c0
6 changed files with 42 additions and 20 deletions
|
|
@ -211,6 +211,9 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
|
|||
sLog.outError("Pet have incorrect type (%u) for pet loading.", getPetType());
|
||||
}
|
||||
|
||||
if(owner->IsPvP())
|
||||
SetPvP(true);
|
||||
|
||||
InitStatsForLevel(petlevel);
|
||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue