using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
///
/// 限时礼包
///
public class LimitTsGiftVo
{
public LimitTsGiftVo()
{
}
private readonly Player p = UserProxy.Instance.player;
///
/// 礼包id
///
public int giftId
{
get
{
return GameConfigData.Ins.Getshop_limit_typeMo(Enum_Recharge.limitTsActiveGift.ToString())[0].typeId;
}
}
public string name
{
get
{
return this.mo.name;
}
}
public string icon
{
get
{
return this.mo.icon;
}
}
//是否推送限时活动礼包信息
public Enum_FirstRechargeState State
{
get
{
long starTs = long.Parse(GameConfigData.Ins.globalsettings.limitTsActiveGiftStartTs.ToString());
long endTs = long.Parse(GameConfigData.Ins.globalsettings.limitTsActiveGiftEndTs.ToString());
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
long curTs = Convert.ToInt64(ts.TotalSeconds);
if (starTs <= curTs && curTs < endTs)
{
if (this.p.shopdata.limitTsRewardsList.Contains(this.giftId))
{
return Enum_FirstRechargeState.ReceivePrize;
}
else
{
return Enum_FirstRechargeState.ReceivePrize;
}
}
return Enum_FirstRechargeState.NoFirstRecharge;//没有在推送限时活动礼包的时间里
//if (this.p.payInfo.firstRechage == 0 && this.player.baseInfo.charge_amt <= 0)
//{
// return Enum_FirstRechargeState.NoFirstRecharge;
//}
//else if (this.player.payInfo.firstRechage == 0 && this.player.baseInfo.charge_amt > 0)
//{
// return Enum_FirstRechargeState.NoReceivePrize;
//}
//return Enum_FirstRechargeState.ReceivePrize;
}
}
///
/// 当前时间
///
public long curTs
{
get
{
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
long curTs = Convert.ToInt64(ts.TotalSeconds);
return curTs;
}
}
///
/// 活动礼包开始时间
///
public long starTs
{
get
{
long starTs = long.Parse(GameConfigData.Ins.globalsettings.limitTsActiveGiftStartTs.ToString());
return starTs;
}
}
///
/// 礼包信息
///
public List reward
{
get
{
return ItemVo.ParsItemContentStr(this.mo.reward);
}
}
public sm_shop_limit mo
{
get
{
return GameConfigData.Ins.Getshop_limitMo(this.giftId);
}
}
}
///
/// 限时随机礼包
///
public class LimitTsRandGiftVo
{
public LimitTsRandGiftVo()
{
}
private readonly Player p = UserProxy.Instance.player;
public class RandGiftVo
{
public int giftId { get; set; }
}
///
///
///
public Enum_FirstRechargeState State
{
get
{
if (this.p.triggerLimitTsGift.Count == 0)
{
return Enum_FirstRechargeState.NoFirstRecharge;
}
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
long curTs = Convert.ToInt64(ts.TotalSeconds);
List list = this.p.triggerLimitTsGift;
//foreach (Ins_Gift item in list)
//{
// item.startTs;
//}
return Enum_FirstRechargeState.NoFirstRecharge;
}
}
}