Core/Entities: Phasing rewrite

This commit is contained in:
hondacrx
2018-03-28 11:09:30 -04:00
parent caad52f636
commit fa35d60f60
72 changed files with 2254 additions and 1146 deletions
+10 -5
View File
@@ -1090,7 +1090,12 @@ namespace Game.AI
break;
foreach (var obj in targets)
obj.SetInPhase(e.Action.ingamePhaseId.id, true, e.Action.ingamePhaseId.apply == 1);
{
if (e.Action.ingamePhaseId.apply == 1)
PhasingHandler.AddPhase(obj, e.Action.ingamePhaseId.id, true);
else
PhasingHandler.RemovePhase(obj, e.Action.ingamePhaseId.id, true);
}
break;
}
@@ -1101,12 +1106,12 @@ namespace Game.AI
if (targets.Empty())
break;
var phases = Global.DB2Mgr.GetPhasesForGroup(e.Action.ingamePhaseGroup.groupId);
foreach (var obj in targets)
{
foreach (var phase in phases)
obj.SetInPhase(phase, true, e.Action.ingamePhaseGroup.apply == 1);
if (e.Action.ingamePhaseGroup.apply == 1)
PhasingHandler.AddPhaseGroup(obj, e.Action.ingamePhaseGroup.groupId, true);
else
PhasingHandler.RemovePhaseGroup(obj, e.Action.ingamePhaseGroup.groupId, true);
}
break;