Core/Battlegrounds: Replaced overriding m_team with more fine grained approach
Port From (https://github.com/TrinityCore/TrinityCore/commit/55587694053583b4cb85be38a47563a9fdf77271)
This commit is contained in:
@@ -5742,9 +5742,9 @@ namespace Game.Spells
|
||||
if (!mode.HasFlag(AuraEffectHandleModes.Real))
|
||||
return;
|
||||
|
||||
Player player = aurApp.GetTarget().ToPlayer();
|
||||
if (player != null)
|
||||
player.SwitchToOppositeTeam(apply);
|
||||
//Player player = aurApp.GetTarget().ToPlayer();
|
||||
//if (player != null)
|
||||
//player.SwitchToOppositeTeam(apply);
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.SetFFAPvp)]
|
||||
@@ -5808,9 +5808,9 @@ namespace Game.Spells
|
||||
playerPosition.Pos = target.GetPosition();
|
||||
|
||||
if (GetAuraType() == AuraType.BattleGroundPlayerPositionFactional)
|
||||
playerPosition.IconID = target.GetTeam() == Team.Alliance ? BattlegroundConst.PlayerPositionIconHordeFlag : BattlegroundConst.PlayerPositionIconAllianceFlag;
|
||||
playerPosition.IconID = target.GetEffectiveTeam() == Team.Alliance ? BattlegroundConst.PlayerPositionIconHordeFlag : BattlegroundConst.PlayerPositionIconAllianceFlag;
|
||||
else if (GetAuraType() == AuraType.BattleGroundPlayerPosition)
|
||||
playerPosition.IconID = target.GetTeam() == Team.Alliance ? BattlegroundConst.PlayerPositionIconAllianceFlag : BattlegroundConst.PlayerPositionIconHordeFlag;
|
||||
playerPosition.IconID = target.GetEffectiveTeam() == Team.Alliance ? BattlegroundConst.PlayerPositionIconAllianceFlag : BattlegroundConst.PlayerPositionIconHordeFlag;
|
||||
else
|
||||
Log.outWarn(LogFilter.Spells, $"Unknown aura effect {GetAuraType()} handled by HandleBattlegroundPlayerPosition.");
|
||||
|
||||
|
||||
@@ -2678,7 +2678,7 @@ namespace Game.Spells
|
||||
{
|
||||
Battleground bg = player.GetBattleground();
|
||||
if (bg)
|
||||
bg.SetDroppedFlagGUID(go.GetGUID(), (player.GetTeam() == Team.Alliance ? TeamId.Horde : TeamId.Alliance));
|
||||
bg.SetDroppedFlagGUID(go.GetGUID(), bg.GetPlayerTeam(player.GetGUID()) == Team.Alliance ? TeamId.Horde : TeamId.Alliance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user