2025-04-18 19:18:15 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using GameConfig.actorConfig;
|
|
|
|
|
using TEngine;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace GameLogic
|
|
|
|
|
{
|
|
|
|
|
public class CommonData
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class AckData
|
|
|
|
|
{
|
|
|
|
|
public string msgId;
|
|
|
|
|
public string ackType;
|
|
|
|
|
|
|
|
|
|
}
|
2025-05-14 19:46:54 +08:00
|
|
|
|
|
2025-06-03 22:26:10 +08:00
|
|
|
|
public class SjData
|
|
|
|
|
{
|
|
|
|
|
public string openId;
|
|
|
|
|
public string name;
|
|
|
|
|
public int count;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-15 17:54:25 +08:00
|
|
|
|
public class UploadScoreRequest
|
|
|
|
|
{
|
|
|
|
|
public string roomId;
|
|
|
|
|
public string roundId;
|
|
|
|
|
public string anchorUid;
|
|
|
|
|
public string winSide;
|
2025-06-03 14:21:19 +08:00
|
|
|
|
public string model; // 当前游戏模式
|
2025-05-15 17:54:25 +08:00
|
|
|
|
public List<PostPlayRankData> rankVos;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-03 14:21:19 +08:00
|
|
|
|
public enum GameModelType
|
|
|
|
|
{
|
|
|
|
|
快速 = 0, // 普通模式
|
|
|
|
|
正常 = 1,
|
|
|
|
|
困难 = 2
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-14 19:46:54 +08:00
|
|
|
|
public class GameEndData
|
2025-04-18 19:18:15 +08:00
|
|
|
|
{
|
2025-05-14 19:46:54 +08:00
|
|
|
|
public string m_WinTeamName;
|
|
|
|
|
public string m_WinPlayerName;
|
|
|
|
|
public string m_SbyrPlayerName;
|
|
|
|
|
public string m_ZjgxPlayerName;
|
|
|
|
|
public string m_TzhsPlayerName;
|
|
|
|
|
public string m_DzzwPlayerName;
|
2025-04-18 19:18:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-05-14 19:46:54 +08:00
|
|
|
|
|
2025-04-18 19:18:15 +08:00
|
|
|
|
public enum GameRankType
|
|
|
|
|
{
|
|
|
|
|
当局排行榜 = 0,
|
|
|
|
|
本周排行榜 = 1,
|
|
|
|
|
本月排行榜 = 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 平台类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
public enum PlatformType
|
|
|
|
|
{
|
|
|
|
|
None, // 自测
|
|
|
|
|
Dy, // 抖音
|
|
|
|
|
DyTest,// 固定房间测试
|
|
|
|
|
Ks, // 快手
|
|
|
|
|
Tk
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GiftItemData
|
|
|
|
|
{
|
|
|
|
|
public int giftId;
|
2025-05-08 23:23:31 +08:00
|
|
|
|
public int num;
|
2025-04-18 19:18:15 +08:00
|
|
|
|
public ProtCustMessageData m_ProtCustMessageData; // 玩家基本数据
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class UnitPlayerData
|
|
|
|
|
{
|
2025-05-06 16:21:22 +08:00
|
|
|
|
public string teamId;
|
2025-04-18 19:18:15 +08:00
|
|
|
|
public ProtCustMessageData protCustMessageData;
|
|
|
|
|
public long m_Score; // 当局积分
|
|
|
|
|
public long m_AllWinCount;// 当局胜点
|
|
|
|
|
public long m_LikeCount;//当局点赞
|
2025-05-14 19:46:54 +08:00
|
|
|
|
public int m_GongXian;//当局贡献
|
|
|
|
|
public int m_AtkCount;//当局攻击
|
2025-04-18 19:18:15 +08:00
|
|
|
|
|
|
|
|
|
public void AddExp(long v)
|
|
|
|
|
{
|
|
|
|
|
protCustMessageData.rankRo.exp += v;
|
|
|
|
|
while (ConfigSystem.Instance.Tables.TbPlayerLevelConfig.DataMap.ContainsKey(protCustMessageData.rankRo.lv + 1) &&
|
|
|
|
|
protCustMessageData.rankRo.exp >= ConfigSystem.Instance.Tables.TbPlayerLevelConfig.DataMap[protCustMessageData.rankRo.lv + 1].Exp)
|
|
|
|
|
{
|
|
|
|
|
protCustMessageData.rankRo.exp -= ConfigSystem.Instance.Tables.TbPlayerLevelConfig.DataMap[protCustMessageData.rankRo.lv + 1].Exp;
|
|
|
|
|
protCustMessageData.rankRo.lv++;
|
|
|
|
|
UpdateLV();
|
|
|
|
|
OnLevelUp();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void OnLevelUp()
|
|
|
|
|
{
|
|
|
|
|
GameEvent.Send(EventConts.PlayerUpdateLv);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateLV()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GMMessage
|
|
|
|
|
{
|
|
|
|
|
public string type;
|
|
|
|
|
public string nickName;
|
|
|
|
|
public string openId;
|
|
|
|
|
public string imageUrl;
|
|
|
|
|
public string content;
|
|
|
|
|
public string count;
|
|
|
|
|
public long giftValue;
|
|
|
|
|
public int customCamp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ParentProtCustMessageData
|
|
|
|
|
{
|
|
|
|
|
public string type;
|
|
|
|
|
|
|
|
|
|
public ProtCustMessageDataRoot data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ProtCustMessageDataRoot
|
|
|
|
|
{
|
|
|
|
|
public string roomId; // 房间id
|
|
|
|
|
|
|
|
|
|
//弹幕
|
|
|
|
|
public string msgId;// string类型id
|
|
|
|
|
public string uid;// 评论用户的加密openid,当前其实没有加密
|
|
|
|
|
public string avatar;// 用户头像
|
|
|
|
|
public string name;// 评论用户昵称(不加密)
|
2025-06-03 14:21:19 +08:00
|
|
|
|
public string comment;// 评论内容
|
|
|
|
|
|
|
|
|
|
public string secWid;// 评论用户的加密openid,当前其实没有加密
|
2025-04-18 19:18:15 +08:00
|
|
|
|
public long createTime;// 评论毫秒级时间戳
|
|
|
|
|
|
|
|
|
|
//礼物
|
|
|
|
|
public string openId;// 用户的加密openid,当前其实没有加密
|
|
|
|
|
public string secUid;// 用户的加密openid,当前其实没有加密
|
|
|
|
|
public string giftId;// 加密的礼物id
|
|
|
|
|
public long repeatCount;// 送出的礼物数量
|
|
|
|
|
public string giftName;//名字
|
|
|
|
|
public string giftPictureUrl;//图片
|
|
|
|
|
public long diamondCount;//单价
|
|
|
|
|
public long giftValue;// 礼物总价值,单位分private LongcreateTime;毫秒级时间戳
|
|
|
|
|
|
|
|
|
|
//点赞
|
|
|
|
|
public string likeCount;// 点赞数,上游2s合并一次数据private Long createTime;// 点黄毫秒级时间戳
|
|
|
|
|
|
|
|
|
|
public PlayRankData rankRo;
|
|
|
|
|
|
|
|
|
|
public int customCamp;
|
|
|
|
|
}
|
|
|
|
|
public class PlayRankData
|
|
|
|
|
{
|
|
|
|
|
public string createBy { get; set; }
|
|
|
|
|
public string createTime { get; set; }
|
|
|
|
|
public string uid { get; set; }
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public string avatar;
|
|
|
|
|
public int pay; // 出票数量
|
|
|
|
|
public long winCount; // 连胜
|
|
|
|
|
public string extData1; // 自定义数据-元宝
|
|
|
|
|
public string extraInfo; // 额外信息
|
|
|
|
|
public long score;
|
|
|
|
|
public long weekScore;
|
|
|
|
|
public int rank;
|
|
|
|
|
public int weekRank; //zhou
|
|
|
|
|
public long exp;
|
|
|
|
|
public long lv;
|
|
|
|
|
}
|
|
|
|
|
public class PlayRankRootData
|
|
|
|
|
{
|
|
|
|
|
public int code;
|
|
|
|
|
public string msg;
|
|
|
|
|
public List<PlayRankData> data;
|
|
|
|
|
}
|
|
|
|
|
public class ProtCustMessageData
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string method { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ͷַ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string imgURL { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string nickName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// UID
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string secUid { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string content { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Count { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ǷǷ˿
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool isFanSi { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ψһid
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string openId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 总价值
|
|
|
|
|
/// </summary>
|
|
|
|
|
public long giftValue { get; set; }
|
|
|
|
|
|
|
|
|
|
public long createTime { get; set; }
|
|
|
|
|
|
|
|
|
|
public PlayRankData rankRo { get; set; }
|
|
|
|
|
|
|
|
|
|
public int customCamp { get; set; }
|
|
|
|
|
public string roomId { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class PostPlayRankData
|
|
|
|
|
{
|
|
|
|
|
public string uid;
|
|
|
|
|
public string name;
|
|
|
|
|
public string avatar;
|
|
|
|
|
public long score;
|
|
|
|
|
public long weekScore;
|
|
|
|
|
public long pay; // 出票数量
|
|
|
|
|
public string extData1; // 自定义数据
|
|
|
|
|
public string extraInfo; // 额外信息
|
|
|
|
|
public long winCount; // 连胜
|
|
|
|
|
public string useClientData;
|
|
|
|
|
public long exp;
|
|
|
|
|
public long lv;
|
2025-05-31 21:16:03 +08:00
|
|
|
|
public string campName; // 家族名称
|
2025-04-18 19:18:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class RoomInfoData
|
|
|
|
|
{
|
|
|
|
|
public string room_id;
|
|
|
|
|
public string anchor_open_id;
|
|
|
|
|
public string avatar_url;
|
|
|
|
|
public string nick_name;
|
|
|
|
|
public int level;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GetScoreDataRoot
|
|
|
|
|
{
|
|
|
|
|
public string msg;
|
|
|
|
|
public int code;
|
|
|
|
|
public ScoreData data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ScoreData
|
|
|
|
|
{
|
|
|
|
|
public string anchorUid;
|
|
|
|
|
public string anchorName;
|
|
|
|
|
public string anchorAvatar;
|
|
|
|
|
public string score;
|
|
|
|
|
public string appid;
|
|
|
|
|
public int anchorScore;
|
|
|
|
|
public int anchorWeekScore;
|
|
|
|
|
public int occupyCount;
|
|
|
|
|
public int winCount;
|
|
|
|
|
public int country;
|
|
|
|
|
public long rank;
|
|
|
|
|
public long weekRank;
|
|
|
|
|
public long occupyRank;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class RoundVo
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//CLOSE, // 关闭中
|
|
|
|
|
//DEF, // 空闲
|
|
|
|
|
//PVP, // 普通游戏进行中
|
|
|
|
|
//PK, // pk进行中
|
|
|
|
|
//PVE // pve 国战进行中
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 回合结束的游戏类型, 定义见 RoomStateEnum
|
|
|
|
|
*/
|
|
|
|
|
public string type;
|
|
|
|
|
/**
|
|
|
|
|
* 玩法模式的id。
|
|
|
|
|
*/
|
|
|
|
|
public string id;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 直播间的对局Id,每个直播间不同。 通常是整数类型【如果不提供,服务器端自动生成(长度16)】
|
|
|
|
|
*/
|
|
|
|
|
public string roundId;
|
|
|
|
|
/**
|
|
|
|
|
* 当前主播扮演方 [【红:red、蓝:blue】]
|
|
|
|
|
*/
|
|
|
|
|
public string side;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 胜利方 【回合结束时传递】
|
|
|
|
|
*/
|
|
|
|
|
public string winSide;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class VipItemData
|
|
|
|
|
{
|
|
|
|
|
public int m_RankNum; // 排行
|
|
|
|
|
// public TeamUnitEnum m_TeamEnum; // 阵营
|
|
|
|
|
public ProtCustMessageData m_ProtCustMessageData; // 玩家基本数据
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class GetRoomIdData
|
|
|
|
|
{
|
|
|
|
|
public string token;
|
|
|
|
|
}
|
|
|
|
|
public class GetRoomDataRoot
|
|
|
|
|
{
|
|
|
|
|
public string msg;
|
|
|
|
|
public int code;
|
|
|
|
|
public RoomInfoData data;
|
|
|
|
|
}
|
2025-06-01 17:49:33 +08:00
|
|
|
|
|
|
|
|
|
public class GetJiaZuData
|
|
|
|
|
{
|
|
|
|
|
public string property;
|
|
|
|
|
public string type;
|
|
|
|
|
public int top;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class JiaZuRankDataRoot
|
|
|
|
|
{
|
|
|
|
|
public int code;
|
|
|
|
|
public string msg;
|
|
|
|
|
public List<JiaZuData> data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class JiaZuData
|
|
|
|
|
{
|
|
|
|
|
public string name;
|
|
|
|
|
public long score;
|
2025-06-03 15:03:05 +08:00
|
|
|
|
public List<JiaZuDataChile> modelList;
|
2025-06-01 17:49:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-06-03 15:03:05 +08:00
|
|
|
|
public class JiaZuDataChile
|
|
|
|
|
{
|
|
|
|
|
public string model;
|
|
|
|
|
public long score;
|
|
|
|
|
public List<JiaZuChilePlayerData> avatarList;
|
|
|
|
|
public string uid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class JiaZuChilePlayerData
|
|
|
|
|
{
|
|
|
|
|
public string uid;
|
|
|
|
|
public string name;
|
|
|
|
|
public string avatar;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-06-01 17:49:33 +08:00
|
|
|
|
|
2025-04-18 19:18:15 +08:00
|
|
|
|
}
|