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
+3 -3
View File
@@ -84,7 +84,7 @@ namespace Game.Entities
_cellCoord = GridDefines.ComputeCellCoord(GetPositionX(), GetPositionY());
CopyPhaseFrom(owner);
PhasingHandler.InheritPhaseShift(this, owner);
return true;
}
@@ -114,12 +114,12 @@ namespace Game.Entities
stmt.AddValue(index++, GetInstanceId()); // instanceId
trans.Append(stmt);
foreach (uint phaseId in GetPhases())
foreach (PhaseRef phase in GetPhaseShift().GetPhases())
{
index = 0;
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_CORPSE_PHASES);
stmt.AddValue(index++, GetOwnerGUID().GetCounter()); // OwnerGuid
stmt.AddValue(index++, phaseId); // PhaseId
stmt.AddValue(index++, phase.Id); // PhaseId
trans.Append(stmt);
}
}