示例#1
1
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));
			
			reader.ReadByte(); // Id
			AttackerId = reader.ReadInt32();

			Hit hit = new Hit()
			{
				TargetId = reader.ReadInt32(),
				Damage = reader.ReadInt32(),
				Flags = reader.ReadByte()
			};

			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);

			int count = reader.ReadInt16();
			Hits = new Hit[count + 1];
			Hits[0] = hit;
			for (int i = 1; i < Hits.Length; i++)
				Hits[i] = new Hit()
				{
					TargetId = reader.ReadInt32(),
					Damage = reader.ReadInt32(),
					Flags = reader.ReadByte()
				};
		}
示例#2
0
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id
            AttackerId = reader.ReadInt32();

            Hit hit = new Hit()
            {
                TargetId = reader.ReadInt32(),
                Damage   = reader.ReadInt32(),
                Flags    = reader.ReadByte()
            };

            Position = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32()
                );

            int count = reader.ReadInt16();

            Hits    = new Hit[count + 1];
            Hits[0] = hit;
            for (int i = 1; i < Hits.Length; i++)
            {
                Hits[i] = new Hit()
                {
                    TargetId = reader.ReadInt32(),
                    Damage   = reader.ReadInt32(),
                    Flags    = reader.ReadByte()
                }
            }
            ;
        }
示例#3
0
 public static Library.Point ToPosition(Library.Point region)
 {
     return(new Library.Point(
                region.X + Size,
                region.Y + Size,
                region.Z + Size
                ));
 }
示例#4
0
        /*public Region(DataReader)
         * {
         *
         * }*/

        public static Library.Point FromPosition(Library.Point position)
        {
            return(new Library.Point(
                       (int)Math.Floor(position.X / Size),
                       (int)Math.Floor(position.Y / Size),
                       (int)Math.Floor(position.Z / Size)
                       ));
        }
示例#5
0
		public Travel(Library.Point position, Library.Point destination)
		{
			var interval = new Library.Interval(position, destination);
			double distance = interval.Length;
			int count = (int)Math.Ceiling(distance / INTERVAL) + 1;
			if (count > 1)
				Waypoints = interval.Split(count);
			else
				Waypoints = new Library.Point[] { };
		}
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			ObjectId = reader.ReadInt32();
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);
		}
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id
            ObjectId = reader.ReadInt32();
            Position = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32()
                );
        }
示例#8
0
        public Travel(Library.Point position, Library.Point destination)
        {
            var    interval = new Library.Interval(position, destination);
            double distance = interval.Length;
            int    count    = (int)Math.Ceiling(distance / INTERVAL) + 1;

            if (count > 1)
            {
                Waypoints = interval.Split(count);
            }
            else
            {
                Waypoints = new Library.Point[] { }
            };
        }
示例#9
0
		/// <summary>
		/// Разделить отрезок на N равных частей
		/// </summary>
		/// <param name="count"></param>
		/// <returns></returns>
		public Point[] Split(int count)
		{
			if (count > 1)
			{
				var waypoints = new Library.Point[count];
				for (int i = 0; i < count; i++)
					waypoints[i] = new Library.Point(
						Begin.X + (End.X - Begin.X) / (count - 1) * i,
						Begin.Y + (End.Y - Begin.Y) / (count - 1) * i,
						Begin.Z + (End.Z - Begin.Z) / (count - 1) * i);
				return waypoints;
			}
			else
				throw new ArgumentOutOfRangeException();
		}
示例#10
0
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id
            DroppedBy = reader.ReadInt32();
            ObjectId  = reader.ReadInt32();
            ItemId    = reader.ReadInt32();
            Position  = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32()
                );
            IsStackable = reader.ReadInt32() != 0;
            Count       = reader.ReadInt32();
            reader.ReadInt32();
        }
示例#11
0
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			DroppedBy = reader.ReadInt32();
			ObjectId = reader.ReadInt32();
			ItemId = reader.ReadInt32();
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);
			IsStackable = reader.ReadInt32() != 0;
			Count = reader.ReadInt32();
			reader.ReadInt32();
		}
示例#12
0
 /// <summary>
 /// Разделить отрезок на N равных частей
 /// </summary>
 /// <param name="count"></param>
 /// <returns></returns>
 public Point[] Split(int count)
 {
     if (count > 1)
     {
         var waypoints = new Library.Point[count];
         for (int i = 0; i < count; i++)
         {
             waypoints[i] = new Library.Point(
                 Begin.X + (End.X - Begin.X) / (count - 1) * i,
                 Begin.Y + (End.Y - Begin.Y) / (count - 1) * i,
                 Begin.Z + (End.Z - Begin.Z) / (count - 1) * i);
         }
         return(waypoints);
     }
     else
     {
         throw new ArgumentOutOfRangeException();
     }
 }
示例#13
0
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id

            ObjectId     = reader.ReadInt32();
            NpcId        = reader.ReadInt32();
            IsAttackable = reader.ReadInt32() != 0;
            Position     = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32());
            Heading = reader.ReadInt32();
            reader.ReadInt32();
            MAtkSpd         = reader.ReadInt32();
            PAtkSpd         = reader.ReadInt32();
            RunSpd          = reader.ReadInt32();
            WalkSpd         = reader.ReadInt32();
            SwimRunSpd      = reader.ReadInt32();
            SwimWalkSpd     = reader.ReadInt32();
            FlRunSpd        = reader.ReadInt32();
            FlWalkSpd       = reader.ReadInt32();
            FlyRunSpd       = reader.ReadInt32();
            FlyWalkSpd      = reader.ReadInt32();
            MoveSpdMult     = reader.ReadDouble();
            AtkSpdMult      = reader.ReadDouble();
            CollisionRadius = reader.ReadDouble();
            CollisionHeight = reader.ReadDouble();

            RightHand = reader.ReadInt32();
            BothHand  = reader.ReadInt32();
            LeftHand  = reader.ReadInt32();

            IsShowName  = reader.ReadByte() != 0;
            IsRunning   = reader.ReadByte() != 0;
            IsInCombat  = reader.ReadByte() != 0;
            IsAlikeDead = reader.ReadByte() != 0;
            IsSummoned  = reader.ReadByte() != 0;
            Name        = reader.ReadString(Encoding.Unicode);
            Title       = reader.ReadString(Encoding.Unicode);
        }
示例#14
0
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id

			ObjectId = reader.ReadInt32();
			NpcId = reader.ReadInt32();
			IsAttackable = reader.ReadInt32() != 0;
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32());
			Heading = reader.ReadInt32();
				reader.ReadInt32();
			MAtkSpd = reader.ReadInt32();
			PAtkSpd = reader.ReadInt32();
			RunSpd = reader.ReadInt32();
			WalkSpd = reader.ReadInt32();
			SwimRunSpd = reader.ReadInt32();
			SwimWalkSpd = reader.ReadInt32();
			FlRunSpd = reader.ReadInt32();
			FlWalkSpd = reader.ReadInt32();
			FlyRunSpd = reader.ReadInt32();
			FlyWalkSpd = reader.ReadInt32();
			MoveSpdMult = reader.ReadDouble();
			AtkSpdMult = reader.ReadDouble();
			CollisionRadius = reader.ReadDouble();
			CollisionHeight = reader.ReadDouble();

			RightHand = reader.ReadInt32();
			BothHand = reader.ReadInt32();
			LeftHand = reader.ReadInt32();

			IsShowName = reader.ReadByte() != 0;
			IsRunning = reader.ReadByte() != 0;
			IsInCombat = reader.ReadByte() != 0;
			IsAlikeDead = reader.ReadByte() != 0;
			IsSummoned = reader.ReadByte() != 0;
			Name = reader.ReadString(Encoding.Unicode);
			Title = reader.ReadString(Encoding.Unicode);
		}
示例#15
0
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			ObjectId = reader.ReadInt32();
			TargetId = reader.ReadInt32();
			SkillId = reader.ReadInt32();
			SkillLevel = reader.ReadInt32();
			CastTime = TimeSpan.FromMilliseconds(reader.ReadInt32());
			ReuseDelay = TimeSpan.FromMilliseconds(reader.ReadInt32());

			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);

			/*reader.ReadInt32();
			TargetX = reader.ReadInt32();
			TargetY = reader.ReadInt32();
			TargetZ = reader.ReadInt32();*/
		}
示例#16
0
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id
            ObjectId   = reader.ReadInt32();
            TargetId   = reader.ReadInt32();
            SkillId    = reader.ReadInt32();
            SkillLevel = reader.ReadInt32();
            CastTime   = TimeSpan.FromMilliseconds(reader.ReadInt32());
            ReuseDelay = TimeSpan.FromMilliseconds(reader.ReadInt32());

            Position = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32()
                );

            /*reader.ReadInt32();
             * TargetX = reader.ReadInt32();
             * TargetY = reader.ReadInt32();
             * TargetZ = reader.ReadInt32();*/
        }
示例#17
0
		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);
			Heading = reader.ReadInt32();
			ObjectId = reader.ReadInt32();
			Name = reader.ReadString(Encoding.Unicode);
			Race = reader.ReadInt32();
			Gender = (Lineage.Gender)reader.ReadInt32();
			Class = reader.ReadInt32();

			Underwear = reader.ReadInt32();
			Head = reader.ReadInt32();
			RightHand = reader.ReadInt32();
			LeftHand = reader.ReadInt32();
			Gloves = reader.ReadInt32();
			Chest = reader.ReadInt32();
			Legs = reader.ReadInt32();
			Feet = reader.ReadInt32();
			Back = reader.ReadInt32();
			BothHand = reader.ReadInt32();
			Hair = reader.ReadInt32();

			IsPvP = reader.ReadInt32() != 0;
			Karma = reader.ReadInt32();
			MAttackSpeed = reader.ReadInt32();
			PAttackSpeed = reader.ReadInt32();
			reader.ReadInt32(); // IsPvP again
			reader.ReadInt32(); // Karma again
			RunSpeed = reader.ReadInt32();
			WalkSpeed = reader.ReadInt32();
			SwimRunSpeed = reader.ReadInt32();
			SwimWalkSpeed = reader.ReadInt32();
			FlRunSpeed = reader.ReadInt32();
			FlWalkSpeed = reader.ReadInt32();
			FlyRunSpeed = reader.ReadInt32();
			FlyWalkSpeed = reader.ReadInt32();
			MoveSpeedMult = reader.ReadDouble();
			AttackSpeedMult = reader.ReadDouble();
			CollisionRadius = reader.ReadDouble();
			CollisionHeight = reader.ReadDouble();

			HairSytle = reader.ReadInt32();
			HairColor = reader.ReadInt32();
			FaceType = reader.ReadInt32();
			Title = reader.ReadString(Encoding.Unicode);
			ClanId = reader.ReadInt32();
			ClanCrestId = reader.ReadInt32();
			AllyId = reader.ReadInt32();
			AllyCrestId = reader.ReadInt32();
			
			SiegeFlags = reader.ReadInt32();
			IsStanding = reader.ReadByte() != 0;
			IsRunning = reader.ReadByte() != 0;
			IsInCombat = reader.ReadByte() != 0;
			IsAlikeDead = reader.ReadByte() != 0;
			IsInvisible = reader.ReadByte() != 0;
			MountType = (Lineage.MountType)reader.ReadByte();
			PrivateStore = (Lineage.PrivateStore)reader.ReadByte();

			Cubics = new Int16[reader.ReadInt16()];
			for (int i = 0; i < Cubics.Length; i++)
				Cubics[i] = reader.ReadInt16();

			IsFindParty = reader.ReadByte() != 0;
			AbnormalEffects = reader.ReadInt32();
			RecommendLeft = reader.ReadByte();
			RecommendAmount = reader.ReadInt16();
			reader.ReadInt32();
			MaxCp = reader.ReadInt32();
			Cp = reader.ReadInt32();
			EnchantAmount = reader.ReadByte();
			TeamCircle = reader.ReadByte();
			ClanLargeCrestId = reader.ReadInt32();
			IsHeroIcon = reader.ReadByte() != 0;
			IsHeroGlow = reader.ReadByte() != 0;
			IsFishing = reader.ReadByte() != 0;

			Fish = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32());

			NameColor = reader.ReadInt32();
		}
示例#18
0
 public Node Find(Library.Point point)
 {
     return(Nodes.Find(node => node.Point.Equals(point)));
 }
示例#19
0
		public override void Parse(byte[] buffer)
		{
			Reader r = new Reader(new MemoryStream(buffer));

			r.ReadByte(); // Id

			Position = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

			Heading = r.ReadInt32();
			ObjectId = r.ReadInt32();

			Name = r.ReadString(Encoding.Unicode);
			Race = r.ReadInt32();
			Gender = r.ReadInt32() == 0 ?
				Lineage.Gender.Male :
				Lineage.Gender.Female;
			BaseClassId = r.ReadInt32();
			Level = r.ReadInt32();
			Xp = r.ReadInt32();

			STR = r.ReadInt32();
			DEX = r.ReadInt32();
			CON = r.ReadInt32();
			INT = r.ReadInt32();
			WIT = r.ReadInt32();
			MEN = r.ReadInt32();

			MaxHp = r.ReadInt32();
			Hp = r.ReadInt32();
			MaxMp = r.ReadInt32();
			Mp = r.ReadInt32();

			Sp = r.ReadInt32();
			Load = r.ReadInt32();
			MaxLoad = r.ReadInt32();

			r.ReadInt32(); // ? 0x28

			Underwear.ObjectId = r.ReadInt32();
			RightEaring.ObjectId = r.ReadInt32();
			LeftEaring.ObjectId = r.ReadInt32();
			Neck.ObjectId = r.ReadInt32();
			RightFinger.ObjectId = r.ReadInt32();
			LeftFinger.ObjectId = r.ReadInt32();
			Head.ObjectId = r.ReadInt32();
			RightHand.ObjectId = r.ReadInt32();
			LeftHand.ObjectId = r.ReadInt32();
			Gloves.ObjectId = r.ReadInt32();
			Chest.ObjectId = r.ReadInt32();
			Legs.ObjectId = r.ReadInt32();
			Feet.ObjectId = r.ReadInt32();
			Back.ObjectId = r.ReadInt32();
			BothHand.ObjectId = r.ReadInt32();
			Hair.ObjectId = r.ReadInt32();

			Underwear.ItemId = r.ReadInt32();
			RightEaring.ItemId = r.ReadInt32();
			LeftEaring.ItemId = r.ReadInt32();
			Neck.ItemId = r.ReadInt32();
			RightFinger.ItemId = r.ReadInt32();
			LeftFinger.ItemId = r.ReadInt32();
			Head.ItemId = r.ReadInt32();
			RightHand.ItemId = r.ReadInt32();
			LeftHand.ItemId = r.ReadInt32();
			Gloves.ItemId = r.ReadInt32();
			Chest.ItemId = r.ReadInt32();
			Legs.ItemId = r.ReadInt32();
			Feet.ItemId = r.ReadInt32();
			Back.ItemId = r.ReadInt32();
			BothHand.ItemId = r.ReadInt32();
			Hair.ItemId = r.ReadInt32();

			PAtk = r.ReadInt32();
			PAtkSpd = r.ReadInt32(); // ToDo ???
			PDef = r.ReadInt32();
			Evasion = r.ReadInt32();
			Accuracy = r.ReadInt32();
			Focus = r.ReadInt32();
			MAtk = r.ReadInt32();
			MAtkSpd = r.ReadInt32();
			PAtkSpd = r.ReadInt32(); // ToDo ???
			MDef = r.ReadInt32();
			InPvP = r.ReadInt32() != 0;
			Karma = r.ReadInt32();

			RunSpd = r.ReadInt32();
			WalkSpd = r.ReadInt32();
			SwimRunSpd = r.ReadInt32();
			SwimWalkSpd = r.ReadInt32();
			FlRunSpd = r.ReadInt32();
			FlWalkSpd = r.ReadInt32();
			FlyRunSpd = r.ReadInt32();
			FlyWalkSpd = r.ReadInt32();

			MoveSpdMult = r.ReadDouble();
			AtkSpdMult = r.ReadDouble();
			CollisionRadius = r.ReadDouble();
			CollisionHeight = r.ReadDouble();

			HairStyle = r.ReadInt32();
			HairColor = r.ReadInt32();
			FaceType = r.ReadInt32();

			AccessLevel = r.ReadInt32();
			Title = r.ReadString(Encoding.Unicode);

			ClanId = r.ReadInt32();
			ClanCrestId = r.ReadInt32();
			AllyId = r.ReadInt32();
			AllyCrestId = r.ReadInt32();
			IsClanLeader = r.ReadInt32() != 0;
			MountType = (Lineage.MountType)r.ReadByte();
			PrivateStore = (Lineage.PrivateStore)r.ReadByte();
			HasDwarfCraft = r.ReadByte();
			Pk = r.ReadInt32();
			PvP = r.ReadInt32();

			int count = r.ReadInt16();
			Cubics = new List<Int32>(count);
			for (int i = 0; i < count; i++)
				Cubics.Add(r.ReadInt16());

			IsFindParty = r.ReadByte() != 0;
			AbnormalEffects = r.ReadInt32();
			r.ReadByte(); // ?
			r.ReadInt32(); // ClanPrivileges
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			
			RecLeft = r.ReadInt16();
			RecAmount = r.ReadInt16();
			r.ReadInt32(); // ?
			InventoryLimit = r.ReadInt16();
			ClassId = r.ReadInt32();
			SpecialEffects = r.ReadInt32();
			MaxCp = r.ReadInt32();
			Cp = r.ReadInt32();
			Enchant = r.ReadByte();
			TeamCircle = r.ReadByte();
			LargeCrestId = r.ReadInt32();

			IsHeroIcon = r.ReadByte() != 0;
			IsHeroGlow = r.ReadByte() != 0;

			IsFishing = r.ReadByte() != 0;
			Fish = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

			NameColor = r.ReadInt32();
		}
示例#20
0
        // Todo: public void UseUserCommand(Lineage.UserCommand command) // Success or error
        // Todo: public void UseSocialAction(Lineage.SocialAction action) // Finished or interrupt
        // Todo: public Result.Result MoveTo(Library.Point point) Todo: FinishMoving or AbnormalEffect or MagicSkillUse or ?
        // Todo: public void Interact(Model.Object obj, bool control = false, bool shift = false) // Succes/Die or ActionFail
        // Todo: public void UseSkill(Model.Skill skill, bool control = false, bool shift = false, SyncTarget target = 0) // Cast/Launched/Reused or Canceled
        // Todo: public void QuestionReply(Lineage.Question question, Lineage.Answer answer) // When relative action completed
        // Todo: public void Say(string message, Lineage.Channel channel = Lineage.Channel.All) // Success or block chat
        // Todo: public void Say(string message, string target) // Success or block chat or ignore or not logged

        public void MoveToAsync(Library.Point point)
        {
            GameServer.MoveTo(point);
        }
示例#21
0
        public override void Parse(byte[] buffer)
        {
            Reader r = new Reader(new MemoryStream(buffer));

            r.ReadByte();             // Id

            Position = new Library.Point(
                r.ReadInt32(),
                r.ReadInt32(),
                r.ReadInt32());

            Heading  = r.ReadInt32();
            ObjectId = r.ReadInt32();

            Name   = r.ReadString(Encoding.Unicode);
            Race   = r.ReadInt32();
            Gender = r.ReadInt32() == 0 ?
                     Lineage.Gender.Male :
                     Lineage.Gender.Female;
            BaseClassId = r.ReadInt32();
            Level       = r.ReadInt32();
            Xp          = r.ReadInt32();

            STR = r.ReadInt32();
            DEX = r.ReadInt32();
            CON = r.ReadInt32();
            INT = r.ReadInt32();
            WIT = r.ReadInt32();
            MEN = r.ReadInt32();

            MaxHp = r.ReadInt32();
            Hp    = r.ReadInt32();
            MaxMp = r.ReadInt32();
            Mp    = r.ReadInt32();

            Sp      = r.ReadInt32();
            Load    = r.ReadInt32();
            MaxLoad = r.ReadInt32();

            r.ReadInt32();             // ? 0x28

            Underwear.ObjectId   = r.ReadInt32();
            RightEaring.ObjectId = r.ReadInt32();
            LeftEaring.ObjectId  = r.ReadInt32();
            Neck.ObjectId        = r.ReadInt32();
            RightFinger.ObjectId = r.ReadInt32();
            LeftFinger.ObjectId  = r.ReadInt32();
            Head.ObjectId        = r.ReadInt32();
            RightHand.ObjectId   = r.ReadInt32();
            LeftHand.ObjectId    = r.ReadInt32();
            Gloves.ObjectId      = r.ReadInt32();
            Chest.ObjectId       = r.ReadInt32();
            Legs.ObjectId        = r.ReadInt32();
            Feet.ObjectId        = r.ReadInt32();
            Back.ObjectId        = r.ReadInt32();
            BothHand.ObjectId    = r.ReadInt32();
            Hair.ObjectId        = r.ReadInt32();

            Underwear.ItemId   = r.ReadInt32();
            RightEaring.ItemId = r.ReadInt32();
            LeftEaring.ItemId  = r.ReadInt32();
            Neck.ItemId        = r.ReadInt32();
            RightFinger.ItemId = r.ReadInt32();
            LeftFinger.ItemId  = r.ReadInt32();
            Head.ItemId        = r.ReadInt32();
            RightHand.ItemId   = r.ReadInt32();
            LeftHand.ItemId    = r.ReadInt32();
            Gloves.ItemId      = r.ReadInt32();
            Chest.ItemId       = r.ReadInt32();
            Legs.ItemId        = r.ReadInt32();
            Feet.ItemId        = r.ReadInt32();
            Back.ItemId        = r.ReadInt32();
            BothHand.ItemId    = r.ReadInt32();
            Hair.ItemId        = r.ReadInt32();

            PAtk     = r.ReadInt32();
            PAtkSpd  = r.ReadInt32();            // ToDo ???
            PDef     = r.ReadInt32();
            Evasion  = r.ReadInt32();
            Accuracy = r.ReadInt32();
            Focus    = r.ReadInt32();
            MAtk     = r.ReadInt32();
            MAtkSpd  = r.ReadInt32();
            PAtkSpd  = r.ReadInt32();            // ToDo ???
            MDef     = r.ReadInt32();
            InPvP    = r.ReadInt32() != 0;
            Karma    = r.ReadInt32();

            RunSpd      = r.ReadInt32();
            WalkSpd     = r.ReadInt32();
            SwimRunSpd  = r.ReadInt32();
            SwimWalkSpd = r.ReadInt32();
            FlRunSpd    = r.ReadInt32();
            FlWalkSpd   = r.ReadInt32();
            FlyRunSpd   = r.ReadInt32();
            FlyWalkSpd  = r.ReadInt32();

            MoveSpdMult     = r.ReadDouble();
            AtkSpdMult      = r.ReadDouble();
            CollisionRadius = r.ReadDouble();
            CollisionHeight = r.ReadDouble();

            HairStyle = r.ReadInt32();
            HairColor = r.ReadInt32();
            FaceType  = r.ReadInt32();

            AccessLevel = r.ReadInt32();
            Title       = r.ReadString(Encoding.Unicode);

            ClanId        = r.ReadInt32();
            ClanCrestId   = r.ReadInt32();
            AllyId        = r.ReadInt32();
            AllyCrestId   = r.ReadInt32();
            IsClanLeader  = r.ReadInt32() != 0;
            MountType     = (Lineage.MountType)r.ReadByte();
            PrivateStore  = (Lineage.PrivateStore)r.ReadByte();
            HasDwarfCraft = r.ReadByte();
            Pk            = r.ReadInt32();
            PvP           = r.ReadInt32();

            int count = r.ReadInt16();

            Cubics = new List <Int32>(count);
            for (int i = 0; i < count; i++)
            {
                Cubics.Add(r.ReadInt16());
            }

            IsFindParty     = r.ReadByte() != 0;
            AbnormalEffects = r.ReadInt32();
            r.ReadByte();             // ?
            r.ReadInt32();            // ClanPrivileges
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?
            r.ReadInt32();            // ?

            RecLeft   = r.ReadInt16();
            RecAmount = r.ReadInt16();
            r.ReadInt32();             // ?
            InventoryLimit = r.ReadInt16();
            ClassId        = r.ReadInt32();
            SpecialEffects = r.ReadInt32();
            MaxCp          = r.ReadInt32();
            Cp             = r.ReadInt32();
            Enchant        = r.ReadByte();
            TeamCircle     = r.ReadByte();
            LargeCrestId   = r.ReadInt32();

            IsHeroIcon = r.ReadByte() != 0;
            IsHeroGlow = r.ReadByte() != 0;

            IsFishing = r.ReadByte() != 0;
            Fish      = new Library.Point(
                r.ReadInt32(),
                r.ReadInt32(),
                r.ReadInt32());

            NameColor = r.ReadInt32();
        }
示例#22
0
        public override void Parse(byte[] buffer)
        {
            Reader reader = new Reader(new MemoryStream(buffer));

            reader.ReadByte();             // Id
            Position = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32()
                );
            Heading  = reader.ReadInt32();
            ObjectId = reader.ReadInt32();
            Name     = reader.ReadString(Encoding.Unicode);
            Race     = reader.ReadInt32();
            Gender   = (Lineage.Gender)reader.ReadInt32();
            Class    = reader.ReadInt32();

            Underwear = reader.ReadInt32();
            Head      = reader.ReadInt32();
            RightHand = reader.ReadInt32();
            LeftHand  = reader.ReadInt32();
            Gloves    = reader.ReadInt32();
            Chest     = reader.ReadInt32();
            Legs      = reader.ReadInt32();
            Feet      = reader.ReadInt32();
            Back      = reader.ReadInt32();
            BothHand  = reader.ReadInt32();
            Hair      = reader.ReadInt32();

            IsPvP        = reader.ReadInt32() != 0;
            Karma        = reader.ReadInt32();
            MAttackSpeed = reader.ReadInt32();
            PAttackSpeed = reader.ReadInt32();
            reader.ReadInt32();             // IsPvP again
            reader.ReadInt32();             // Karma again
            RunSpeed        = reader.ReadInt32();
            WalkSpeed       = reader.ReadInt32();
            SwimRunSpeed    = reader.ReadInt32();
            SwimWalkSpeed   = reader.ReadInt32();
            FlRunSpeed      = reader.ReadInt32();
            FlWalkSpeed     = reader.ReadInt32();
            FlyRunSpeed     = reader.ReadInt32();
            FlyWalkSpeed    = reader.ReadInt32();
            MoveSpeedMult   = reader.ReadDouble();
            AttackSpeedMult = reader.ReadDouble();
            CollisionRadius = reader.ReadDouble();
            CollisionHeight = reader.ReadDouble();

            HairSytle   = reader.ReadInt32();
            HairColor   = reader.ReadInt32();
            FaceType    = reader.ReadInt32();
            Title       = reader.ReadString(Encoding.Unicode);
            ClanId      = reader.ReadInt32();
            ClanCrestId = reader.ReadInt32();
            AllyId      = reader.ReadInt32();
            AllyCrestId = reader.ReadInt32();

            SiegeFlags   = reader.ReadInt32();
            IsStanding   = reader.ReadByte() != 0;
            IsRunning    = reader.ReadByte() != 0;
            IsInCombat   = reader.ReadByte() != 0;
            IsAlikeDead  = reader.ReadByte() != 0;
            IsInvisible  = reader.ReadByte() != 0;
            MountType    = (Lineage.MountType)reader.ReadByte();
            PrivateStore = (Lineage.PrivateStore)reader.ReadByte();

            Cubics = new Int16[reader.ReadInt16()];
            for (int i = 0; i < Cubics.Length; i++)
            {
                Cubics[i] = reader.ReadInt16();
            }

            IsFindParty     = reader.ReadByte() != 0;
            AbnormalEffects = reader.ReadInt32();
            RecommendLeft   = reader.ReadByte();
            RecommendAmount = reader.ReadInt16();
            reader.ReadInt32();
            MaxCp            = reader.ReadInt32();
            Cp               = reader.ReadInt32();
            EnchantAmount    = reader.ReadByte();
            TeamCircle       = reader.ReadByte();
            ClanLargeCrestId = reader.ReadInt32();
            IsHeroIcon       = reader.ReadByte() != 0;
            IsHeroGlow       = reader.ReadByte() != 0;
            IsFishing        = reader.ReadByte() != 0;

            Fish = new Library.Point(
                reader.ReadInt32(),
                reader.ReadInt32(),
                reader.ReadInt32());

            NameColor = reader.ReadInt32();
        }
示例#23
0
		public override void Parse(byte[] buffer)
		{
			Reader r = new Reader(new MemoryStream(buffer));

			r.ReadByte(); // Id

			Name = r.ReadString(Encoding.Unicode);
			ObjectId = r.ReadInt32();
			Title = r.ReadString(Encoding.Unicode);
			SessionId = r.ReadInt32();
			ClanId = r.ReadInt32();

			r.ReadInt32(); // ?

			Gender = r.ReadInt32() == 0 ?
				Lineage.Gender.Male :
				Lineage.Gender.Female;
			Race = r.ReadInt32();
			BaseClassId = r.ReadInt32();
			IsActive = r.ReadInt32() != 0;

			Position = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

			Hp = r.ReadDouble();
			Mp = r.ReadDouble();

			Sp = r.ReadInt32();
			Xp = r.ReadInt32();
			Level = r.ReadInt32();
			Karma = r.ReadInt32();

			r.ReadInt32(); // ?

			INT = r.ReadInt32();
			STR = r.ReadInt32();
			CON = r.ReadInt32();
			MEN = r.ReadInt32();
			DEX = r.ReadInt32();
			WIT = r.ReadInt32();

			r.ReadInt32(); // ?
			r.ReadInt32(); // ?

			Underwear.ObjectId = r.ReadInt32();
			RightEaring.ObjectId = r.ReadInt32();
			LeftEaring.ObjectId = r.ReadInt32();
			Neck.ObjectId = r.ReadInt32();
			RightFinger.ObjectId = r.ReadInt32();
			LeftFinger.ObjectId = r.ReadInt32();
			Head.ObjectId = r.ReadInt32();
			RightHand.ObjectId = r.ReadInt32();
			LeftHand.ObjectId = r.ReadInt32();
			Gloves.ObjectId = r.ReadInt32();
			Chest.ObjectId = r.ReadInt32();
			Legs.ObjectId = r.ReadInt32();
			Feet.ObjectId = r.ReadInt32();
			Back.ObjectId = r.ReadInt32();
			BothHand.ObjectId = r.ReadInt32();
			Hair.ObjectId = r.ReadInt32();

			Underwear.ItemId = r.ReadInt32();
			RightEaring.ItemId = r.ReadInt32();
			LeftEaring.ItemId = r.ReadInt32();
			Neck.ItemId = r.ReadInt32();
			RightFinger.ItemId = r.ReadInt32();
			LeftFinger.ItemId = r.ReadInt32();
			Head.ItemId = r.ReadInt32();
			RightHand.ItemId = r.ReadInt32();
			LeftHand.ItemId = r.ReadInt32();
			Gloves.ItemId = r.ReadInt32();
			Chest.ItemId = r.ReadInt32();
			Legs.ItemId = r.ReadInt32();
			Feet.ItemId = r.ReadInt32();
			Back.ItemId = r.ReadInt32();
			BothHand.ItemId = r.ReadInt32();
			Hair.ItemId = r.ReadInt32();

			// ToDo: other data
		}
示例#24
0
 public void Start(Library.Point target)
 {
     Model = new Model.Travel(gsApi.World.Me.Position, target);
     Program.Load(Model.Waypoints.Skip(1));
 }
示例#25
0
 public Node Near(Library.Point point)
 {
     return(Nodes.Count > 0 ? Nodes.ByMin(node => Library.Interval.Distance(node.Point, point)) : null);
 }