6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
102 lines
2.8 KiB
C#
102 lines
2.8 KiB
C#
/* ==============================================================================
|
||
* 功能描述:ChongZhiShangPing
|
||
* 创 建 者:徐高庆
|
||
* 创建日期:2023/4/24 15:06:53
|
||
* CLR Version :4.0.30319.42000
|
||
* ==============================================================================*/
|
||
using Newtonsoft.Json;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace ObjectModel.Config
|
||
{
|
||
/// <summary>
|
||
/// 商城商品
|
||
/// </summary>
|
||
public class ChongZhiShangPing
|
||
{
|
||
/// <summary>
|
||
/// 商品Id
|
||
/// </summary>
|
||
public int id;
|
||
|
||
/// <summary>
|
||
/// 价值-参考价值
|
||
/// </summary>
|
||
[JsonIgnore]
|
||
public int jiazhi;
|
||
|
||
/// <summary>
|
||
/// 得到金币数量
|
||
/// </summary>
|
||
public long GetJinBi;
|
||
|
||
/// <summary>
|
||
/// 得到参赛卷数量 目前只能赠送获得
|
||
/// </summary>
|
||
public int GetCanSaiJuan;
|
||
|
||
/// <summary>
|
||
/// 得到复活卡数量
|
||
/// </summary>
|
||
public int GetFuHuoKa;
|
||
|
||
/// <summary>
|
||
/// 得到钻石数量--(界面显示是金砖)
|
||
/// </summary>
|
||
public int GetZuanShi;
|
||
|
||
/// <summary>
|
||
/// 得到会员天数
|
||
/// </summary>
|
||
public int GetHuiYuan;
|
||
|
||
/// <summary>
|
||
/// 要支付的钻石数量 1
|
||
/// </summary>
|
||
public int PayZuanShi ;
|
||
|
||
/// <summary>
|
||
/// 要支付的礼券数量 2
|
||
/// </summary>
|
||
public int PayLiJuan;
|
||
|
||
/// <summary>
|
||
/// 要支付的人民币数量 3
|
||
/// </summary>
|
||
public int PayRMB;
|
||
|
||
/// <summary>
|
||
/// 需要支付多少红包卷
|
||
/// </summary>
|
||
public int PayHongBao;
|
||
|
||
//注意 1/2/3 是购买这个商品要支付的数量,正常是一个值就OK了,如果是有多个值的话就说明按其中一个支付即可,但是人民币是最后一个优先级。比如买100万金币 需要支付100个砖石 或者10元人民币,那就优先用100个钻石购买,如果钻石不够,提示用户充值
|
||
|
||
/// <summary>
|
||
/// 名称
|
||
/// </summary>
|
||
public string Title;
|
||
|
||
/// <summary>
|
||
/// 获取会员的Redis Key
|
||
/// </summary>
|
||
/// <param name="userid"></param>
|
||
/// <returns></returns>
|
||
public static string GetHuiYuanKey(int userid) {
|
||
return $"huiyuan:{userid}";
|
||
}
|
||
|
||
/// <summary>
|
||
/// 是否需要兑换
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
public bool CanDuiHuan() {
|
||
return this.GetCanSaiJuan+this.GetJinBi+this.GetFuHuoKa>0;
|
||
}
|
||
}
|
||
}
|