public static void MoveMob(MapleClient c, int objectId, bool useSkill, byte skillIndex, int unk, Point startPosition, List <MapleMovementFragment> movement, List <int> unkList, List <short> unkList2)
        {
            PacketWriter pw = new PacketWriter();

            pw.WriteHeader(SendHeader.MoveMonster);
            pw.WriteInt(objectId);
            pw.WriteBool(useSkill);
            pw.WriteByte(skillIndex);
            pw.WriteInt(unk);
            pw.WriteByte((byte)unkList.Count);
            foreach (int i in unkList)
            {
                pw.WriteInt(i);
            }
            pw.WriteByte((byte)unkList2.Count);
            foreach (short i in unkList2)
            {
                pw.WriteShort(i);
            }

            pw.WriteInt(0);
            pw.WritePoint(startPosition);
            pw.WriteInt(0);

            MapleMovementFragment.WriteMovementList(pw, movement);
            pw.WriteByte(0);

            c.Account.Character.Map.BroadcastPacket(pw, c.Account.Character, false);
        }
Example #2
0
        public PacketWriter MovePacket(Point startPosition, List <MapleMovementFragment> movementList)
        {
            PacketWriter pw = new PacketWriter();

            pw.WriteHeader(SendHeader.MoveSummon);

            pw.WriteInt(Owner.Id);
            pw.WriteInt(ObjectId);
            pw.WriteInt(0);
            pw.WritePoint(startPosition);
            pw.WriteInt(0);
            MapleMovementFragment.WriteMovementList(pw, movementList);

            return(pw);
        }
        public static PacketWriter CharacterMovePacket(int characterId, List <MapleMovementFragment> movementList, Point startPosition)
        {
            PacketWriter pw = new PacketWriter();

            pw.WriteHeader(SendHeader.MovePlayer);

            pw.WriteInt(characterId);
            pw.WriteInt(0);
            pw.WritePoint(startPosition);
            pw.WriteInt(0);

            byte size = (byte)movementList.Count;

            pw.WriteByte(size);
            for (byte i = 0; i < size; i++)
            {
                MapleMovementFragment mmf = movementList[i];
                mmf.Serialize(pw);
            }

            return(pw);
        }