Exemple #1
0
        public void PlayerDailyLoginItem(GPlayer player)
        {
            PangyaBinaryWriter Packet;

            Packet = new PangyaBinaryWriter();
            try
            {
                var _db        = new PangyaEntities();
                var DailyLogin = _db.ProcAlterDaily((int)player.GetUID).FirstOrDefault();

                Packet.Write(new byte[] { 0x49, 0x02 });
                Packet.WriteUInt32(0);
                Packet.WriteByte(1);
                Packet.WriteInt32(DailyLogin.Item_TypeID);
                Packet.WriteInt32(DailyLogin.Item_Quantity);
                Packet.WriteInt32(DailyLogin.Item_TypeID_Next);
                Packet.WriteInt32(DailyLogin.Item_Quantity_Next);
                Packet.WriteInt32(DailyLogin.counter);
                player.SendResponse(Packet);
            }
            catch
            {
                player.Close();
            }
            finally
            {
                if (Packet != null)
                {
                    Packet.Dispose();
                }
            }
        }