Core/Battlegrounds: Avoid reset BG and Arena scoreboard stats and BG map achievement criterias when relogin if player was already in the BG
Port From (https://github.com/TrinityCore/TrinityCore/commit/1bfbc371d5e2c756da6dc9f658cafcac5779ff60)
This commit is contained in:
@@ -45,7 +45,9 @@ namespace Game.Arenas
|
|||||||
|
|
||||||
public override void AddPlayer(Player player)
|
public override void AddPlayer(Player player)
|
||||||
{
|
{
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
base.AddPlayer(player);
|
base.AddPlayer(player);
|
||||||
|
if (!isInBattleground)
|
||||||
PlayerScores[player.GetGUID()] = new ArenaScore(player.GetGUID(), player.GetBGTeam());
|
PlayerScores[player.GetGUID()] = new ArenaScore(player.GetGUID(), player.GetBGTeam());
|
||||||
|
|
||||||
if (player.GetBGTeam() == Team.Alliance) // gold
|
if (player.GetBGTeam() == Team.Alliance) // gold
|
||||||
|
|||||||
@@ -1068,6 +1068,7 @@ namespace Game.BattleGrounds
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reset all map criterias on map enter
|
// reset all map criterias on map enter
|
||||||
|
if (!isInBattleground)
|
||||||
player.ResetCriteria(CriteriaFailEvent.LeaveBattleground, GetMapId(), true);
|
player.ResetCriteria(CriteriaFailEvent.LeaveBattleground, GetMapId(), true);
|
||||||
|
|
||||||
// setup BG group membership
|
// setup BG group membership
|
||||||
|
|||||||
@@ -221,7 +221,9 @@ namespace Game.BattleGrounds.Zones
|
|||||||
|
|
||||||
public override void AddPlayer(Player player)
|
public override void AddPlayer(Player player)
|
||||||
{
|
{
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
base.AddPlayer(player);
|
base.AddPlayer(player);
|
||||||
|
if (!isInBattleground)
|
||||||
PlayerScores[player.GetGUID()] = new BattlegroundABScore(player.GetGUID(), player.GetBGTeam());
|
PlayerScores[player.GetGUID()] = new BattlegroundABScore(player.GetGUID(), player.GetBGTeam());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -369,7 +369,9 @@ namespace Game.BattleGrounds.Zones
|
|||||||
|
|
||||||
public override void AddPlayer(Player player)
|
public override void AddPlayer(Player player)
|
||||||
{
|
{
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
base.AddPlayer(player);
|
base.AddPlayer(player);
|
||||||
|
if (!isInBattleground)
|
||||||
PlayerScores[player.GetGUID()] = new BgEyeOfStormScore(player.GetGUID(), player.GetBGTeam());
|
PlayerScores[player.GetGUID()] = new BgEyeOfStormScore(player.GetGUID(), player.GetBGTeam());
|
||||||
|
|
||||||
m_PlayersNearPoint[EotSPoints.PointsMax].Add(player.GetGUID());
|
m_PlayersNearPoint[EotSPoints.PointsMax].Add(player.GetGUID());
|
||||||
|
|||||||
@@ -481,7 +481,9 @@ namespace Game.BattleGrounds.Zones
|
|||||||
|
|
||||||
public override void AddPlayer(Player player)
|
public override void AddPlayer(Player player)
|
||||||
{
|
{
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
base.AddPlayer(player);
|
base.AddPlayer(player);
|
||||||
|
if (!isInBattleground)
|
||||||
PlayerScores[player.GetGUID()] = new BattlegroundSAScore(player.GetGUID(), player.GetBGTeam());
|
PlayerScores[player.GetGUID()] = new BattlegroundSAScore(player.GetGUID(), player.GetBGTeam());
|
||||||
|
|
||||||
SendTransportInit(player);
|
SendTransportInit(player);
|
||||||
|
|||||||
@@ -198,7 +198,9 @@ namespace Game.BattleGrounds.Zones
|
|||||||
|
|
||||||
public override void AddPlayer(Player player)
|
public override void AddPlayer(Player player)
|
||||||
{
|
{
|
||||||
|
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||||
base.AddPlayer(player);
|
base.AddPlayer(player);
|
||||||
|
if (!isInBattleground)
|
||||||
PlayerScores[player.GetGUID()] = new BattlegroundWGScore(player.GetGUID(), player.GetBGTeam());
|
PlayerScores[player.GetGUID()] = new BattlegroundWGScore(player.GetGUID(), player.GetBGTeam());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user