Refactoring Cleanup

This commit is contained in:
hondacrx
2020-02-03 14:42:20 -05:00
parent 2a065d22da
commit 752137af52
37 changed files with 107 additions and 157 deletions
+1 -1
View File
@@ -674,7 +674,7 @@ namespace Game.BattleGrounds
SetWinner(BattlegroundTeamId.Neutral);
}
PreparedStatement stmt = null;
PreparedStatement stmt;
ulong battlegroundId = 1;
if (IsBattleground() && WorldConfig.GetBoolValue(WorldCfg.BattlegroundStoreStatisticsEnable))
{
@@ -428,7 +428,7 @@ namespace Game.BattleGrounds.Zones
return;
source.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.EnterPvpCombat);
uint sound = 0;
uint sound;
// If node is neutral, change to contested
if (m_Nodes[node] == ABNodeStatus.Neutral)
{
+7 -10
View File
@@ -163,7 +163,7 @@ namespace Game.BattleGrounds.Zones
void CheckSomeoneJoinedPo()
{
GameObject obj = null;
GameObject obj;
for (byte i = 0; i < EotSPoints.PointsMax; ++i)
{
obj = GetBgMap().GetGameObject(BgObjects[EotSObjectTypes.TowerCapFelReaver + i]);
@@ -203,7 +203,8 @@ namespace Game.BattleGrounds.Zones
//reset current point counts
for (byte i = 0; i < 2 * EotSPoints.PointsMax; ++i)
m_CurrentPointPlayersCount[i] = 0;
GameObject obj = null;
GameObject obj;
for (byte i = 0; i < EotSPoints.PointsMax; ++i)
{
obj = GetBgMap().GetGameObject(BgObjects[EotSObjectTypes.TowerCapFelReaver + i]);
@@ -255,7 +256,7 @@ namespace Game.BattleGrounds.Zones
//point is fully horde's
m_PointBarStatus[point] = EotSProgressBarConsts.ProgressBarHordeControlled;
uint pointOwnerTeamId = 0;
uint pointOwnerTeamId;
//find which team should own this point
if (m_PointBarStatus[point] <= EotSProgressBarConsts.ProgressBarNeutralLow)
pointOwnerTeamId = (uint)Team.Horde;
@@ -871,8 +872,7 @@ namespace Game.BattleGrounds.Zones
public override WorldSafeLocsEntry GetClosestGraveYard(Player player)
{
uint g_id = 0;
uint g_id;
switch (player.GetTeam())
{
case Team.Alliance:
@@ -884,11 +884,8 @@ namespace Game.BattleGrounds.Zones
default: return null;
}
WorldSafeLocsEntry entry = null;
WorldSafeLocsEntry nearestEntry = null;
entry = Global.ObjectMgr.GetWorldSafeLoc(g_id);
nearestEntry = entry;
WorldSafeLocsEntry entry = Global.ObjectMgr.GetWorldSafeLoc(g_id);
WorldSafeLocsEntry nearestEntry = entry;
if (entry == null)
{
Log.outError(LogFilter.Battleground, "BattlegroundEY: The main team graveyard could not be found. The graveyard system will not be operational!");
@@ -702,7 +702,7 @@ namespace Game.BattleGrounds.Zones
public override WorldSafeLocsEntry GetClosestGraveYard(Player player)
{
uint safeloc = 0;
uint safeloc;
if (player.GetTeamId() == Attackers)
safeloc = SAMiscConst.GYEntries[SAGraveyards.BeachGy];
@@ -820,9 +820,9 @@ namespace Game.BattleGrounds.Zones
}
AddSpiritGuide(i + SACreatureTypes.Max, sg.Loc.GetPositionX(), sg.Loc.GetPositionY(), sg.Loc.GetPositionZ(), SAMiscConst.GYOrientation[i], GraveyardStatus[i]);
uint npc = 0;
int flag = 0;
uint npc;
int flag;
switch (i)
{
case SAGraveyards.LeftCapturableGy: