Updated to 8.2.0.31429 (scripts disabled atm, they still need updated)
Code Port from TrinityCore https://github.com/TrinityCore/TrinityCore Casc from WoW-Tools https://github.com/WoW-Tools/CASCExplorer
This commit is contained in:
@@ -426,7 +426,7 @@ namespace Game.BattleGrounds
|
||||
player.SendPacket(battlefieldStatus);
|
||||
|
||||
// Correctly display EnemyUnitFrame
|
||||
player.SetByteValue(PlayerFields.Bytes4, 3, (byte)player.GetBGTeam());
|
||||
player.SetArenaFaction((byte)player.GetBGTeam());
|
||||
|
||||
player.RemoveAurasDueToSpell(BattlegroundConst.SpellArenaPreparation);
|
||||
player.ResetAllPowers();
|
||||
@@ -974,7 +974,7 @@ namespace Game.BattleGrounds
|
||||
public virtual void AddPlayer(Player player)
|
||||
{
|
||||
// remove afk from player
|
||||
if (player.HasFlag(PlayerFields.Flags, PlayerFlags.AFK))
|
||||
if (player.isAFK())
|
||||
player.ToggleAFK();
|
||||
|
||||
// score struct must be created in inherited class
|
||||
@@ -985,7 +985,7 @@ namespace Game.BattleGrounds
|
||||
BattlegroundPlayer bp = new BattlegroundPlayer();
|
||||
bp.OfflineRemoveTime = 0;
|
||||
bp.Team = team;
|
||||
bp.ActiveSpec = player.GetInt32Value(PlayerFields.CurrentSpecId);
|
||||
bp.ActiveSpec = (int)player.GetPrimarySpecialization();
|
||||
|
||||
// Add to list/maps
|
||||
m_Players[guid] = bp;
|
||||
@@ -1221,12 +1221,9 @@ namespace Game.BattleGrounds
|
||||
{
|
||||
pvpLogData = new PVPLogData();
|
||||
|
||||
if (GetStatus() == BattlegroundStatus.WaitLeave)
|
||||
pvpLogData.Winner.Set((byte)GetWinner());
|
||||
|
||||
foreach (var score in PlayerScores)
|
||||
{
|
||||
PVPLogData.PlayerData playerData;
|
||||
PVPLogData.PVPMatchPlayerStatistics playerData;
|
||||
|
||||
score.Value.BuildPvPLogPlayerDataPacket(out playerData);
|
||||
|
||||
@@ -1234,14 +1231,14 @@ namespace Game.BattleGrounds
|
||||
if (player)
|
||||
{
|
||||
playerData.IsInWorld = true;
|
||||
playerData.PrimaryTalentTree = (int)player.GetUInt32Value(PlayerFields.CurrentSpecId);
|
||||
playerData.PrimaryTalentTree = (int)player.GetPrimarySpecialization();
|
||||
playerData.Sex = (int)player.GetGender();
|
||||
playerData.PlayerRace = player.GetRace();
|
||||
playerData.PlayerClass = (int)player.GetClass();
|
||||
playerData.HonorLevel = (int)player.GetHonorLevel();
|
||||
}
|
||||
|
||||
pvpLogData.Players.Add(playerData);
|
||||
pvpLogData.Statistics.Add(playerData);
|
||||
}
|
||||
|
||||
pvpLogData.PlayerCount[(int)BattlegroundTeamId.Horde] = (sbyte)GetPlayersCountByTeam(Team.Horde);
|
||||
@@ -1534,9 +1531,6 @@ namespace Game.BattleGrounds
|
||||
// casting visual effect
|
||||
creature.SetChannelSpellId(BattlegroundConst.SpellSpiritHealChannel);
|
||||
creature.SetChannelSpellXSpellVisualId(BattlegroundConst.SpellSpiritHealChannelVisual);
|
||||
// correct cast speed
|
||||
creature.SetFloatValue(UnitFields.ModCastSpeed, 1.0f);
|
||||
creature.SetFloatValue(UnitFields.ModCastHaste, 1.0f);
|
||||
//creature.CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true);
|
||||
return true;
|
||||
}
|
||||
@@ -1649,7 +1643,7 @@ namespace Game.BattleGrounds
|
||||
if (!isArena())
|
||||
{
|
||||
// To be able to remove insignia -- ONLY IN Battlegrounds
|
||||
victim.SetFlag(UnitFields.Flags, UnitFlags.Skinnable);
|
||||
victim.AddUnitFlag(UnitFlags.Skinnable);
|
||||
RewardXPAtKill(killer, victim);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ namespace Game.BattleGrounds
|
||||
CreatureTemplate cInfo = Global.ObjectMgr.GetCreatureTemplate(entry);
|
||||
if (cInfo != null)
|
||||
{
|
||||
if (!cInfo.Npcflag.HasAnyFlag(NPCFlags.BattleMaster))
|
||||
if (!cInfo.Npcflag.HasAnyFlag((uint)NPCFlags.BattleMaster))
|
||||
Log.outError(LogFilter.Sql, "Creature (Entry: {0}) listed in `battlemaster_entry` is not a battlemaster.", entry);
|
||||
}
|
||||
else
|
||||
@@ -733,10 +733,10 @@ namespace Game.BattleGrounds
|
||||
var templates = Global.ObjectMgr.GetCreatureTemplates();
|
||||
foreach (var creature in templates)
|
||||
{
|
||||
if (creature.Value.Npcflag.HasAnyFlag(NPCFlags.BattleMaster) && !mBattleMastersMap.ContainsKey(creature.Value.Entry))
|
||||
if (creature.Value.Npcflag.HasAnyFlag((uint)NPCFlags.BattleMaster) && !mBattleMastersMap.ContainsKey(creature.Value.Entry))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "CreatureTemplate (Entry: {0}) has UNIT_NPC_FLAG_BATTLEMASTER but no data in `battlemaster_entry` table. Removing flag!", creature.Value.Entry);
|
||||
templates[creature.Key].Npcflag &= ~NPCFlags.BattleMaster;
|
||||
templates[creature.Key].Npcflag &= ~(uint)NPCFlags.BattleMaster;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace Game.BattleGrounds
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||
public virtual void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData)
|
||||
{
|
||||
playerData = new PVPLogData.PlayerData();
|
||||
playerData = new PVPLogData.PVPMatchPlayerStatistics();
|
||||
playerData.PlayerGUID = PlayerGuid;
|
||||
playerData.Kills = KillingBlows;
|
||||
playerData.Faction = (byte)TeamId;
|
||||
|
||||
@@ -833,7 +833,7 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData)
|
||||
{
|
||||
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||
|
||||
|
||||
@@ -999,7 +999,7 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData)
|
||||
{
|
||||
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||
|
||||
|
||||
@@ -689,9 +689,9 @@ namespace Game.BattleGrounds.Zones
|
||||
if (dem)
|
||||
{
|
||||
if (start)
|
||||
dem.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
|
||||
dem.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
|
||||
else
|
||||
dem.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
|
||||
dem.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -768,9 +768,9 @@ namespace Game.BattleGrounds.Zones
|
||||
if (go)
|
||||
{
|
||||
if (CanInteractWithObject(objectId))
|
||||
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
|
||||
go.RemoveFlag(GameObjectFlags.NotSelectable);
|
||||
else
|
||||
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
|
||||
go.AddFlag(GameObjectFlags.NotSelectable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,7 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData)
|
||||
{
|
||||
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||
|
||||
|
||||
@@ -966,7 +966,7 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData)
|
||||
{
|
||||
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user