Jump to content

[11784] fix gm phasemask restoring


Guest Vinolentus

Recommended Posts

* What bug does the patch fix? What features does the patch add?

Correct phasemask was not applied due to Player::SetPhaseMask() check. We should firstly remove GM extraflag.

* For which repository revision was the patch created?

11778

* Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

Did not find any.

* Who has been writing this patch? Please include either forum user names or email addresses.

Me.

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 75432f3..4cd5b8c 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -2437,17 +2437,18 @@ void Player::SetGameMaster(bool on)
    }
    else
    {
+        m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON;
+
        // 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);


Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use