Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void AddZone(AZone zone)
 {
     this._model.AddLinkedZone(zone);
 }
Exemple #4
0
 public void RemoveZone(AZone zone)
 {
     this._model.GetLinkedZones().Remove(zone);
 }
Exemple #5
0
 public void AddZone(AZone zone)
 {
     this._zones.Add(zone);
     zone.SetParent(this);
 }
Exemple #6
0
 public void RemoveZone(AZone zone)
 {
     this._zones.Remove(zone);
 }
Exemple #7
0
 public void AddLinkedZone(AZone zone)
 {
     this._linkedZones.Add(zone);
 }