コード例 #1
0
        static Common()
        {
            _xsd = new XSD();
            _xsd.DBI.Columns.Add("DBConnectionString");
            _xsd.DBC.Columns.Add("DBConnectionString");

            fsw.Changed += new FileSystemEventHandler(fsw_Changed);

            // 准备完成,读取cs.res文件
            ReadFile();
        }
コード例 #2
0
ファイル: Common.cs プロジェクト: lujinlong/Apq
		static Common()
		{
			_xsd = new XSD();
			_xsd.DBI.Columns.Add("DBConnectionString");
			_xsd.DBC.Columns.Add("DBConnectionString");

			fsw.Changed += new FileSystemEventHandler(fsw_Changed);

			// 准备完成,读取cs.res文件
			ReadFile();
		}
コード例 #3
0
 private gpxWpt ConvertToWayPoint(XSD.Ver10.gpxTrkTrksegTrkpt trackSegmentWaypoint)
 {
     XSD.Ver10.gpxWpt wpt = new gpxWpt();
     wpt.lat = trackSegmentWaypoint.lat;
     wpt.lon = trackSegmentWaypoint.lon;
     wpt.ele = trackSegmentWaypoint.ele;
     wpt.eleSpecified = trackSegmentWaypoint.eleSpecified;
     wpt.ageofdgpsdata = trackSegmentWaypoint.ageofdgpsdata;
     wpt.ageofdgpsdataSpecified = trackSegmentWaypoint.ageofdgpsdataSpecified;
     wpt.Any = trackSegmentWaypoint.Any;
     wpt.cmt = trackSegmentWaypoint.cmt;
     wpt.desc = trackSegmentWaypoint.desc;
     wpt.dgpsid = trackSegmentWaypoint.dgpsid;
     wpt.fix = trackSegmentWaypoint.fix;
     wpt.fixSpecified = trackSegmentWaypoint.fixSpecified;
     wpt.geoidheight = trackSegmentWaypoint.geoidheight;
     wpt.geoidheightSpecified = trackSegmentWaypoint.geoidheightSpecified;
     wpt.hdop = trackSegmentWaypoint.hdop;
     wpt.hdopSpecified = trackSegmentWaypoint.hdopSpecified;
     wpt.magvar = trackSegmentWaypoint.magvar;
     wpt.magvarSpecified = trackSegmentWaypoint.magvarSpecified;
     wpt.name = trackSegmentWaypoint.name;
     wpt.pdop = trackSegmentWaypoint.pdop;
     wpt.pdopSpecified = trackSegmentWaypoint.pdopSpecified;
     wpt.sat = trackSegmentWaypoint.sat;
     wpt.src = trackSegmentWaypoint.src;
     wpt.sym = trackSegmentWaypoint.sym;
     wpt.time = trackSegmentWaypoint.time;
     wpt.timeSpecified = trackSegmentWaypoint.timeSpecified;
     wpt.type = trackSegmentWaypoint.type;
     wpt.url = trackSegmentWaypoint.url;
     wpt.urlname = trackSegmentWaypoint.urlname;
     wpt.vdop = trackSegmentWaypoint.vdop;
     wpt.vdopSpecified = trackSegmentWaypoint.vdopSpecified;
     return wpt;
 }
コード例 #4
0
 private gpxWpt ConvertRouteWaypint(XSD.Ver10.gpxRteRtept routePoint)
 {
     XSD.Ver10.gpxWpt wpt = new gpxWpt();
     wpt.lat = routePoint.lat;
     wpt.lon = routePoint.lon;
     wpt.ele = routePoint.ele;
     wpt.eleSpecified = routePoint.eleSpecified;
     wpt.ageofdgpsdata = routePoint.ageofdgpsdata;
     wpt.ageofdgpsdataSpecified = routePoint.ageofdgpsdataSpecified;
     wpt.Any = routePoint.Any;
     wpt.cmt = routePoint.cmt;
     wpt.desc = routePoint.desc;
     wpt.dgpsid = routePoint.dgpsid;
     wpt.fix = routePoint.fix;
     wpt.fixSpecified = routePoint.fixSpecified;
     wpt.geoidheight = routePoint.geoidheight;
     wpt.geoidheightSpecified = routePoint.geoidheightSpecified;
     wpt.hdop = routePoint.hdop;
     wpt.hdopSpecified = routePoint.hdopSpecified;
     wpt.magvar = routePoint.magvar;
     wpt.magvarSpecified = routePoint.magvarSpecified;
     wpt.name = routePoint.name;
     wpt.pdop = routePoint.pdop;
     wpt.pdopSpecified = routePoint.pdopSpecified;
     wpt.sat = routePoint.sat;
     wpt.src = routePoint.src;
     wpt.sym = routePoint.sym;
     wpt.time = routePoint.time;
     wpt.timeSpecified = routePoint.timeSpecified;
     wpt.type = routePoint.type;
     wpt.url = routePoint.url;
     wpt.urlname = routePoint.urlname;
     wpt.vdop = routePoint.vdop;
     wpt.vdopSpecified = routePoint.vdopSpecified;
     return wpt;
 }
コード例 #5
0
 public GPX10TrackSegment(XSD.Ver10.gpxTrkTrkseg trkSeg)
 {
     _trkSeg = trkSeg;
     _segmentWaypoints = GetSegmentWaypoints();
 }
コード例 #6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="rteType"></param>
 public GPX11Route(XSD.Ver11.rteType rteType)
 {
     _rteType = rteType;
     _waypoints = GetRoutePoints();
 }
コード例 #7
0
 public GPX10Bounds(XSD.Ver10.boundsType bounds)
 {
     _bounds = bounds;
 }
コード例 #8
0
 public GPX11Bounds(XSD.Ver11.boundsType bounds)
 {
     _bounds = bounds;
 }
コード例 #9
0
ファイル: Map.cs プロジェクト: DomGrieco/server
        /// <summary>
        /// Create a new Hybrasyl map from an XMLMap object.
        /// </summary>
        /// <param name="mapElement"></param>
        public Map(XSD.Map newMap, World theWorld)
        {
            Init();
            World = theWorld;

            // TODO: refactor Map class to not do this, but be a partial which overlays
            // TODO: XmlMap (which would then just be Map)
            Id = newMap.Id;
            X = newMap.X;
            Y = newMap.Y;
            Name = newMap.Name;
            EntityTree = new QuadTree<VisibleObject>(0,0,X,Y);
            Music = newMap.Music;

            foreach (var warpElement in newMap.Warps)
            {
                var warp = new Warp(this);
                warp.X = warpElement.X;
                warp.Y = warpElement.Y;

                if (warpElement.MapTarget !=null)
                {
                    var maptarget = warpElement.MapTarget as XSD.WarpMaptarget;
                    // map warp
                    warp.DestinationMapName = maptarget.Value;
                    warp.WarpType = WarpType.Map;
                    warp.DestinationX = maptarget.X;
                    warp.DestinationY = maptarget.Y;
                }
                else
                {
                    var worldmaptarget = warpElement.WorldMapTarget as XSD.WorldMapPointTarget;
                    // worldmap warp
                    warp.DestinationMapName = worldmaptarget.Value;
                    warp.WarpType = WarpType.WorldMap;
                }

                warp.MinimumLevel = warpElement.Restrictions.Level.Min;
                warp.MaximumLevel = warpElement.Restrictions.Level.Max;
                warp.MinimumAbility = warpElement.Restrictions.Ab.Min;
                warp.MaximumAbility = warpElement.Restrictions.Ab.Max;
                warp.MobUse = warpElement.Restrictions.NoMobUse == null;
                Warps[new Tuple<byte, byte>(warp.X, warp.Y)] = warp;
            }

            foreach (var npcElement in newMap.Npcs)
            {
                var merchant = new Merchant
                {
                    X = npcElement.X,
                    Y = npcElement.Y,
                    Name = npcElement.Name,
                    Sprite = npcElement.Appearance.Sprite,
                    Direction = (Enums.Direction) npcElement.Appearance.Direction,
                    Portrait = npcElement.Appearance.Portrait,
                    // Wow this is terrible
                    Jobs = ((MerchantJob) (int) npcElement.Jobs)
                };
                InsertNpc(merchant);
            }

            foreach (var reactorElement in newMap.Reactors)
            {
                // TODO: implement reactor loading support
            }

            foreach (var postElement in newMap.Signposts.Items)
            {
                if (postElement is XSD.Signpost)
                {
                    var signpostElement = postElement as XSD.Signpost;
                    var signpost = new Objects.Signpost(signpostElement.X, signpostElement.Y, signpostElement.Message);
                    InsertSignpost(signpost);
                }
                else
                {
                    // TODO: Messageboards
                    Logger.InfoFormat("{0}: messageboard ignored", Name);                
                }
            }

            foreach (var spawnElement in newMap.Spawns)
            {
                // TODO: implement spawning
            }

            Load();
        }
コード例 #10
0
ファイル: Map.cs プロジェクト: DomGrieco/server
        public WorldMap(XSD.WorldMap newWorldMap)
        {
            Points = new List<MapPoint>();
            Name = newWorldMap.Name;
            ClientMap = newWorldMap.Clientmap;

            foreach (var point in newWorldMap.Points.Point)
            {
                var mapPoint = new MapPoint(point.Y, point.X)
                {
                    DestinationMap = point.Target.Value,
                    DestinationX = point.Target.X,
                    DestinationY = point.Target.Y,
                    Pointname = point.Name
                };
                // We don't implement world map point restrictions yet, so we're done here
                Points.Add(mapPoint);
            }

        }
コード例 #11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="file"></param>
 public GPX11FileDetails(XSD.Ver11.gpxType gpxType)
 {
     _gpxType = gpxType;
 }
コード例 #12
0
 public GPX11TrackSegment(XSD.Ver11.trksegType trkSeg)
 {
     _trkSeg = trkSeg;
     _segmentWaypoints = GetSegmentWaypoints();
 }
コード例 #13
0
ファイル: WorldObject.cs プロジェクト: DomGrieco/server
 public override void Attack(Direction direction, XSD.Castable castObject = null, Creature target = null)
 {
     //do monster attack.
 }
コード例 #14
0
ファイル: WorldObject.cs プロジェクト: DomGrieco/server
 public virtual void Attack(XSD.Castable castObject)
 {
     //do aoe?
 }
コード例 #15
0
ファイル: WorldObject.cs プロジェクト: DomGrieco/server
 public virtual void Attack(XSD.Castable castObject, Creature target = null)
 {
     //do spell?
 }
コード例 #16
0
ファイル: WorldObject.cs プロジェクト: DomGrieco/server
 public virtual void Attack(Direction direction, XSD.Castable castObject, Creature target = null)
 {
     //do something?
 }