mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11784] Fix restoring of phase mask when turning gm off
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
aa40cf687f
commit
dc932024ab
2 changed files with 6 additions and 6 deletions
|
|
@ -2342,7 +2342,7 @@ struct SetGameMasterOffHelper
|
|||
|
||||
void Player::SetGameMaster(bool on)
|
||||
{
|
||||
if(on)
|
||||
if (on)
|
||||
{
|
||||
m_ExtraFlags |= PLAYER_EXTRA_GM_ON;
|
||||
setFaction(35);
|
||||
|
|
@ -2360,14 +2360,14 @@ void Player::SetGameMaster(bool on)
|
|||
}
|
||||
else
|
||||
{
|
||||
// restore phase
|
||||
AuraList const& phases = GetAurasByType(SPELL_AURA_PHASE);
|
||||
SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
|
||||
m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON;
|
||||
setFactionForRace(getRace());
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
|
||||
|
||||
// restore phase
|
||||
AuraList const& phases = GetAurasByType(SPELL_AURA_PHASE);
|
||||
SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : PHASEMASK_NORMAL,false);
|
||||
|
||||
CallForAllControlledUnits(SetGameMasterOffHelper(getFaction()), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
|
||||
// restore FFA PvP Server state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue