Esempio n. 1
0
        public static GMCommandPacket Read(PacketHeader header, BinaryReader br)
        {
            GMCommandPacket pkt = new GMCommandPacket();

            pkt.Command   = br.ReadUInt32();
            pkt.Param     = br.ReadInt32();
            pkt.X         = br.ReadInt32();
            pkt.Y         = br.ReadInt32();
            pkt.Param2    = br.ReadInt32();
            pkt.Character = Utils.ReadByteString(br, 0x1F);
            return(pkt);
        }
Esempio n. 2
0
        void GMCommand_Process_Handler(Task t)
        {
            GMCommandPacket cmd = (GMCommandPacket)t.Args;

            string cmdString = string.Format("GM Command - {0} ({1}, {2}, {3}, {4}); Character: {5}", cmd.Command, cmd.Param, cmd.X, cmd.Y, cmd.Param2, cmd.Character);

            LogInterface.Log(cmdString);

            switch (cmd.Command)
            {
            case 0xfa3:
                AddTask(new Task(Task.TaskType.GiveItem, t.Client, new GiveItemArgs((uint)cmd.Param, GiveItemArgs.TheReason.GMCommand, 0)));
                break;

            default:
                //LogInterface.Log("Unhandled GM Command: 0x" + cmd.Command.ToString("x"));
                break;
            }
        }
Esempio n. 3
0
 private void Client_OnGMCommand(object sender, GMCommandPacket e)
 {
     TaskProcessor.AddTask(new Task(Task.TaskType.GMCommand_Process, (Connection)sender, e));
 }
Esempio n. 4
0
 public static GMCommandPacket Read(PacketHeader header, BinaryReader br)
 {
     GMCommandPacket pkt = new GMCommandPacket();
     pkt.Command = br.ReadUInt32();
     pkt.Param = br.ReadInt32();
     pkt.X = br.ReadInt32();
     pkt.Y = br.ReadInt32();
     pkt.Param2 = br.ReadInt32();
     pkt.Character = Utils.ReadByteString(br, 0x1F);
     return pkt;
 }
Esempio n. 5
0
 void GMCommand_Handler(PacketHeader header, BinaryReader br)
 {
     OnGMCommand(this, GMCommandPacket.Read(header, br));
 }
Esempio n. 6
0
 private void Client_OnGMCommand(object sender, GMCommandPacket e)
 {
     TaskProcessor.AddTask(new Task(Task.TaskType.GMCommand_Process, (Connection)sender, e));
 }