Add GMSummonPlayer Config Option (#643)

This commit is contained in:
StygianTheBest
2017-09-19 14:30:23 -04:00
committed by Yehonal
parent d19b61a755
commit 209bc50ef5
4 changed files with 20 additions and 6 deletions
+1
View File
@@ -858,6 +858,7 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_INSTANCE_IGNORE_LEVEL] = sConfigMgr->GetBoolDefault("Instance.IgnoreLevel", false); m_bool_configs[CONFIG_INSTANCE_IGNORE_LEVEL] = sConfigMgr->GetBoolDefault("Instance.IgnoreLevel", false);
m_bool_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfigMgr->GetBoolDefault("Instance.IgnoreRaid", false); m_bool_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfigMgr->GetBoolDefault("Instance.IgnoreRaid", false);
m_bool_configs[CONFIG_INSTANCE_GMSUMMON_PLAYER] = sConfigMgr->GetBoolDefault("Instance.GMSummonPlayer", false);
m_bool_configs[CONFIG_INSTANCE_SHARED_ID] = sConfigMgr->GetBoolDefault("Instance.SharedNormalHeroicId", false); m_bool_configs[CONFIG_INSTANCE_SHARED_ID] = sConfigMgr->GetBoolDefault("Instance.SharedNormalHeroicId", false);
m_int_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfigMgr->GetIntDefault("Instance.ResetTimeHour", 4); m_int_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfigMgr->GetIntDefault("Instance.ResetTimeHour", 4);
+1
View File
@@ -93,6 +93,7 @@ enum WorldBoolConfigs
CONFIG_INSTANT_TAXI, CONFIG_INSTANT_TAXI,
CONFIG_INSTANCE_IGNORE_LEVEL, CONFIG_INSTANCE_IGNORE_LEVEL,
CONFIG_INSTANCE_IGNORE_RAID, CONFIG_INSTANCE_IGNORE_RAID,
CONFIG_INSTANCE_GMSUMMON_PLAYER,
CONFIG_INSTANCE_SHARED_ID, CONFIG_INSTANCE_SHARED_ID,
CONFIG_GM_LOG_TRADE, CONFIG_GM_LOG_TRADE,
CONFIG_ALLOW_GM_GROUP, CONFIG_ALLOW_GM_GROUP,
+4
View File
@@ -687,6 +687,9 @@ public:
return false; return false;
} }
else if (map->IsDungeon()) else if (map->IsDungeon())
{
// Allow GM to summon players or only other GM accounts inside instances.
if (!sWorld->getBoolConfig(CONFIG_INSTANCE_GMSUMMON_PLAYER))
{ {
// pussywizard: prevent unbinding normal player's perm bind by just summoning him >_> // pussywizard: prevent unbinding normal player's perm bind by just summoning him >_>
if (!target->GetSession()->GetSecurity()) if (!target->GetSession()->GetSecurity())
@@ -695,6 +698,7 @@ public:
handler->SetSentErrorMessage(true); handler->SetSentErrorMessage(true);
return false; return false;
} }
}
Map* destMap = target->GetMap(); Map* destMap = target->GetMap();
+8
View File
@@ -1198,6 +1198,14 @@ Instance.IgnoreLevel = 0
Instance.IgnoreRaid = 0 Instance.IgnoreRaid = 0
#
# Instance.GMSummonPlayer
# Description: Allow GM to summon players or only other GM accounts inside instances.
# Default: 0 - (Disabled, Only GM accounts can be summoned by GM)
# 1 - (Enabled, GM and Player accounts can be summoned by GM)
Instance.GMSummonPlayer = 0
# #
# Instance.ResetTimeHour # Instance.ResetTimeHour
# Description: Hour of the day when the global instance reset occurs. # Description: Hour of the day when the global instance reset occurs.