Misc fixes.
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Game.BattleFields
|
||||
if (m_uiKickDontAcceptTimer <= diff)
|
||||
{
|
||||
long now = GameTime.GetGameTime();
|
||||
for (int team = 0; team < SharedConst.BGTeamsCount; team++)
|
||||
for (int team = 0; team < SharedConst.PvpTeamsCount; team++)
|
||||
{
|
||||
foreach (var pair in m_InvitedPlayers[team])
|
||||
if (pair.Value <= now)
|
||||
@@ -158,7 +158,7 @@ namespace Game.BattleFields
|
||||
}
|
||||
|
||||
InvitePlayersInZoneToWar();
|
||||
for (int team = 0; team < SharedConst.BGTeamsCount; team++)
|
||||
for (int team = 0; team < SharedConst.PvpTeamsCount; team++)
|
||||
{
|
||||
foreach (var pair in m_PlayersWillBeKick[team])
|
||||
if (pair.Value <= now)
|
||||
@@ -191,7 +191,7 @@ namespace Game.BattleFields
|
||||
|
||||
void InvitePlayersInZoneToQueue()
|
||||
{
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_players[team])
|
||||
{
|
||||
@@ -992,7 +992,7 @@ namespace Game.BattleFields
|
||||
|
||||
uint m_ControlTeam;
|
||||
uint m_GraveyardId;
|
||||
ObjectGuid[] m_SpiritGuide = new ObjectGuid[SharedConst.BGTeamsCount];
|
||||
ObjectGuid[] m_SpiritGuide = new ObjectGuid[SharedConst.PvpTeamsCount];
|
||||
List<ObjectGuid> m_ResurrectQueue = new();
|
||||
protected BattleField m_Bf;
|
||||
}
|
||||
@@ -1131,7 +1131,7 @@ namespace Game.BattleFields
|
||||
{
|
||||
float radius = capturePoint.GetGoInfo().ControlZone.radius;
|
||||
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_activePlayers[team])
|
||||
{
|
||||
@@ -1246,7 +1246,7 @@ namespace Game.BattleFields
|
||||
|
||||
void SendUpdateWorldState(uint field, uint value)
|
||||
{
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_activePlayers[team]) // send to all players present in the area
|
||||
{
|
||||
@@ -1292,7 +1292,7 @@ namespace Game.BattleFields
|
||||
uint GetTeamId() { return m_team; }
|
||||
|
||||
// active Players in the area of the objective, 0 - alliance, 1 - horde
|
||||
HashSet<ObjectGuid>[] m_activePlayers = new HashSet<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
HashSet<ObjectGuid>[] m_activePlayers = new HashSet<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
|
||||
// Total shift needed to capture the objective
|
||||
float m_maxValue;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Game.BattleFields
|
||||
|
||||
RegisterZone(m_ZoneId);
|
||||
|
||||
for (var team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (var team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
DefenderPortalList[team] = new List<ObjectGuid>();
|
||||
m_vehicles[team] = new List<ObjectGuid>();
|
||||
@@ -227,7 +227,7 @@ namespace Game.BattleFields
|
||||
workShop.UpdateGraveyardAndWorkshop();
|
||||
}
|
||||
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_players[team])
|
||||
{
|
||||
@@ -358,7 +358,7 @@ namespace Game.BattleFields
|
||||
player.CastSpell(player, WGSpells.DefeatReward, true);
|
||||
}
|
||||
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_PlayersInWar[team])
|
||||
{
|
||||
@@ -382,7 +382,7 @@ namespace Game.BattleFields
|
||||
|
||||
if (!endByTimer)
|
||||
{
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; ++team)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; ++team)
|
||||
{
|
||||
foreach (var guid in m_players[team])
|
||||
{
|
||||
@@ -582,7 +582,7 @@ namespace Game.BattleFields
|
||||
|
||||
bool FindAndRemoveVehicleFromList(Unit vehicle)
|
||||
{
|
||||
for (byte i = 0; i < SharedConst.BGTeamsCount; ++i)
|
||||
for (byte i = 0; i < SharedConst.PvpTeamsCount; ++i)
|
||||
{
|
||||
if (m_vehicles[i].Contains(vehicle.GetGUID()))
|
||||
{
|
||||
@@ -798,7 +798,7 @@ namespace Game.BattleFields
|
||||
|
||||
public override void SendInitWorldStatesToAll()
|
||||
{
|
||||
for (byte team = 0; team < SharedConst.BGTeamsCount; team++)
|
||||
for (byte team = 0; team < SharedConst.PvpTeamsCount; team++)
|
||||
{
|
||||
foreach (var guid in m_players[team])
|
||||
{
|
||||
@@ -1034,10 +1034,10 @@ namespace Game.BattleFields
|
||||
|
||||
List<WGWorkshop> Workshops = new();
|
||||
|
||||
List<ObjectGuid>[] DefenderPortalList = new List<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
List<ObjectGuid>[] DefenderPortalList = new List<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
List<BfWGGameObjectBuilding> BuildingsInZone = new();
|
||||
|
||||
List<ObjectGuid>[] m_vehicles = new List<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
List<ObjectGuid>[] m_vehicles = new List<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
List<ObjectGuid> CanonList = new();
|
||||
|
||||
int m_tenacityTeam;
|
||||
@@ -1489,11 +1489,11 @@ namespace Game.BattleFields
|
||||
StaticWintergraspTowerInfo _staticTowerInfo;
|
||||
|
||||
// GameObject associations
|
||||
List<ObjectGuid>[] m_GameObjectList = new List<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
List<ObjectGuid>[] m_GameObjectList = new List<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
|
||||
// Creature associations
|
||||
List<ObjectGuid>[] m_CreatureBottomList = new List<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
List<ObjectGuid>[] m_CreatureTopList = new List<ObjectGuid>[SharedConst.BGTeamsCount];
|
||||
List<ObjectGuid>[] m_CreatureBottomList = new List<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
List<ObjectGuid>[] m_CreatureTopList = new List<ObjectGuid>[SharedConst.PvpTeamsCount];
|
||||
List<ObjectGuid> m_TowerCannonBottomList = new();
|
||||
List<ObjectGuid> m_TurretTopList = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user