public static void CL_CHECK(BaseClient client, PacketIn packet) { Client cclient = (Client)client; uint version = packet.GetUint32(); Log.Debug("CL_CHECK", "Launcher Version : " + version); PacketOut Out = new PacketOut((byte)Opcodes.LCR_CHECK); if (version != Program.Version) { Out.WriteByte((byte)CheckResult.LAUNCHER_VERSION); // Version incorrect + message Out.WriteString(Program.Message); client.SendPacketNoBlock(Out); cclient.Disconnect("Incorrect game version"); return; } byte options = packet.GetUint8(); ulong len = 0; if ((options & 1) == 1) { Log.Debug("CHECK", "Has mythic file info"); len = packet.GetUint64(); if ((long)len != Program.Info.Length) { Out.WriteByte((byte)CheckResult.LAUNCHER_FILE); Out.WriteString(Program.StrInfo); cclient.SendPacketNoBlock(Out); return; } } if ((options & 2) == 2) { Dictionary <string, object> computerProfile = readProfile(ref packet); Log.Debug("CHECK", "Has system info"); } Out.WriteByte((byte)CheckResult.LAUNCHER_OK); cclient.SendPacketNoBlock(Out); }
static public void CL_CHECK(BaseClient client, PacketIn packet) { Client cclient = client as Client; uint Version = packet.GetUint32(); Log.Debug("CL_CHECK", "Launcher Version : " + Version); PacketOut Out = new PacketOut((byte)Opcodes.LCR_CHECK); if (Version != Program.Version) { Out.WriteByte((byte)CheckResult.LAUNCHER_VERSION); // Version incorrect + message Out.WriteString(Program.Message); client.SendPacket(Out); cclient.Disconnect(); return; } byte File = packet.GetUint8(); UInt64 Len = 0; if (File >= 1) { Len = packet.GetUint64(); } if ((long)Len != Program.Info.Length) { Out.WriteByte((byte)CheckResult.LAUNCHER_FILE); Out.WriteString(Program.StrInfo); } else { Out.WriteByte((byte)CheckResult.LAUNCHER_OK); } cclient.SendPacket(Out); }
public static void F_AUCTION_BID_ITEM(BaseClient client, PacketIn packet) { GameClient cclient = (GameClient)client; if (!cclient.IsPlaying() || !cclient.Plr.IsInWorld()) { return; } uint price = packet.GetUint32(); packet.GetUint32(); // unk // item id // 10 bytes which are sent along with the item list, might be a very long number however lets take the first 8 ulong Id = packet.GetUint64(); packet.Skip(2); // last byte ranges from 01 - 03? a flag? packet.GetUint32(); // unk AuctionHouse.BuyOutAuction(cclient.Plr, Id, price); }