BFA Update (still lots of testing to do tho)

This commit is contained in:
hondacrx
2018-12-10 12:46:25 -05:00
parent 468b053946
commit 8e20114e10
256 changed files with 35613 additions and 10459 deletions
@@ -138,6 +138,13 @@ namespace Game.Maps
}
}
public void UnloadInstanceSave(uint InstanceId)
{
InstanceSave save = GetInstanceSave(InstanceId);
if (save != null)
save.UnloadIfEmpty();
}
public void LoadInstances()
{
uint oldMSTime = Time.GetMSTime();
@@ -711,7 +718,7 @@ namespace Game.Maps
Global.InstanceSaveMgr.DeleteInstanceFromDB(GetInstanceId());
}
bool UnloadIfEmpty()
public bool UnloadIfEmpty()
{
if (m_playerList.Empty() && m_groupList.Empty())
{
@@ -317,6 +317,11 @@ namespace Game.Maps
uint resInterval = GetCombatResurrectionChargeInterval();
InitializeCombatResurrections(1, resInterval);
SendEncounterStart(1, 9, resInterval, resInterval);
var playerList = instance.GetPlayers();
foreach (var player in playerList)
if (player.IsAlive())
player.ProcSkillsAndAuras(null, ProcFlags.EncounterStart, ProcFlags.None, ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
break;
}
case EncounterState.Fail: