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
  • Loading branch information
Treeston committed Feb 19, 2016
2 parents f2ab246 + 1134b5e commit 3e250fe
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/MiscHandler.cpp
Expand Up @@ -1203,7 +1203,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recvData)
WorldPacket data(SMSG_INSPECT_TALENT, guid_size+4+talent_points);
data << player->GetPackGUID();

if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->IsGameMaster())
if (GetPlayer()->CanBeGameMaster() || sWorld->getIntConfig(CONFIG_TALENTS_INSPECTING) + (GetPlayer()->GetTeamId() == player->GetTeamId()) > 1)
player->BuildPlayerTalentsInfoData(&data);
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/World/World.cpp
Expand Up @@ -1003,7 +1003,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 @@ -113,7 +113,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 @@ -358,6 +357,7 @@ enum WorldIntConfigs
CONFIG_NO_GRAY_AGGRO_BELOW,
CONFIG_AUCTION_GETALL_DELAY,
CONFIG_AUCTION_SEARCH_DELAY,
CONFIG_TALENTS_INSPECTING,
INT_CONFIG_VALUE_COUNT
};

Expand Down
9 changes: 5 additions & 4 deletions src/server/worldserver/worldserver.conf.dist
Expand Up @@ -1354,10 +1354,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 3e250fe

Please sign in to comment.