Exemplo n.º 1
0
        //0x1C
        private static void OnASCIIMessage(Packet p)
        {
            Entity entity = Mobiles.Get(p.ReadUInt());
            ushort graphic = p.ReadUShort();
            MessageType type = (MessageType)p.ReadByte();
            Hue hue = p.ReadUShort();
            MessageFont font = (MessageFont)p.ReadUShort();
            string name = p.ReadASCII(30);
            string text = p.ReadASCII();

            if (entity != null)
            {
                entity.Graphic = graphic;
                entity.Name = name;
                entity.ProcessDelta();
            }
            Chat.OnMessage(entity, new UOMessageEventArgs(text, hue, type, font));
        }
Exemplo n.º 2
0
        //0xCC
        private static void OnLocalizedMessageAffix(Packet p)
        {
            Entity entity = Mobiles.Get(p.ReadUInt());
            ushort graphic = p.ReadUShort();
            MessageType type = (MessageType)p.ReadByte();
            Hue hue = p.ReadUShort();
            MessageFont font = (MessageFont)p.ReadUShort();
            uint cliloc = p.ReadUInt();
            AffixType affixType = (AffixType)p.ReadByte();
            string name = p.ReadASCII(30);
            string affix = p.ReadASCII();
            string text = p.ReadUnicode();

            if (entity != null)
            {
                entity.Graphic = graphic;
                entity.Name = name;
                entity.ProcessDelta();
            }
            Chat.OnLocalizedMessage(entity, new UOMessageEventArgs(text, hue, type, font, cliloc, affixType, affix));
        }
Exemplo n.º 3
0
        //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();
        }