Some refactoring of code. and some cleanups

This commit is contained in:
hondacrx
2019-09-21 12:11:16 -04:00
parent 7c405230cc
commit 35c06c09fd
214 changed files with 1235 additions and 1341 deletions
+6 -6
View File
@@ -722,7 +722,7 @@ namespace Game.BattleGrounds
{
//needed cause else in av some creatures will kill the players at the end
player.CombatStop();
player.getHostileRefManager().deleteReferences();
player.GetHostileRefManager().deleteReferences();
}
// remove temporary currency bonus auras before rewarding player
@@ -974,7 +974,7 @@ namespace Game.BattleGrounds
public virtual void AddPlayer(Player player)
{
// remove afk from player
if (player.isAFK())
if (player.IsAFK())
player.ToggleAFK();
// score struct must be created in inherited class
@@ -1356,7 +1356,7 @@ namespace Game.BattleGrounds
if (obj)
{
// If doors are open, close it
if (obj.getLootState() == LootState.Activated && obj.GetGoState() != GameObjectState.Ready)
if (obj.GetLootState() == LootState.Activated && obj.GetGoState() != GameObjectState.Ready)
{
obj.SetLootState(LootState.Ready);
obj.SetGoState(GameObjectState.Ready);
@@ -1416,7 +1416,7 @@ namespace Game.BattleGrounds
obj.SetLootState(LootState.JustDeactivated);
else
{
if (obj.getLootState() == LootState.JustDeactivated)
if (obj.GetLootState() == LootState.JustDeactivated)
// Change state from GO_JUST_DEACTIVATED to GO_READY in case Battleground is starting again
obj.SetLootState(LootState.Ready);
}
@@ -1523,7 +1523,7 @@ namespace Game.BattleGrounds
Creature creature = AddCreature(entry, type, x, y, z, o);
if (creature)
{
creature.setDeathState(DeathState.Dead);
creature.SetDeathState(DeathState.Dead);
creature.AddChannelObject(creature.GetGUID());
// aura
//todo Fix display here
@@ -1578,7 +1578,7 @@ namespace Game.BattleGrounds
public void HandleTriggerBuff(ObjectGuid goGuid)
{
GameObject obj = GetBgMap().GetGameObject(goGuid);
if (!obj || obj.GetGoType() != GameObjectTypes.Trap || !obj.isSpawned())
if (!obj || obj.GetGoType() != GameObjectTypes.Trap || !obj.IsSpawned())
return;
// Change buff type, when buff is used:
@@ -180,7 +180,7 @@ namespace Game.BattleGrounds
battlefieldStatus.WaitTime = Time.GetMSTimeDiffToNow(joinTime);
}
public void BuildBattlegroundStatusFailed(out BattlefieldStatusFailed battlefieldStatus, Battleground bg, Player pPlayer, uint ticketId, ArenaTypes arenaType, GroupJoinBattlegroundResult result, ObjectGuid errorGuid = default(ObjectGuid))
public void BuildBattlegroundStatusFailed(out BattlefieldStatusFailed battlefieldStatus, Battleground bg, Player pPlayer, uint ticketId, ArenaTypes arenaType, GroupJoinBattlegroundResult result, ObjectGuid errorGuid = default)
{
battlefieldStatus = new BattlefieldStatusFailed();
battlefieldStatus.Ticket.RequesterGuid = pPlayer.GetGUID();