Core/PacketIO: Update opcodes and packet structures to 8.2.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/ee2e49429f4383732b4e0f39b493470b9c1dd10c)
This commit is contained in:
hondacrx
2019-10-28 14:33:43 -04:00
parent 1e2ce61e5c
commit c6e53b2ba7
34 changed files with 1792 additions and 1280 deletions
@@ -1088,6 +1088,25 @@ namespace Game.BattleGrounds.Zones
return true;
}
public override bool UpdatePlayerScore(Player player, ScoreType type, uint value, bool doAddHonor = true)
{
if (!base.UpdatePlayerScore(player, type, value, doAddHonor))
return false;
switch (type)
{
case ScoreType.DestroyedDemolisher:
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, (uint)SAObjectives.DemolishersDestroyed);
break;
case ScoreType.DestroyedWall:
player.UpdateCriteria(CriteriaTypes.BgObjectiveCapture, (uint)SAObjectives.GatesDestroyed);
break;
default:
break;
}
return true;
}
SAGateInfo GetGate(uint entry)
{
foreach (var gate in SAMiscConst.Gates)
@@ -1157,8 +1176,8 @@ namespace Game.BattleGrounds.Zones
{
base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(DemolishersDestroyed);
playerData.Stats.Add(GatesDestroyed);
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.DemolishersDestroyed, DemolishersDestroyed));
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.GatesDestroyed, GatesDestroyed));
}
public override uint GetAttr1() { return DemolishersDestroyed; }
@@ -1643,5 +1662,11 @@ namespace Game.BattleGrounds.Zones
public const int CentralCapturableGy = 4;
public const int Max = 5;
}
enum SAObjectives
{
GatesDestroyed = 231,
DemolishersDestroyed = 232
}
#endregion
}