Jump to content

Gorlum

Members
  • Posts

    1
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Gorlum's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Saves/Sets GM visibility mode on login/logout mangos.conf GM.Visible GM visibility at login Default: 2 (last save state) 0 (invisible) 1 (visible) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index f0b05b4..e68a786 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14569,6 +14569,17 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) break; } + switch(sWorld.getConfig(CONFIG_GM_VISIBLE_STATE)) + { + default: + case 0: SetGMVisible(false); break; // invisible + case 1: break; // visible + case 2: // save state + if(extraflags & PLAYER_EXTRA_GM_INVISIBLE) + SetGMVisible(false); + break; + } + switch(sWorld.getConfig(CONFIG_GM_ACCEPT_TICKETS)) { default: diff --git a/src/game/World.cpp b/src/game/World.cpp index ea59448..fe902cf 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -810,6 +810,7 @@ void World::LoadConfigSettings(bool reload) } m_configs[CONFIG_GM_LOGIN_STATE] = sConfig.GetIntDefault("GM.LoginState", 2); + m_configs[CONFIG_GM_VISIBLE_STATE] = sConfig.GetIntDefault("GM.Visible", 2); m_configs[CONFIG_GM_ACCEPT_TICKETS] = sConfig.GetIntDefault("GM.AcceptTickets", 2); m_configs[CONFIG_GM_CHAT] = sConfig.GetIntDefault("GM.Chat", 2); m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo", 2); diff --git a/src/game/World.h b/src/game/World.h index 27f81d8..7cc31dd 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -122,6 +122,7 @@ enum WorldConfigs CONFIG_MAX_PRIMARY_TRADE_SKILL, CONFIG_MIN_PETITION_SIGNS, CONFIG_GM_LOGIN_STATE, + CONFIG_GM_VISIBLE_STATE, CONFIG_GM_ACCEPT_TICKETS, CONFIG_GM_CHAT, CONFIG_GM_WISPERING_TO, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 4f42a18..cc0aa13 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -833,6 +833,12 @@ Channel.SilentlyGMJoin = 0 # 0 (disable) # 1 (enable) # +# GM.Visible +# GM visibility at login +# Default: 2 (last save state) +# 0 (invisible) +# 1 (visible) +# # GM.AcceptTickets # Is GM accepting tickets from player by default or not. # Default: 2 (last save state) @@ -883,6 +889,7 @@ Channel.SilentlyGMJoin = 0 ################################################################################################################### GM.LoginState = 2 +GM.Visible = 2 GM.AcceptTickets = 2 GM.Chat = 2 GM.WhisperingTo = 2
×
×
  • 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