Example #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);
        }