コード例 #1
0
ファイル: Mobiles.cs プロジェクト: greeduomacro/UOInterface
        //0x17
        private static void OnMobileHealthbar(Packet p)
        {
            Mobile mobile = Mobiles.Get(p.ReadUInt());
            if (mobile == null)
                return;

            p.Skip(2);//unknown

            UOFlags flag;
            ushort type = p.ReadUShort();
            if (type == 1)
                flag = UOFlags.Poisoned;
            else if (type == 2)
                flag = UOFlags.YellowBar;
            else
                return;

            mobile.Flags = p.ReadBool() ? mobile.Flags | flag : mobile.Flags & ~flag;
            mobile.ProcessDelta();
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: greeduomacro/UOInterface
 //0x72
 private static void OnWarMode(Packet p)
 {
     Player.WarMode = p.ReadBool();
     Player.ProcessDelta();
 }
コード例 #3
0
ファイル: Mobiles.cs プロジェクト: greeduomacro/UOInterface
        //0x11
        private static void OnMobileStatus(Packet p)
        {
            Mobile mobile = Mobiles.Get(p.ReadUInt());
            if (mobile == null)
                return;

            mobile.Name = p.ReadASCII(30);
            mobile.Hits = p.ReadUShort();
            mobile.HitsMax = p.ReadUShort();
            mobile.Renamable = p.ReadBool();

            byte type = p.ReadByte();
            if (type > 0)
            {
                Player.Female = p.ReadBool();
                Player.Strength = p.ReadUShort();
                Player.Dexterity = p.ReadUShort();
                Player.Intelligence = p.ReadUShort();
                Player.Stamina = p.ReadUShort();
                Player.StaminaMax = p.ReadUShort();
                Player.Mana = p.ReadUShort();
                Player.ManaMax = p.ReadUShort();
                Player.Gold = p.ReadUInt();
                Player.ResistPhysical = p.ReadUShort();
                Player.Weight = p.ReadUShort();
            }

            if (type >= 5)//ML
            {
                Player.WeightMax = p.ReadUShort();
                p.Skip(1);
            }

            if (type >= 2)//T2A
                p.Skip(2);

            if (type >= 3)//Renaissance
            {
                Player.Followers = p.ReadByte();
                Player.FollowersMax = p.ReadByte();
            }

            if (type >= 4)//AOS
            {
                Player.ResistFire = p.ReadUShort();
                Player.ResistCold = p.ReadUShort();
                Player.ResistPoison = p.ReadUShort();
                Player.ResistEnergy = p.ReadUShort();
                Player.Luck = p.ReadUShort();
                Player.DamageMin = p.ReadUShort();
                Player.DamageMax = p.ReadUShort();
                Player.TithingPoints = p.ReadUInt();
            }

            mobile.ProcessDelta();
        }