Files
hjha-server/ObjectModel/Config/ChongZhiShangPing.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
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
2026-07-07 12:02:15 +08:00

102 lines
2.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ==============================================================================
* 功能描述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;
}
}
}