diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 11 | ||||
-rw-r--r-- | src/game/World.cpp | 1 | ||||
-rw-r--r-- | src/game/World.h | 1 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 7 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4ebd4f03684..fcdeb30a42d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14338,6 +14338,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_CHAT)) { default: diff --git a/src/game/World.cpp b/src/game/World.cpp index a58103ef437..7517fb0b96d 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -762,6 +762,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_CHAT] = sConfig.GetIntDefault("GM.Chat",2); m_configs[CONFIG_GM_WISPERING_TO] = sConfig.GetIntDefault("GM.WhisperingTo",2); m_configs[CONFIG_GM_IN_GM_LIST] = sConfig.GetBoolDefault("GM.InGMList",false); diff --git a/src/game/World.h b/src/game/World.h index 27052cf7966..01586b592e1 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -123,6 +123,7 @@ enum WorldConfigs CONFIG_MAX_PRIMARY_TRADE_SKILL, CONFIG_MIN_PETITION_SIGNS, CONFIG_GM_LOGIN_STATE, + CONFIG_GM_VISIBLE_STATE, CONFIG_GM_CHAT, CONFIG_GM_WISPERING_TO, CONFIG_GM_IN_GM_LIST, diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 86f2d994f25..ffb5f311bb8 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -847,6 +847,12 @@ Channel.SilentlyGMJoin = 0 # 0 (disable) # 1 (enable) # +# GM.Visible +# GM visibility at login +# Default: 2 (last save state) +# 0 (invisible) +# 1 (visible) +# # GM.Chat # GM chat mode at login # Default: 2 (last save state) @@ -881,6 +887,7 @@ Channel.SilentlyGMJoin = 0 ################################################################################################################### GM.LoginState = 2 +GM.Visible = 2 GM.Chat = 2 GM.WhisperingTo = 2 GM.InGMList = 0 |