Skip to content

Commit

Permalink
Merge pull request #16633 from Treeston/3.3.5-talentinspect
Browse files Browse the repository at this point in the history
Core/Packets: Adjust 'TalentsInspecting' option
(cherry picked from commit 3e250fe)
  • Loading branch information
Treeston authored and Shauren committed Apr 8, 2016
1 parent c20ad18 commit aca9efc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/server/game/Handlers/InspectHandler.cpp
Expand Up @@ -50,7 +50,7 @@ void WorldSession::HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect)
inspectResult.ClassID = player->getClass();
inspectResult.GenderID = player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER);

if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || GetPlayer()->IsGameMaster())
if (GetPlayer()->CanBeGameMaster() || sWorld->getIntConfig(CONFIG_TALENTS_INSPECTING) + (GetPlayer()->GetTeamId() == player->GetTeamId()) > 1)
{
PlayerTalentMap const* talents = player->GetTalentMap(player->GetActiveTalentGroup());
for (PlayerTalentMap::value_type const& v : *talents)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/World/World.cpp
Expand Up @@ -1106,7 +1106,7 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_DETECT_POS_COLLISION] = sConfigMgr->GetBoolDefault("DetectPosCollision", true);

m_bool_configs[CONFIG_RESTRICTED_LFG_CHANNEL] = sConfigMgr->GetBoolDefault("Channel.RestrictedLfg", true);
m_bool_configs[CONFIG_TALENTS_INSPECTING] = sConfigMgr->GetBoolDefault("TalentsInspecting", true);
m_int_configs[CONFIG_TALENTS_INSPECTING] = sConfigMgr->GetIntDefault("TalentsInspecting", 1);
m_bool_configs[CONFIG_CHAT_FAKE_MESSAGE_PREVENTING] = sConfigMgr->GetBoolDefault("ChatFakeMessagePreventing", false);
m_int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY] = sConfigMgr->GetIntDefault("ChatStrictLinkChecking.Severity", 0);
m_int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_KICK] = sConfigMgr->GetIntDefault("ChatStrictLinkChecking.Kick", 0);
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/World/World.h
Expand Up @@ -123,7 +123,6 @@ enum WorldBoolConfigs
CONFIG_QUEST_IGNORE_RAID,
CONFIG_DETECT_POS_COLLISION,
CONFIG_RESTRICTED_LFG_CHANNEL,
CONFIG_TALENTS_INSPECTING,
CONFIG_CHAT_FAKE_MESSAGE_PREVENTING,
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP,
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE,
Expand Down Expand Up @@ -374,6 +373,7 @@ enum WorldIntConfigs
CONFIG_CHARTER_COST_ARENA_5v5,
CONFIG_NO_GRAY_AGGRO_ABOVE,
CONFIG_NO_GRAY_AGGRO_BELOW,
CONFIG_TALENTS_INSPECTING,
INT_CONFIG_VALUE_COUNT
};

Expand Down
9 changes: 5 additions & 4 deletions src/server/worldserver/worldserver.conf.dist
Expand Up @@ -1373,10 +1373,11 @@ AllowTwoSide.Trade = 0

#
# TalentsInspecting
# Description: Allow inspecting characters from the opposing faction.
# Doesn't affect characters in gamemaster mode.
# Default: 1 - (Enabled)
# 0 - (Disabled)
# Description: Allow/disallow inspecting other characters' talents.
# Doesn't affect game master accounts.
# 2 - (Enabled for all characters)
# Default: 1 - (Enabled for characters of the same faction)
# 0 - (Talent inspecting is disabled)

TalentsInspecting = 1

Expand Down

0 comments on commit aca9efc

Please sign in to comment.