public void ProcessEnterNewTile(CTile tile) { AZone spearWallProto = null; if (FActionStatus.HasFlag(this._proxy.GetActionFlags().CurFlags, FActionStatus.Flags.Spearwalling)) { spearWallProto = this._proxy.GetZones().Find(x => x.Type == EZone.Spear_Wall_Zone); } var deleteZones = new List <AZone>(); foreach (var zone in this.Proxy.GetZones()) { if (zone.GetData().DependsOnSourceChar&& zone.GetData().Source.Equals(this)) { deleteZones.Add(zone); } } foreach (var zone in deleteZones) { zone.RemoveFromParentAndSource(); } foreach (var neighbor in tile.GetAdjacent()) { if (spearWallProto != null) { this.ProcessSpearwallZone(neighbor, spearWallProto); } this.ProcessAttackOfOpportunityZone(neighbor); } this.SetTile(tile); }
private void ProcessSpearwallZone(CTile tile, AZone spearWallProto) { var data = new ZoneSpearWallData(); data.Dur = 1; data.Effect = spearWallProto.GetData().Effect; data.Handle = spearWallProto.GetData().Handle; data.Parent = tile; data.Source = spearWallProto.GetData().Source; var zone = new SpearWallZone(); zone.SetSpearWallZoneData(data); tile.AddZone(zone); }
public void AddZone(AZone zone) { this._model.AddLinkedZone(zone); }
public void RemoveZone(AZone zone) { this._model.GetLinkedZones().Remove(zone); }
public void AddZone(AZone zone) { this._zones.Add(zone); zone.SetParent(this); }
public void RemoveZone(AZone zone) { this._zones.Remove(zone); }
public void AddLinkedZone(AZone zone) { this._linkedZones.Add(zone); }