feat(Core/Wintergrasp): optional Essence buff for both factions (#26017)

This commit is contained in:
Andrew
2026-05-29 00:16:57 -03:00
committed by GitHub
parent dabb8f722c
commit c029eab828
5 changed files with 22 additions and 1 deletions
@@ -3688,6 +3688,18 @@ Wintergrasp.SkipBattleSessionCount = 3500
Wintergrasp.KickVoAPlayers = 1
#
# Wintergrasp.EssenceBothFactions
# Description: Grant the "Essence of Wintergrasp" buff to both factions
# during peacetime, regardless of who controls the keep.
# The wartime suppression still applies; this only affects
# who receives the buff once the battle is over.
# Default: 0 - (Disabled, only the defending faction gets the buff)
# 1 - (Enabled, attackers and defenders both get the buff,
# so both factions can access Vault of Archavon)
Wintergrasp.EssenceBothFactions = 0
#
###################################################################################################
@@ -479,12 +479,17 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
}
}
bool const grantEssenceToAttackers = sWorld->getBoolConfig(CONFIG_WINTERGRASP_ESSENCE_BOTH_FACTIONS);
for (ObjectGuid const& guid : PlayersInWar[GetAttackerTeam()])
if (Player* player = ObjectAccessor::FindPlayer(guid))
{
player->CastSpell(player, SPELL_DEFEAT_REWARD, true);
RemoveAurasFromPlayer(player);
if (grantEssenceToAttackers)
player->CastSpell(player, SPELL_ESSENCE_OF_WINTERGRASP, true);
for (uint8 i = 0; i < damagedTowersAtt; ++i)
player->CastSpell(player, spellDamagedAtt, true);
for (uint8 i = 0; i < brokenTowersAtt; ++i)
+3 -1
View File
@@ -1101,7 +1101,9 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return false;
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!Bf || player->GetTeamId() != Bf->GetDefenderTeam() || Bf->IsWarTime())
if (!Bf || Bf->IsWarTime())
return false;
if (!sWorld->getBoolConfig(CONFIG_WINTERGRASP_ESSENCE_BOTH_FACTIONS) && player->GetTeamId() != Bf->GetDefenderTeam())
return false;
break;
}
+1
View File
@@ -596,6 +596,7 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<uint32>(CONFIG_WINTERGRASP_SKIP_BATTLE_SESSION_COUNT, "Wintergrasp.SkipBattleSessionCount", 3500);
SetConfigValue<bool>(CONFIG_WINTERGRASP_KICK_VOA_PLAYERS, "Wintergrasp.KickVoAPlayers", true, ConfigValueCache::Reloadable::No);
SetConfigValue<bool>(CONFIG_WINTERGRASP_ESSENCE_BOTH_FACTIONS, "Wintergrasp.EssenceBothFactions", false);
SetConfigValue<uint32>(CONFIG_BIRTHDAY_TIME, "BirthdayTime", 1222964635);
SetConfigValue<bool>(CONFIG_MINIGOB_MANABONK, "Minigob.Manabonk.Enable", true);
+1
View File
@@ -327,6 +327,7 @@ enum ServerConfigs
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
CONFIG_WINTERGRASP_SKIP_BATTLE_SESSION_COUNT,
CONFIG_WINTERGRASP_KICK_VOA_PLAYERS,
CONFIG_WINTERGRASP_ESSENCE_BOTH_FACTIONS,
CONFIG_PACKET_SPOOF_BANMODE,
CONFIG_PACKET_SPOOF_BANDURATION,
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,