Core/Battlegrounds: Rework Eye of the Storm
Port From (https://github.com/TrinityCore/TrinityCore/commit/32af4bf8fa2936904a6bebe16445e66ef26340ce)
This commit is contained in:
@@ -72,7 +72,9 @@ namespace Framework.Constants
|
||||
public const uint SpellArenaPreparation = 32727; // Use This One, 32728 Not Correct
|
||||
public const uint SpellPreparation = 44521; // Preparation
|
||||
public const uint SpellSpiritHealMana = 44535; // Spirit Heal
|
||||
public const uint SpellRecentlyDroppedFlag = 42792; // Recently Dropped Flag
|
||||
public const uint SpellRecentlyDroppedAllianceFlag = 42792; // makes Alliance flag unselectable
|
||||
public const uint SpellRecentlyDroppedHordeFlag = 42792; // makes Horde flag unselectable
|
||||
public const uint SpellRecentlyDroppedNeutralFlag = 42792; // makes Neutral flag unselectable
|
||||
public const uint SpellAuraPlayerInactive = 43681; // Inactive
|
||||
public const uint SpellHonorableDefender25y = 68652; // +50% Honor When Standing At A Capture Point That You Control, 25yards Radius (Added In 3.2)
|
||||
public const uint SpellHonorableDefender60y = 66157; // +50% Honor When Standing At A Capture Point That You Control, 60yards Radius (Added In 3.2), Probably For 40+ Player Battlegrounds
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Game.BattleGrounds.Zones.AlteracValley
|
||||
for (byte j = 0; j < 9; j++)
|
||||
m_Team_QuestStatus[i][j] = 0;
|
||||
|
||||
_captainBuffTimer[i].Reset(120000 + RandomHelper.URand(0, 4) * 60); //as far as i could see, the buff is randomly so i make 2minutes (thats the duration of the buff itself) + 0-4minutes @todo get the right times
|
||||
_captainBuffTimer[i] = new(120000 + RandomHelper.URand(0, 4) * 60); //as far as i could see, the buff is randomly so i make 2minutes (thats the duration of the buff itself) + 0-4minutes @todo get the right times
|
||||
}
|
||||
|
||||
_mineInfo[(byte)AlteracValleyMine.North] = new AlteracValleyMineInfo(Team.Other, new StaticMineInfo(WorldStateIds.IrondeepMineOwner, WorldStateIds.IrondeepMineAllianceControlled, WorldStateIds.IrondeepMineHordeControlled, WorldStateIds.IrondeepMineTroggControlled, (byte)TextIds.IrondeepMineAllianceTaken, (byte)TextIds.IrondeepMineHordeTaken));
|
||||
@@ -53,7 +53,7 @@ namespace Game.BattleGrounds.Zones.AlteracValley
|
||||
InitNode(i, Team.Horde, true);
|
||||
InitNode(AVNodes.SnowfallGrave, Team.Other, false); //give snowfall neutral owner
|
||||
|
||||
_mineResourceTimer.Reset(MiscConst.MineResourceTimer);
|
||||
_mineResourceTimer = new(MiscConst.MineResourceTimer);
|
||||
|
||||
StartMessageIds[BattlegroundConst.EventIdSecond] = (uint)BroadcastTextIds.StartOneMinute;
|
||||
StartMessageIds[BattlegroundConst.EventIdThird] = (uint)BroadcastTextIds.StartHalfMinute;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgIsleofConquest : Battleground
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Networking.Packets;
|
||||
using Game.DataStorage;
|
||||
using System.Collections.Generic;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
@@ -401,7 +400,7 @@ namespace Game.BattleGrounds.Zones
|
||||
|
||||
if (set)
|
||||
{
|
||||
player.CastSpell(player, BattlegroundConst.SpellRecentlyDroppedFlag, true);
|
||||
player.CastSpell(player, BattlegroundConst.SpellRecentlyDroppedNeutralFlag, true);
|
||||
UpdateFlagState(team, WSGFlagState.OnGround);
|
||||
|
||||
if (team == Team.Alliance)
|
||||
|
||||
@@ -3615,7 +3615,7 @@ namespace Game.Entities
|
||||
return newFlag.GetState();
|
||||
}
|
||||
|
||||
ObjectGuid GetFlagCarrierGUID()
|
||||
public ObjectGuid GetFlagCarrierGUID()
|
||||
{
|
||||
if (GetGoType() != GameObjectTypes.NewFlag)
|
||||
return ObjectGuid.Empty;
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Game.Entities
|
||||
return;
|
||||
|
||||
if (!GetCombatManager().HasPvPCombat())
|
||||
{
|
||||
{
|
||||
RemoveAurasDueToSpell(PlayerConst.SpellPvpRulesEnabled);
|
||||
UpdateItemLevelAreaBasedScaling();
|
||||
}
|
||||
@@ -493,7 +493,7 @@ namespace Game.Entities
|
||||
return m_bgBattlegroundQueueID[i].mercenary;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public WorldLocation GetBattlegroundEntryPoint() { return m_bgData.joinPos; }
|
||||
|
||||
public bool InBattleground() { return m_bgData.bgInstanceID != 0; }
|
||||
@@ -520,10 +520,21 @@ namespace Game.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasRecentlyDroppedFlagDebuff = HasAura(aura =>
|
||||
{
|
||||
if (aura.GetSpellInfo().Id == BattlegroundConst.SpellRecentlyDroppedAllianceFlag)
|
||||
return true;
|
||||
else if (aura.GetSpellInfo().Id == BattlegroundConst.SpellRecentlyDroppedHordeFlag)
|
||||
return true;
|
||||
else if (aura.GetSpellInfo().Id == BattlegroundConst.SpellRecentlyDroppedNeutralFlag)
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
// BUG: sometimes when player clicks on flag in AB - client won't send gameobject_use, only gameobject_report_use packet
|
||||
// Note: Mount, stealth and invisibility will be removed when used
|
||||
return (!IsTotalImmune() && // Damage immune
|
||||
!HasAura(BattlegroundConst.SpellRecentlyDroppedFlag) && // Still has recently held flag debuff
|
||||
!hasRecentlyDroppedFlagDebuff && // Still has recently held flag debuff
|
||||
IsAlive()); // Alive
|
||||
}
|
||||
|
||||
@@ -615,7 +626,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
public bool IsDeserter() { return HasAura(26013); }
|
||||
|
||||
|
||||
public bool CanJoinToBattleground(BattlegroundTemplate bg)
|
||||
{
|
||||
RBACPermissions perm = RBACPermissions.JoinNormalBg;
|
||||
|
||||
@@ -908,8 +908,6 @@ namespace Game.Spells
|
||||
case 23333: // Warsong Flag
|
||||
case 23335: // Silverwing Flag
|
||||
return map_id == 489 && player != null && player.InBattleground() ? SpellCastResult.SpellCastOk : SpellCastResult.RequiresArea;
|
||||
case 34976: // Netherstorm Flag
|
||||
return map_id == 566 && player != null && player.InBattleground() ? SpellCastResult.SpellCastOk : SpellCastResult.RequiresArea;
|
||||
case 2584: // Waiting to Resurrect
|
||||
case 42792: // Recently Dropped Flag
|
||||
case 43681: // Inactive
|
||||
|
||||
Reference in New Issue
Block a user