public void MergeFlags(SpellShape other) { foreach (var flag in other.Flags.Where(f => !Flags.Contains(f))) { Flags.Add(flag); } }
public SpellCast(BattleCharacter caster) { CasterId = caster.NpcId; SpellId = caster.SpellCastInfo.ActionId; Name = caster.SpellCastInfo.Name; CasterLocation = caster.Location; TargetLocation = caster.TargetCharacter == null ? CasterLocation : caster.TargetCharacter.Location; CasterHeading = caster.Heading; Caster = caster; StartTime = DateTime.Now; CastTime = caster.SpellCastInfo.CastTime.TotalMilliseconds; SpellShape shape; if (!Database.Shapes.TryGetValue(SpellId, out shape)) { shape = new SpellShape(); IsUnknown = true; } Shape = shape; TotalDuration = shape.Duration + CastTime; }