Esempio n. 1
0
 public static void MakeShopPurchase(WRClient wc)
 {
     Core.OutPacket mPacket = new Core.OutPacket(30208);
     mPacket.AddBlock(1);    //Error_OK
     mPacket.AddBlock(1110); //Action_Code
     mPacket.AddBlock(-1);
     mPacket.AddBlock(3);
     mPacket.AddBlock(wc.Inventory.itemTable.Count);
     mPacket.AddBlock(wc.Inventory.BuildItemList());
     mPacket.AddBlock(wc.Account.Dinar);
     mPacket.AddBlock(wc.GetOpenSlots());
     byte[] mBuffer = mPacket.GetOutput();
     for (int I = 0; I < mBuffer.Length; I++)
     {
         mBuffer[I] ^= Core.BuildConfig.GameKey_Server;
     }
     wc.ClientSocket.Send(mBuffer);
 }
Esempio n. 2
0
 public static void MakeCharacterInfo(WRClient wc)
 {
     Core.OutPacket mPacket = new Core.OutPacket(25088);
     mPacket.AddBlock(1);
     mPacket.AddBlock("GameServer");
     mPacket.AddBlock(wc.SessionIdx);
     mPacket.AddBlock(wc.Account.Idx);
     mPacket.AddBlock(wc.SessionIdx);
     mPacket.AddBlock(wc.Account.Nickname);
     mPacket.AddBlock(-1);                                                                // CLAN
     mPacket.AddBlock(-1);                                                                // CLAN
     mPacket.AddBlock(-1);                                                                // CLAN
     mPacket.AddBlock(-1);                                                                // CLAN
     mPacket.AddBlock(wc.Account.Premium);
     mPacket.AddBlock(0);                                                                 // Unknown
     mPacket.AddBlock(0);                                                                 // Unknown
     mPacket.AddBlock(Globals.GetInstance().LevelManager.GetLevelForExp(wc.Account.Exp)); // Level
     mPacket.AddBlock(wc.Account.Exp);
     mPacket.AddBlock(0);                                                                 // Unknown
     mPacket.AddBlock(0);                                                                 // Unknown
     mPacket.AddBlock(wc.Account.Dinar);
     mPacket.AddBlock(wc.Account.Kills);
     mPacket.AddBlock(wc.Account.Deaths);
     mPacket.AddBlock(0);                 // Unknown
     mPacket.AddBlock(0);                 // Unknown
     mPacket.AddBlock(0);                 // Unknown
     mPacket.AddBlock(0);                 // Unknown
     mPacket.AddBlock(0);                 // Unknown
     mPacket.AddBlock(wc.GetOpenSlots()); // Slots opened
     mPacket.AddBlock(string.Join(",", wc.Inventory.Engineer));
     mPacket.AddBlock(string.Join(",", wc.Inventory.Medic));
     mPacket.AddBlock(string.Join(",", wc.Inventory.Sniper));
     mPacket.AddBlock(string.Join(",", wc.Inventory.Assault));
     mPacket.AddBlock(string.Join(",", wc.Inventory.Heavy));
     mPacket.AddBlock(wc.Inventory.BuildItemList());
     mPacket.AddBlock(0); // Unknown
     mPacket.AddBlock(0); // Unknown
     byte[] mBuffer = mPacket.GetOutput();
     for (int I = 0; I < mBuffer.Length; I++)
     {
         mBuffer[I] ^= Core.BuildConfig.GameKey_Server;
     }
     wc.ClientSocket.Send(mBuffer);
 }