forked from mirror/azerothcore-wotlk
feat(Core/Wintergrasp): optional Essence buff for both factions (#26017)
This commit is contained in:
@@ -3688,6 +3688,18 @@ Wintergrasp.SkipBattleSessionCount = 3500
|
|||||||
|
|
||||||
Wintergrasp.KickVoAPlayers = 1
|
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()])
|
for (ObjectGuid const& guid : PlayersInWar[GetAttackerTeam()])
|
||||||
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
||||||
{
|
{
|
||||||
player->CastSpell(player, SPELL_DEFEAT_REWARD, true);
|
player->CastSpell(player, SPELL_DEFEAT_REWARD, true);
|
||||||
RemoveAurasFromPlayer(player);
|
RemoveAurasFromPlayer(player);
|
||||||
|
|
||||||
|
if (grantEssenceToAttackers)
|
||||||
|
player->CastSpell(player, SPELL_ESSENCE_OF_WINTERGRASP, true);
|
||||||
|
|
||||||
for (uint8 i = 0; i < damagedTowersAtt; ++i)
|
for (uint8 i = 0; i < damagedTowersAtt; ++i)
|
||||||
player->CastSpell(player, spellDamagedAtt, true);
|
player->CastSpell(player, spellDamagedAtt, true);
|
||||||
for (uint8 i = 0; i < brokenTowersAtt; ++i)
|
for (uint8 i = 0; i < brokenTowersAtt; ++i)
|
||||||
|
|||||||
@@ -1101,7 +1101,9 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
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;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -596,6 +596,7 @@ void WorldConfig::BuildConfigCache()
|
|||||||
|
|
||||||
SetConfigValue<uint32>(CONFIG_WINTERGRASP_SKIP_BATTLE_SESSION_COUNT, "Wintergrasp.SkipBattleSessionCount", 3500);
|
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_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<uint32>(CONFIG_BIRTHDAY_TIME, "BirthdayTime", 1222964635);
|
||||||
SetConfigValue<bool>(CONFIG_MINIGOB_MANABONK, "Minigob.Manabonk.Enable", true);
|
SetConfigValue<bool>(CONFIG_MINIGOB_MANABONK, "Minigob.Manabonk.Enable", true);
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ enum ServerConfigs
|
|||||||
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
|
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
|
||||||
CONFIG_WINTERGRASP_SKIP_BATTLE_SESSION_COUNT,
|
CONFIG_WINTERGRASP_SKIP_BATTLE_SESSION_COUNT,
|
||||||
CONFIG_WINTERGRASP_KICK_VOA_PLAYERS,
|
CONFIG_WINTERGRASP_KICK_VOA_PLAYERS,
|
||||||
|
CONFIG_WINTERGRASP_ESSENCE_BOTH_FACTIONS,
|
||||||
CONFIG_PACKET_SPOOF_BANMODE,
|
CONFIG_PACKET_SPOOF_BANMODE,
|
||||||
CONFIG_PACKET_SPOOF_BANDURATION,
|
CONFIG_PACKET_SPOOF_BANDURATION,
|
||||||
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
|
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
|
||||||
|
|||||||
Reference in New Issue
Block a user