From 34044d0d50c8e1eccbfe20b253d515802b78c8b4 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:56:49 +0200 Subject: [PATCH 01/11] fix(DB/Creature): make sure The Crone can no longer be disarmed or interrupted (#16956) initial make sure she can cast her CL Co-authored-by: Benjamin Jackson <20357406+Maria-sequel@users.noreply.github.com> --- data/sql/updates/pending_db_world/the-crone-interrupt.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/the-crone-interrupt.sql diff --git a/data/sql/updates/pending_db_world/the-crone-interrupt.sql b/data/sql/updates/pending_db_world/the-crone-interrupt.sql new file mode 100644 index 000000000..49761ab7f --- /dev/null +++ b/data/sql/updates/pending_db_world/the-crone-interrupt.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|4|33554432 WHERE `entry` = 18168; From b31a1a875b19d61402fb00e256078ac8cb134773 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 8 Aug 2023 11:59:14 +0000 Subject: [PATCH 02/11] chore(DB): import pending files Referenced commit(s): 34044d0d50c8e1eccbfe20b253d515802b78c8b4 --- .../the-crone-interrupt.sql => db_world/2023_08_08_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/the-crone-interrupt.sql => db_world/2023_08_08_00.sql} (72%) diff --git a/data/sql/updates/pending_db_world/the-crone-interrupt.sql b/data/sql/updates/db_world/2023_08_08_00.sql similarity index 72% rename from data/sql/updates/pending_db_world/the-crone-interrupt.sql rename to data/sql/updates/db_world/2023_08_08_00.sql index 49761ab7f..bb8c9fa13 100644 --- a/data/sql/updates/pending_db_world/the-crone-interrupt.sql +++ b/data/sql/updates/db_world/2023_08_08_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_08_07_00 -> 2023_08_08_00 -- UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|4|33554432 WHERE `entry` = 18168; From 026fe7c9627c01d10c674c6de5936ad2c1d0c94f Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:11:41 +0200 Subject: [PATCH 03/11] fix(Core/Pets): Hunter pet scaling (#16959) * fix(Core/Pets): Hunter pet scaling * Fix pet scaling to properly take DBC data * Edge case for Devilsaur where the DBC data is whack, therefore we use Spirit Beast data instead * updated scale calculation based on client function (https://github.com/The-Cataclysm-Preservation-Project/TrinityCore/commit/f09564b9d01ff372506f76f2345b99e3485738d5) Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com> * fix gcc --------- Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com> --- src/server/game/Entities/Pet/Pet.cpp | 48 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 7f3fd9e6f..8a29cc2af 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -2480,34 +2480,34 @@ Player* Pet::GetOwner() const float Pet::GetNativeObjectScale() const { - CreatureFamilyEntry const* creatureFamily = sCreatureFamilyStore.LookupEntry(GetCreatureTemplate()->family); - if (creatureFamily && creatureFamily->minScale > 0.0f && getPetType() == HUNTER_PET) - { - float scale; - if (GetLevel() >= creatureFamily->maxScaleLevel) - scale = creatureFamily->maxScale; - else if (GetLevel() <= creatureFamily->minScaleLevel) - scale = creatureFamily->minScale; - else - scale = creatureFamily->minScale + float(GetLevel() - creatureFamily->minScaleLevel) / creatureFamily->maxScaleLevel * (creatureFamily->maxScale - creatureFamily->minScale); + uint8 ctFamily = GetCreatureTemplate()->family; - if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId())) - { - if (displayInfo->scale > 1.f && GetCreatureTemplate()->IsExotic()) - { - // Exotic pets have a scale of 1 - scale = 1.0f; - } - else - { - scale *= displayInfo->scale; - } - } + // hackfix: Edge case where DBC scale values for DEVILSAUR pets make them too small. + // Therefore we take data from spirit beast instead. + if (ctFamily && ctFamily == CREATURE_FAMILY_DEVILSAUR) + ctFamily = CREATURE_FAMILY_SPIRIT_BEAST; + + CreatureFamilyEntry const* creatureFamily = sCreatureFamilyStore.LookupEntry(ctFamily); + if (creatureFamily && creatureFamily->minScale > 0.0f && getPetType() & HUNTER_PET) + { + float minScaleLevel = creatureFamily->minScaleLevel; + uint8 level = getLevel(); + + float minLevelScaleMod = level >= minScaleLevel ? (level / minScaleLevel) : 0.0f; + float maxScaleMod = creatureFamily->maxScaleLevel - minScaleLevel; + + if (minLevelScaleMod > maxScaleMod) + minLevelScaleMod = maxScaleMod; + + float scaleMod = creatureFamily->maxScaleLevel != minScaleLevel ? minLevelScaleMod / maxScaleMod : 0.f; + + float scale = (creatureFamily->maxScale - creatureFamily->minScale) * scaleMod + creatureFamily->minScale; return scale; } - // Fallback value if the conditions are not met - return 1.0f; + + // take value for non-hunter pets from DB + return Guardian::GetNativeObjectScale(); } std::string Pet::GenerateActionBarData() const From 78a2f5ef8dcfea60d1bcc227f6a9374b994ac23e Mon Sep 17 00:00:00 2001 From: Maria-sequel <20357406+Maria-sequel@users.noreply.github.com> Date: Wed, 9 Aug 2023 04:45:55 +0200 Subject: [PATCH 04/11] fix(DB/Creature): Infernal Warbringer immune to horror (#16961) --- data/sql/updates/pending_db_world/infernalwarbringer.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/infernalwarbringer.sql diff --git a/data/sql/updates/pending_db_world/infernalwarbringer.sql b/data/sql/updates/pending_db_world/infernalwarbringer.sql new file mode 100644 index 000000000..93c79103f --- /dev/null +++ b/data/sql/updates/pending_db_world/infernalwarbringer.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|8388608 WHERE `entry` = 19261; From f5e555082ec54149c486ec100e984ea0cacb3687 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 8 Aug 2023 23:48:20 -0300 Subject: [PATCH 05/11] =?UTF-8?q?fix(Core/Unit):=20Fix=20Arena=20Preparati?= =?UTF-8?q?on=20aura=20being=20removed=20on=20player=20ac=E2=80=A6=20(#169?= =?UTF-8?q?25)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Unit): Fix Arena Preparation aura being removed on player actions --- src/server/game/Entities/Unit/Unit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 42655fc62..2ca014e2e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4766,6 +4766,14 @@ void Unit::RemoveAura(AuraApplication* aurApp, AuraRemoveMode mode) { if (aurApp == iter->second) { + // Prevent Arena Preparation aura from being removed by player actions + // It's an invisibility spell so any interaction/spell cast etc. removes it. + // Should only be removed by the arena script, once the match starts. + if (aurApp->GetBase()->HasEffectType(SPELL_AURA_ARENA_PREPARATION)) + { + return; + } + RemoveAura(iter, mode); return; } From 8eeec45c59c7930fdc379da979fc4c04b2cc159c Mon Sep 17 00:00:00 2001 From: Maria-sequel <20357406+Maria-sequel@users.noreply.github.com> Date: Wed, 9 Aug 2023 04:48:46 +0200 Subject: [PATCH 06/11] fix(DB/Quest): Hellfire Fortifications adjustments (#16960) * fix(DB/Quest): Hellfire Fortifications daily should be available when exalted * add prequest --- data/sql/updates/pending_db_world/hellfirefort.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/hellfirefort.sql diff --git a/data/sql/updates/pending_db_world/hellfirefort.sql b/data/sql/updates/pending_db_world/hellfirefort.sql new file mode 100644 index 000000000..a0508d659 --- /dev/null +++ b/data/sql/updates/pending_db_world/hellfirefort.sql @@ -0,0 +1,4 @@ +-- +UPDATE `quest_template_addon` SET `RequiredMaxRepFaction` = 0, `RequiredMaxRepValue` = 0 WHERE `ID` IN (10106, 10110); +UPDATE `quest_template_addon` SET `PrevQuestID` = 10143 WHERE (`ID` = 13408); +UPDATE `quest_template_addon` SET `PrevQuestID` = 10124 WHERE (`ID` = 13409); From 47ae5eef50585e46c94b2d6dcb41294119c8db50 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 9 Aug 2023 02:51:50 +0000 Subject: [PATCH 07/11] chore(DB): import pending files Referenced commit(s): 8eeec45c59c7930fdc379da979fc4c04b2cc159c --- .../hellfirefort.sql => db_world/2023_08_09_00.sql} | 1 + .../infernalwarbringer.sql => db_world/2023_08_09_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/hellfirefort.sql => db_world/2023_08_09_00.sql} (86%) rename data/sql/updates/{pending_db_world/infernalwarbringer.sql => db_world/2023_08_09_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/hellfirefort.sql b/data/sql/updates/db_world/2023_08_09_00.sql similarity index 86% rename from data/sql/updates/pending_db_world/hellfirefort.sql rename to data/sql/updates/db_world/2023_08_09_00.sql index a0508d659..a70365d11 100644 --- a/data/sql/updates/pending_db_world/hellfirefort.sql +++ b/data/sql/updates/db_world/2023_08_09_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_08_08_00 -> 2023_08_09_00 -- UPDATE `quest_template_addon` SET `RequiredMaxRepFaction` = 0, `RequiredMaxRepValue` = 0 WHERE `ID` IN (10106, 10110); UPDATE `quest_template_addon` SET `PrevQuestID` = 10143 WHERE (`ID` = 13408); diff --git a/data/sql/updates/pending_db_world/infernalwarbringer.sql b/data/sql/updates/db_world/2023_08_09_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/infernalwarbringer.sql rename to data/sql/updates/db_world/2023_08_09_01.sql index 93c79103f..1127b9094 100644 --- a/data/sql/updates/pending_db_world/infernalwarbringer.sql +++ b/data/sql/updates/db_world/2023_08_09_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_08_09_00 -> 2023_08_09_01 -- UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|8388608 WHERE `entry` = 19261; From 1cd181f9234dfd4c666dcccf1a051978e73a78f4 Mon Sep 17 00:00:00 2001 From: Maria-sequel <20357406+Maria-sequel@users.noreply.github.com> Date: Wed, 9 Aug 2023 05:44:44 +0200 Subject: [PATCH 08/11] feat(Core/Config): Add Legacy Arena Points config option (#16940) * feat:(Core/Config): Add legacy Arena points option * Update IWorld.h * Update World.cpp * Update World.cpp * typo * Update worldserver.conf.dist * Update worldserver.conf.dist * Update World.cpp * Update World.cpp * defaults to true Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * config text Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * Update src/server/apps/worldserver/worldserver.conf.dist * Update src/server/apps/worldserver/worldserver.conf.dist * Update src/server/game/World/World.cpp --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com> --- src/server/apps/worldserver/worldserver.conf.dist | 8 ++++++++ src/server/game/Battlegrounds/ArenaTeam.cpp | 2 +- src/server/game/World/IWorld.h | 1 + src/server/game/World/World.cpp | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 4efa2d5db..9d809be86 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -948,6 +948,14 @@ MaxArenaPoints = 10000 StartArenaPoints = 0 +# +# Arena.LegacyArenaPoints +# Description: Use arena point calculation from TBC for season 1 - 5 when rating is less or equal to 1500 +# Default: 1 - (Enabled) +# 0 - (Disabled) + +Arena.LegacyArenaPoints = 0 + # # RecruitAFriend.MaxLevel # Description: Highest level up to which a character can benefit from the Recruit-A-Friend diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index fdcf3924a..a115b8fa8 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -658,7 +658,7 @@ uint32 ArenaTeam::GetPoints(uint32 memberRating) if (rating <= 1500) { - if (sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) < 6) + if (sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) < 6 && sWorld->getIntConfig(CONFIG_LEGACY_ARENA_POINTS_CALC)) points = (float)rating * 0.22f + 14.0f; else points = 344; diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 8e2a2f6a3..49c43555e 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -326,6 +326,7 @@ enum WorldIntConfigs CONFIG_ARENA_GAMES_REQUIRED, CONFIG_ARENA_SEASON_ID, CONFIG_ARENA_START_RATING, + CONFIG_LEGACY_ARENA_POINTS_CALC, CONFIG_ARENA_START_PERSONAL_RATING, CONFIG_ARENA_START_MATCHMAKER_RATING, CONFIG_HONOR_AFTER_DUEL, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 655b16cf5..9cb7fb937 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1179,6 +1179,7 @@ void World::LoadConfigSettings(bool reload) _int_configs[CONFIG_ARENA_GAMES_REQUIRED] = sConfigMgr->GetOption("Arena.GamesRequired", 10); _int_configs[CONFIG_ARENA_SEASON_ID] = sConfigMgr->GetOption("Arena.ArenaSeason.ID", 1); _int_configs[CONFIG_ARENA_START_RATING] = sConfigMgr->GetOption("Arena.ArenaStartRating", 0); + _int_configs[CONFIG_LEGACY_ARENA_POINTS_CALC] = sConfigMgr->GetOption("Arena.LegacyArenaPoints", 0); _int_configs[CONFIG_ARENA_START_PERSONAL_RATING] = sConfigMgr->GetOption("Arena.ArenaStartPersonalRating", 1000); _int_configs[CONFIG_ARENA_START_MATCHMAKER_RATING] = sConfigMgr->GetOption("Arena.ArenaStartMatchmakerRating", 1500); _bool_configs[CONFIG_ARENA_SEASON_IN_PROGRESS] = sConfigMgr->GetOption("Arena.ArenaSeason.InProgress", true); From 5ba2c18ce6f832f71255e5e23bd0794f1a4347ae Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Wed, 9 Aug 2023 10:42:50 +0200 Subject: [PATCH 09/11] feat(Core/Conf): add CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL (#16850) * feat(Core/Conf): add CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL * fix: bad copy paste * add sql * fix bad copy paste above again * fix: move lang values * Update rev_1690640715748711400.sql * Update rev_1690640715748711400.sql * Rename rev_1690640715748711400.sql to fix.sql * reaching, maybe fix (?) c: * love me god damn it * update sql file --------- Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com> Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../rev_1691552962372476000.sql | 13 +++++++ .../apps/worldserver/worldserver.conf.dist | 15 ++++++-- .../game/Battlegrounds/BattlegroundQueue.cpp | 34 +++++++++++++++++-- src/server/game/Miscellaneous/Language.h | 12 +++++-- src/server/game/World/IWorld.h | 1 + src/server/game/World/World.cpp | 1 + 6 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1691552962372476000.sql diff --git a/data/sql/updates/pending_db_world/rev_1691552962372476000.sql b/data/sql/updates/pending_db_world/rev_1691552962372476000.sql new file mode 100644 index 000000000..c2c9affce --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1691552962372476000.sql @@ -0,0 +1,13 @@ +-- +-- Add acore_strings for arena queue announcer with less detail about the teams +DELETE FROM `acore_string` WHERE `entry` IN (773, 774, 775, 776, 777, 778); +INSERT INTO `acore_string` (`entry`, `content_default`, `locale_frFR`, `locale_deDE`, `locale_zhCN`) VALUES +(773, '|cffff0000[Arena Queue Announcer]:|r %s -- Joined : %ux%u|r', '|cffff0000[Annonce File d''Attente Arène]:|r %s -- Rejoint : %ux%u|r', '|cffff0000[BG Ansager für Warteschlange]:|r %s -- beigetreten : %ux%u|r', '|cffff0000[竞技场列队公告]:|r %s -- 加入 : %ux%u|r'), +(774, '|cffff0000[Arena Queue Announcer]:|r %s -- Exited : %ux%u|r', '|cffff0000[Annonce File d''Attente Arène]:|r %s -- Quitté : %ux%u|r', '|cffff0000[BG Ansager für Warteschlange]:|r %s -- verlassen : %ux%u|r', '|cffff0000[竞技场列队公告]:|r %s -- 退出 : %ux%u|r'), +(775, '|cffff0000[Arena Queue Announcer]:|r Joined : %ux%u : %u|r', '|cffff0000[Annonce File d''Attente Arène]:|r Rejoint : %ux%u : %u|r', '|cffff0000[BG Ansager für Warteschlange]:|r beigetreten : %ux%u : %u|r', '|cffff0000[竞技场列队公告]:|r 加入 : %ux%u : %u|r'), +(776, '|cffff0000[Arena Queue Announcer]:|r Exited : %ux%u : %u|r', '|cffff0000[Annonce File d''Attente Arène]:|r Quitté : %ux%u : %u|r', '|cffff0000[BG Ansager für Warteschlange]:|r verlassen : %ux%u : %u|r', '|cffff0000[竞技场列队公告]:|r 退出 : %ux%u : %u|r'), +(777, '|cffff0000[Arena Queue Announcer]:|r Joined : %ux%u|r', '|cffff0000[Annonce File d''Attente Arène]:|r Rejoint : %ux%u|r', '|cffff0000[BG Ansager für Warteschlange]:|r beigetreten : %ux%u|r', '|cffff0000[竞技场列队公告]:|r 加入 : %ux%u|r'), +(778, '|cffff0000[Arena Queue Announcer]:|r Exited : %ux%u|r', '|cffff0000[Annonce File d''Attente Arène]:|r Quitté : %ux%u|r', '|cffff0000[BG Ansager für Warteschlange]:|r verlassen : %ux%u|r', '|cffff0000[竞技场列队公告]:|r 退出 : %ux%u|r'); + +UPDATE `acore_string` SET `locale_frFR` = '|cffff0000[Annonce File d''Attente Arène]:|r %s -- Rejoint : %ux%u : %u|r' WHERE `entry` = 718; +UPDATE `acore_string` SET `locale_frFR` = '|cffff0000[Annonce File d''Attente Arène]:|r %s -- Quitté : %ux%u : %u|r' WHERE `entry` = 719; diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 9d809be86..4d200a78e 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -3059,14 +3059,25 @@ Arena.GamesRequired = 10 Arena.QueueAnnouncer.Enable = 0 # -# Battleground.QueueAnnouncer.PlayerOnly -# Description: Battleground queue announcement type. +# Arena.QueueAnnouncer.PlayerOnly +# Description: Arena queue announcement type. # Default: 0 - (System message, Anyone can see it) # 1 - (Private, Only queued players can see it) # Arena.QueueAnnouncer.PlayerOnly = 0 +# +# Arena.QueueAnnouncer.Detail +# Description: The amount of detail to announce on teams queued for arenas. +# Default: 3 - (Announce the team's name and rating) +# 2 - (Announce only the team's name) +# 1 - (Announce only the team's rating) +# 0 - (Do not announce any information about the teams) +# + +Arena.QueueAnnouncer.Detail = 3 + # # Arena.ArenaSeason.ID # Description: Current arena season id shown in clients. diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index dc326d784..f0d4fe2b5 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -1143,7 +1143,22 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo uint32 ArenaTeamRating = ginfo->ArenaTeamRating; std::string TeamName = team->GetName(); - sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating); + uint32 announcementDetail = sWorld->getIntConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL); + switch (announcementDetail) + { + case 3: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating); + break; + case 2: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType); + break; + case 1: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, ArenaType, ArenaType, ArenaTeamRating); + break; + default: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, ArenaType, ArenaType); + break; + } } } @@ -1168,7 +1183,22 @@ void BattlegroundQueue::SendExitMessageArenaQueue(GroupQueueInfo* ginfo) if (ArenaType && ginfo->Players.empty()) { - sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating); + uint32 announcementDetail = sWorld->getIntConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL); + switch (announcementDetail) + { + case 3: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating); + break; + case 2: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType); + break; + case 1: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, ArenaType, ArenaType, ArenaTeamRating); + break; + default: + sWorld->SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, ArenaType, ArenaType); + break; + } } } diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 8f314fa38..0ac55cbf4 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -666,8 +666,8 @@ enum AcoreStrings LANG_YOUR_BG_LEVEL_REQ_ERROR = 715, // = 716, see LANG_PINFO_MAP_OFFLINE LANG_BG_STARTED_ANNOUNCE_WORLD = 717, - LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN = 718, - LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT = 719, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME_RATING = 718, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME_RATING = 719, LANG_BG_GROUP_TOO_LARGE = 720, // "Your group is too large for this battleground. Please regroup to join." LANG_ARENA_GROUP_TOO_LARGE = 721, // "Your group is too large for this arena. Please regroup to join." @@ -702,7 +702,13 @@ enum AcoreStrings LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS = 751, // "Not enough players. This game will close in %u seconds." // = 752, see LANG_PINFO_ACC_IP - // Room for BG/ARENA = 773-784, 788-799 not used + // Room for BG/ARENA = 779-784, 788-799 not used + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME = 773, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME = 774, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_RATING = 775, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_RATING = 776, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN = 777, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT = 778, LANG_ARENA_TESTING = 785, LANG_AUTO_ANN = 786, LANG_ANNOUNCE_COLOR = 787, diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 49c43555e..f035470e1 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -329,6 +329,7 @@ enum WorldIntConfigs CONFIG_LEGACY_ARENA_POINTS_CALC, CONFIG_ARENA_START_PERSONAL_RATING, CONFIG_ARENA_START_MATCHMAKER_RATING, + CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL, CONFIG_HONOR_AFTER_DUEL, CONFIG_PVP_TOKEN_MAP_TYPE, CONFIG_PVP_TOKEN_ID, diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 9cb7fb937..9c7cd51eb 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1189,6 +1189,7 @@ void World::LoadConfigSettings(bool reload) _float_configs[CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER] = sConfigMgr->GetOption("Arena.ArenaMatchmakerRatingModifier", 24.0f); _bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetOption("Arena.QueueAnnouncer.Enable", false); _bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetOption("Arena.QueueAnnouncer.PlayerOnly", false); + _int_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL] = sConfigMgr->GetOption("Arena.QueueAnnouncer.Detail", 3); _bool_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfigMgr->GetOption("OffhandCheckAtSpellUnlearn", true); _int_configs[CONFIG_CREATURE_STOP_FOR_PLAYER] = sConfigMgr->GetOption("Creature.MovingStopTimeForPlayer", 3 * MINUTE * IN_MILLISECONDS); From 30782ecca84ba5f13539cc58fa13f5ce12da92bb Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 9 Aug 2023 08:46:04 +0000 Subject: [PATCH 10/11] chore(DB): import pending files Referenced commit(s): 5ba2c18ce6f832f71255e5e23bd0794f1a4347ae --- .../rev_1691552962372476000.sql => db_world/2023_08_09_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1691552962372476000.sql => db_world/2023_08_09_02.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1691552962372476000.sql b/data/sql/updates/db_world/2023_08_09_02.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1691552962372476000.sql rename to data/sql/updates/db_world/2023_08_09_02.sql index c2c9affce..71aba8584 100644 --- a/data/sql/updates/pending_db_world/rev_1691552962372476000.sql +++ b/data/sql/updates/db_world/2023_08_09_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_08_09_01 -> 2023_08_09_02 -- -- Add acore_strings for arena queue announcer with less detail about the teams DELETE FROM `acore_string` WHERE `entry` IN (773, 774, 775, 776, 777, 778); From 808b8bf07a3d494f87a286e6f8d2b4dbbfa433f8 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:32:32 -0300 Subject: [PATCH 11/11] fix(Core/Arena): Fix LegacyArenaPoints logic (#16967) --- src/server/game/Battlegrounds/ArenaTeam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index a115b8fa8..25aa3f4ce 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -658,7 +658,7 @@ uint32 ArenaTeam::GetPoints(uint32 memberRating) if (rating <= 1500) { - if (sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) < 6 && sWorld->getIntConfig(CONFIG_LEGACY_ARENA_POINTS_CALC)) + if (sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) < 6 && !sWorld->getIntConfig(CONFIG_LEGACY_ARENA_POINTS_CALC)) points = (float)rating * 0.22f + 14.0f; else points = 344;