public void Load(PangyaBinaryReader reader, byte[] roomKey) { //var result = reader.ReadBytes(56); var decrypted = DecryptShot( reader.ReadBytes((int)(reader.BaseStream.Length - reader.BaseStream.Position)) , roomKey); ResponseShot = decrypted.Take(38).ToArray(); var readerDecripted = new PangyaBinaryReader(new MemoryStream(decrypted)); ConnectionId = readerDecripted.ReadInt32(); X = readerDecripted.ReadInt32(); Y = readerDecripted.ReadInt32(); Z = readerDecripted.ReadInt32(); ShotType = (ShotTypeEnum)readerDecripted.ReadByte(); Unknown1 = readerDecripted.ReadInt16(); Pang = readerDecripted.ReadUInt32(); BonusPang = readerDecripted.ReadUInt32(); Unknown2 = readerDecripted.ReadInt32(); MatchData = readerDecripted.ReadBytes(6); Unknown3 = readerDecripted.ReadBytes(17); }
public override void Load(PangyaBinaryReader reader) { BuyType = (GameShopEnum)reader.ReadByte(); BuyTotal = reader.ReadUInt16(); for (int Count = 0; Count <= BuyTotal - 1; Count++) { var item = new ShopItem(); item.UN1 = reader.ReadInt32(); //PlayerCurrentMoney item.TypeId = reader.ReadInt32(); item.TotalDay = reader.ReadInt16(); item.UN2 = reader.ReadInt16(); item.ItenQtd = reader.ReadInt32(); item.PangPrice = reader.ReadInt32(); item.CookiePrice = reader.ReadInt32(); BuyItens.Add(item); } }