Core/Battlegrounds: Rework Eye of the Storm
Port From (https://github.com/TrinityCore/TrinityCore/commit/32af4bf8fa2936904a6bebe16445e66ef26340ce)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user