Beispiel #1
0
        public override void AddTileCreature(Creature creature, bool knowsCreature)
        {
            if (knowsCreature)
            {
                netmsg.AddByte(0x62);
                netmsg.AddByte(0x00);
                netmsg.AddU32(creature.GetID());
            }
            else
            {
                netmsg.AddByte(0x61);
                netmsg.AddByte(0x00);

                netmsg.AddU32(0); //TODO: Login stuff?
                netmsg.AddU32(creature.GetID());
                netmsg.AddStringL(creature.Name);
            }

            netmsg.AddByte(creature.GetHealthPercentage());  //HP percent
            netmsg.AddByte((byte)creature.CurrentDirection); //Direction

            /*if (creature.isInvisible) {
             *  AddCreatureInvisible();
             * } else if (creature.isUsingChameleon) {
             *  AddByte(0x00);
             *  AddU16((ushort)creature.chameleonItem);
             * } else {*/
            netmsg.AddByte(0x7F); //lookhead
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);

            //netmsg.AddByte(creature.CharType);

            /*
             * netmsg.AddByte(creature.colorHead);
             * netmsg.AddByte(creature.colorBody);
             * netmsg.AddByte(creature.colorLegs);
             * netmsg.AddByte(creature.colorFeet);
             *///TODO: FINISH THIS
            // }

            netmsg.AddByte(creature.SpellLightLevel);   //light levels
            netmsg.AddByte(0xD7);                       // light color, yellow light = 0xD7

            netmsg.AddU16((ushort)creature.GetSpeed()); //speed
        }
Beispiel #2
0
 public override void UpdateCreatureHealth(Creature creature)
 {
     netmsg.AddByte(0x8C);
     netmsg.AddU32(creature.GetID());
     netmsg.AddByte(creature.GetHealthPercentage());
 }
Beispiel #3
0
 public override void UpdateCreatureHealth(Creature creature)
 {
     netmsg.AddByte(0x8C);
     netmsg.AddU32(creature.GetID());
     netmsg.AddByte(creature.GetHealthPercentage());
 }
Beispiel #4
0
        public override void AddTileCreature(Creature creature, bool knowsCreature)
        {
            if (knowsCreature) {
                netmsg.AddByte(0x62);
                netmsg.AddByte(0x00);
                netmsg.AddU32(creature.GetID());
            } else {
                netmsg.AddByte(0x61);
                netmsg.AddByte(0x00);

                netmsg.AddU32(0); //TODO: Login stuff?
                netmsg.AddU32(creature.GetID());
                netmsg.AddStringL(creature.Name);
            }

            netmsg.AddByte(creature.GetHealthPercentage()); //HP percent
            netmsg.AddByte((byte)creature.CurrentDirection); //Direction

            /*if (creature.isInvisible) {
                AddCreatureInvisible();
            } else if (creature.isUsingChameleon) {
                AddByte(0x00);
                AddU16((ushort)creature.chameleonItem);
            } else {*/
            netmsg.AddByte(0x7F); //lookhead
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);
            netmsg.AddByte(0x00);

            //netmsg.AddByte(creature.CharType);
            /*
            netmsg.AddByte(creature.colorHead);
            netmsg.AddByte(creature.colorBody);
            netmsg.AddByte(creature.colorLegs);
            netmsg.AddByte(creature.colorFeet);
             */ //TODO: FINISH THIS
               // }

            netmsg.AddByte(creature.SpellLightLevel); //light levels
            netmsg.AddByte(0xD7); // light color, yellow light = 0xD7

            netmsg.AddU16((ushort)creature.GetSpeed());  //speed
        }