public OutPacket(WorldCommand command) : base() { this.Header = new ClientHeader(command, this); Buffer = new MemoryStream(); base.OutStream = Buffer; }
} //im too damn lazy to type this._wh every time. sorry public WorldPacket(WorldCommand cmd, WorldHandler wh) { this.wh = wh; this.cmd = cmd; data = new List <byte>(); append((UInt16)0); append((UInt16)cmd); }
public OutPacket(WorldCommand command, int emptyOffset = 0) : base() { this.Header = new ClientHeader(command, this); Buffer = new MemoryStream(); base.OutStream = Buffer; if (emptyOffset > 0) Write(new byte[emptyOffset]); }
public void handle(WorldPacket wp) { WorldCommand com = wp.cmd; if (_handles[(int)com] == null) { Debug.Write("Received opcode " + com + " but it is not implemented yet. help!"); return; } _handles[(int)com].handle(_session._wh._status, _session, wp); }
public OutPacket(WorldCommand command, int emptyOffset = 0) : base() { this.Header = new ClientHeader(command, this); Buffer = new MemoryStream(); base.OutStream = Buffer; if (emptyOffset > 0) { Write(new byte[emptyOffset]); } }
public WorldPacket(byte[] data, WorldHandler wh) { this.wh = wh; this.data = new List <byte>(); this.data.AddRange(data); byte[] cmdbuffer = { data[0], data[1], data[2], data[3] }; byte[] decCMD = wh._ac.decrypt(cmdbuffer); this.data[0] = decCMD[0]; this.data[1] = decCMD[1]; this.data[2] = decCMD[2]; this.data[3] = decCMD[3]; this.cmd = (WorldCommand)BitConverter.ToUInt32(decCMD, 0); this._rpos = 4; }
public ClientHeader(WorldCommand command, OutPacket packet) { this.Command = command; Packet = packet; }
public MovementPacket(WorldCommand command) : base(command) { time = (uint)(DateTime.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds; }
public OpcodeTriggerAction(WorldCommand Opcode, Func<Packet, bool> PacketChecker, Action IntermediateAction = null) : base(TriggerActionType.Opcode, IntermediateAction) { this.Opcode = Opcode; this.PacketChecker = PacketChecker; }
public OpcodeTriggerAction(WorldCommand Opcode, Action IntermediateAction = null) : base(TriggerActionType.Opcode, IntermediateAction) { this.Opcode = Opcode; }
public PacketHandlerAttribute(WorldCommand command) { Command = command; }
public WorldPacket(WorldCommand cmd, WorldSession ws) : this(cmd, ws._wh) { } //im too damn lazy to type this._wh every time. sorry
public OpcodeTriggerAction(WorldCommand Opcode, Func <Packet, bool> PacketChecker, Action IntermediateAction = null) : base(TriggerActionType.Opcode, IntermediateAction) { this.Opcode = Opcode; this.PacketChecker = PacketChecker; }