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 override void TryProcessHit(MHit hit, bool prediction) { base.TryProcessHit(hit, prediction); if (base.CheckConditions(hit)) { if (!prediction) { foreach (var neighbor in hit.Data.Target.GetAdjacent()) { var zoneData = new ZoneSpearWallData(); zoneData.Dur = (int)this.Data.X; zoneData.LWeapon = hit.Data.IsLWeapon; zoneData.ParentWeapon = hit.Data.Action.Data.ParentWeapon; zoneData.Parent = neighbor; zoneData.Source = hit.Data.Source; var zone = new SpearWallZone(); zone.SetSpearWallZoneData(zoneData); neighbor.AddZone(zone); } } } }