mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Groups: Allow to configure the way in which instance reset message is sent, to the whole party (not blizzlike) or not.
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
This commit is contained in:
@@ -1943,10 +1943,22 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo)
|
||||
|
||||
if (SendMsgTo)
|
||||
{
|
||||
if (isEmpty)
|
||||
SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId());
|
||||
else
|
||||
if (!isEmpty)
|
||||
SendMsgTo->SendResetInstanceFailed(0, instanceSave->GetMapId());
|
||||
else if (sWorld->getBoolConfig(CONFIG_INSTANCES_RESET_ANNOUNCE))
|
||||
{
|
||||
if (Group* group = SendMsgTo->GetGroup())
|
||||
{
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
if (Player* player = itr->GetSource())
|
||||
player->SendResetInstanceSuccess(instanceSave->GetMapId());
|
||||
}
|
||||
|
||||
else
|
||||
SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId());
|
||||
}
|
||||
else
|
||||
SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId());
|
||||
}
|
||||
|
||||
if (isEmpty || method == INSTANCE_RESET_GROUP_DISBAND || method == INSTANCE_RESET_CHANGE_DIFFICULTY)
|
||||
|
||||
@@ -1206,6 +1206,9 @@ void World::LoadConfigSettings(bool reload)
|
||||
// Max instances per hour
|
||||
m_int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetIntDefault("AccountInstancesPerHour", 5);
|
||||
|
||||
// Anounce reset of instance to whole party
|
||||
m_bool_configs[CONFIG_INSTANCES_RESET_ANNOUNCE] = sConfigMgr->GetBoolDefault("InstancesResetAnnounce", false);
|
||||
|
||||
// AutoBroadcast
|
||||
m_bool_configs[CONFIG_AUTOBROADCAST] = sConfigMgr->GetBoolDefault("AutoBroadcast.On", false);
|
||||
m_int_configs[CONFIG_AUTOBROADCAST_CENTER] = sConfigMgr->GetIntDefault("AutoBroadcast.Center", 0);
|
||||
|
||||
@@ -160,6 +160,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_UI_QUESTLEVELS_IN_DIALOGS, // Should we add quest levels to the title in the NPC dialogs?
|
||||
CONFIG_EVENT_ANNOUNCE,
|
||||
CONFIG_STATS_LIMITS_ENABLE,
|
||||
CONFIG_INSTANCES_RESET_ANNOUNCE,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -906,6 +906,13 @@ Instance.ResetTimeHour = 4
|
||||
|
||||
Instance.UnloadDelay = 1800000
|
||||
|
||||
#
|
||||
# InstancesResetAnnounce
|
||||
# Description: Announce the reset of one instance to whole party.
|
||||
# Default: false - (Disabled, don't show, blizzlike)
|
||||
# true - (Enabled, show)
|
||||
|
||||
InstancesResetAnnounce = false
|
||||
#
|
||||
# Quests.LowLevelHideDiff
|
||||
# Description: Level difference between player and quest level at which quests are
|
||||
@@ -1213,7 +1220,6 @@ Warden.BanDuration = 86400
|
||||
###################################################################################################
|
||||
# PLAYER INTERACTION
|
||||
#
|
||||
#
|
||||
# AllowTwoSide.Interaction.Calendar
|
||||
# Description: Allow calendar invites between factions.
|
||||
# Default: 0 - (Disabled)
|
||||
@@ -2639,7 +2645,6 @@ UI.ShowQuestLevelsInDialogs = 0
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
#
|
||||
# LOGGING SYSTEM SETTINGS
|
||||
#
|
||||
# Appender config values: Given a appender "name"
|
||||
@@ -2828,7 +2833,6 @@ Log.Async.Enable = 0
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
#
|
||||
# PACKET SPOOF PROTECTION SETTINGS
|
||||
#
|
||||
# These settings determine which action to take when harmful packet spoofing is detected.
|
||||
|
||||
Reference in New Issue
Block a user