Skip to content

Commit

Permalink
[11784] Fix restoring of phase mask when turning gm off
Browse files Browse the repository at this point in the history
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
  • Loading branch information
Vinolentus authored and Schmoozerd committed Sep 4, 2011
1 parent 3495e25 commit 7f607bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/game/Player.cpp
Expand Up @@ -2342,7 +2342,7 @@ struct SetGameMasterOffHelper

void Player::SetGameMaster(bool on)
{
if(on)
if (on)
{
m_ExtraFlags |= PLAYER_EXTRA_GM_ON;
setFaction(35);
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11783"
#define REVISION_NR "11784"
#endif // __REVISION_NR_H__

0 comments on commit 7f607bb

Please sign in to comment.