diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 42ba06341..bc1778a85 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2073,11 +2073,17 @@ void Player::SetGameMaster(bool on) setFaction(35); SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM); + if (Pet* pet = GetPet()) + { + pet->setFaction(35); + pet->getHostilRefManager().setOnlineOfflineState(false); + } + RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP); ResetContestedPvP(); getHostilRefManager().setOnlineOfflineState(false); - CombatStop(); + CombatStopWithPets(); SetPhaseMask(PHASEMASK_ANYWHERE,false); // see and visible in all phases } @@ -2091,6 +2097,12 @@ void Player::SetGameMaster(bool on) setFactionForRace(getRace()); RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM); + if (Pet* pet = GetPet()) + { + pet->setFaction(getFaction()); + pet->getHostilRefManager().setOnlineOfflineState(true); + } + // restore FFA PvP Server state if(sWorld.IsFFAPvPRealm()) SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 15354fd4b..cb15c2ea9 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7841" + #define REVISION_NR "7842" #endif // __REVISION_NR_H__