mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[7161] Implemented configurable option to allow/disallow achievements gain for GMs.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
94d064be6f
commit
475e8cbcf6
5 changed files with 22 additions and 10 deletions
|
|
@ -325,6 +325,10 @@ void AchievementMgr::CheckAllAchievementCriteria()
|
||||||
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, Unit *unit, uint32 time)
|
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, Unit *unit, uint32 time)
|
||||||
{
|
{
|
||||||
sLog.outDetail("AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time);
|
sLog.outDetail("AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time);
|
||||||
|
|
||||||
|
if (!sWorld.getConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
|
AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
|
||||||
for(AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
|
for(AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -799,6 +799,7 @@ void World::LoadConfigSettings(bool reload)
|
||||||
m_configs[CONFIG_START_GM_LEVEL] = MAX_LEVEL;
|
m_configs[CONFIG_START_GM_LEVEL] = MAX_LEVEL;
|
||||||
}
|
}
|
||||||
m_configs[CONFIG_GM_LOWER_SECURITY] = sConfig.GetBoolDefault("GM.LowerSecurity", false);
|
m_configs[CONFIG_GM_LOWER_SECURITY] = sConfig.GetBoolDefault("GM.LowerSecurity", false);
|
||||||
|
m_configs[CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS] = sConfig.GetBoolDefault("GM.AllowAchievementGain", true);
|
||||||
|
|
||||||
m_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("Visibility.GroupMode",0);
|
m_configs[CONFIG_GROUP_VISIBILITY] = sConfig.GetIntDefault("Visibility.GroupMode",0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ enum WorldConfigs
|
||||||
CONFIG_GM_LOG_TRADE,
|
CONFIG_GM_LOG_TRADE,
|
||||||
CONFIG_START_GM_LEVEL,
|
CONFIG_START_GM_LEVEL,
|
||||||
CONFIG_GM_LOWER_SECURITY,
|
CONFIG_GM_LOWER_SECURITY,
|
||||||
|
CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS,
|
||||||
CONFIG_GROUP_VISIBILITY,
|
CONFIG_GROUP_VISIBILITY,
|
||||||
CONFIG_MAIL_DELIVERY_DELAY,
|
CONFIG_MAIL_DELIVERY_DELAY,
|
||||||
CONFIG_UPTIME_UPDATE,
|
CONFIG_UPTIME_UPDATE,
|
||||||
|
|
|
||||||
|
|
@ -875,17 +875,23 @@ Channel.SilentlyGMJoin = 0
|
||||||
# Default: 0 (disable)
|
# Default: 0 (disable)
|
||||||
# 1 (enable)
|
# 1 (enable)
|
||||||
#
|
#
|
||||||
|
# GM.AllowAchievementGain
|
||||||
|
# If enabled it allows gaining achievements for GM characters
|
||||||
|
# Default: 0 (disable)
|
||||||
|
# 1 (enable) (default)
|
||||||
|
#
|
||||||
###################################################################################################################
|
###################################################################################################################
|
||||||
|
|
||||||
GM.LoginState = 2
|
GM.LoginState = 2
|
||||||
GM.AcceptTickets = 2
|
GM.AcceptTickets = 2
|
||||||
GM.Chat = 2
|
GM.Chat = 2
|
||||||
GM.WhisperingTo = 2
|
GM.WhisperingTo = 2
|
||||||
GM.InGMList = 0
|
GM.InGMList = 0
|
||||||
GM.InWhoList = 0
|
GM.InWhoList = 0
|
||||||
GM.LogTrade = 1
|
GM.LogTrade = 1
|
||||||
GM.StartLevel = 1
|
GM.StartLevel = 1
|
||||||
GM.LowerSecurity = 0
|
GM.LowerSecurity = 0
|
||||||
|
GM.AllowAchievementGain = 1
|
||||||
|
|
||||||
###################################################################################################################
|
###################################################################################################################
|
||||||
# VISIBILITY AND RADIUSES
|
# VISIBILITY AND RADIUSES
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7160"
|
#define REVISION_NR "7161"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue