|
@@ -0,0 +1,149 @@
|
|
|
+package com.incubator.core;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 网络消息号定义
|
|
|
+ * 规则:
|
|
|
+ * 1. 所有客户端请求以奇数结尾
|
|
|
+ * 2. 所有服务器响应和推送以偶数结尾
|
|
|
+ * 3. 推送消息以9开头
|
|
|
+ */
|
|
|
+public final class Cmd {
|
|
|
+
|
|
|
+ //******* 服务器 → 客户端 ******//
|
|
|
+ public static int DEFAULT = 0; //默认
|
|
|
+
|
|
|
+ //******* 游戏服 → 中控 ******//
|
|
|
+ public static int S2S_GAME_REG = 5000; // 请求 注册中控
|
|
|
+ public static int S2S_GAME_REG_RSP = 6000; // 响应 注册中控
|
|
|
+
|
|
|
+ // 系统消息 100001-100100
|
|
|
+ public static int HeartBeatReq = 100001; // 心跳请求(客户端)
|
|
|
+ public static int HeartBeatRes = 100002; // 心跳响应(服务器)
|
|
|
+ public static int LoginReq = 100003; // 登录请求(客户端)
|
|
|
+ public static int LoginRes = 100004; // 登录响应(服务器)
|
|
|
+ public static int CreateRoomReq = 100007; // 创建房间请求
|
|
|
+ public static int CreateRoomRes = 100008; // 创建房间响应
|
|
|
+ public static int JoinRoomReq = 100009; // 加入房间请求
|
|
|
+ public static int JoinRoomRes = 100010; // 加入房间响应
|
|
|
+ public static int RoomReadyReq = 100011; // 玩家进入房间后点击准备请求
|
|
|
+ public static int RoomReadyRes = 100012; // 玩家进入房间后点击准备响应
|
|
|
+ public static int PlayDisCardsReq = 100013; // 出牌请求
|
|
|
+ public static int PlayDisCardsRes = 100014; // 出牌响应
|
|
|
+ public static int OperationReq = 100015; // 玩家操作动作吃、碰、杠、胡、过请求
|
|
|
+ public static int OperationRes = 100016; // 玩家操作动作吃、碰、杠、胡、过响应
|
|
|
+ public static int EnterBackCardsReq = 100017; // 进还贡牌请求
|
|
|
+ public static int EnterBackCardsRes = 100018; // 进还贡牌响应
|
|
|
+ public static int RoomRuleInfoReq = 100019; // 房间规则详细信息请求
|
|
|
+ public static int RoomRuleInfoRes = 100020; // 房间规则详细信息响应
|
|
|
+
|
|
|
+ public static int LeaveRoomReq = 100025; //玩家离开房间请求
|
|
|
+ public static int LeaveRoomRes = 100026; //玩家离开房间响应
|
|
|
+
|
|
|
+ // 测试消息 200001-200100
|
|
|
+ public static int NormalMsgReq = 200001; // 普通消息请求(客户端)
|
|
|
+ public static int NormalMsgRes = 200002; // 普通消息响应(服务器)
|
|
|
+
|
|
|
+ // 商城消息 200101-200200
|
|
|
+ public static int ShopInfoReq = 200101; // 获取商城信息请求(客户端)
|
|
|
+ public static int ShopInfoRes = 200102; // 获取商城信息响应(服务器)
|
|
|
+ public static int ShopBuyReq = 200103; // 购买物品请求(客户端)
|
|
|
+ public static int ShopBuyRes = 200104; // 购买物品响应(服务器)
|
|
|
+
|
|
|
+ // 背包消息 200201-200300
|
|
|
+ public static int BagInfoReq = 200201; // 获取背包信息请求(客户端)
|
|
|
+ public static int BagInfoRes = 200202; // 获取背包信息响应(服务器)
|
|
|
+ public static int BagUseReq = 200203; // 使用物品请求(客户端)
|
|
|
+ public static int BagUseRes = 200204; // 使用物品响应(服务器)
|
|
|
+
|
|
|
+ //个人中心
|
|
|
+ public static int ProfileInfoReq = 200301; //个人中心信息请求
|
|
|
+ public static int ProfileInfoRes = 200302; //个人中心信息响应
|
|
|
+ public static int UpdateAvatarUrlReq = 200303; //修改个人头像请求
|
|
|
+ public static int UpdateAvatarUrlRes = 200304; //修改个人头像响应
|
|
|
+ public static int UpdateNickNameReq = 200305; //修改个人昵称请求
|
|
|
+ public static int UpdateNickNameRes = 200306; //修改个人昵称响应
|
|
|
+ public static int UpdateCharacterUrlReq = 200307; //修改个人人物请求
|
|
|
+ public static int UpdateCharacterUrlRes = 200308; //修改个人人物响应
|
|
|
+ public static int UpdatePhoneReq = 200309; //修改个人手机请求
|
|
|
+ public static int UpdatePhoneRes = 200310; //修改个人手机响应
|
|
|
+ public static int SaveAddressReq = 200311; //保存收货地址请求
|
|
|
+ public static int SaveAddressRes = 200312; //保存收货地址响应
|
|
|
+ public static int GetAddressListReq = 200313; //获取地址列表请求
|
|
|
+ public static int GetAddressListRes = 200314; //获取地址列表响应
|
|
|
+ public static int GetOrderListReq = 200315; //获取订单列表请求
|
|
|
+ public static int GetOrderListRes = 200316; //获取订单列表响应
|
|
|
+ public static int GetUserYaoReq = 200317; //获取推广福利响应
|
|
|
+ public static int GetUserYaoRes = 200318; //获取推广福利响应
|
|
|
+
|
|
|
+
|
|
|
+ //排行榜
|
|
|
+ public static int RankInfoReq = 200401; //排行榜信息请求
|
|
|
+ public static int RankInfoRes = 200402; //排行榜信息响应
|
|
|
+
|
|
|
+ //好友
|
|
|
+ public static int FriendInfoReq = 200501; //好友信息请求
|
|
|
+ public static int FriendInfoRes = 200502; //好友信息响应
|
|
|
+
|
|
|
+ //俱乐部
|
|
|
+ public static int ClubInfoReq = 200601; //俱乐部集合信息请求
|
|
|
+ public static int ClubInfoRes = 200602; //俱乐部集合信息响应
|
|
|
+ public static int MyClubReq = 200603; //我的俱乐部信息响应
|
|
|
+ public static int MyClubRes = 200604; //我的俱乐部信息响应
|
|
|
+ public static int SetMainClubReq = 200605; //设置主俱乐部的请求
|
|
|
+ public static int SetMainClubRes = 200606; //设置主俱乐部的响应
|
|
|
+ public static int QuitClubReq = 200607; //退出俱乐部的请求
|
|
|
+ public static int QuitClubRes = 200608; //退出俱乐部的响应
|
|
|
+ public static int CreateClubReq = 200609; //创建/修改俱乐部请求
|
|
|
+ public static int CreateClubRes = 200610; //创建/修改俱乐部响应
|
|
|
+ public static int ApplyJoinClubReq = 200611; //请求加入俱乐部请求
|
|
|
+ public static int ApplyJoinClubRes = 200612; //请求加入俱乐部响应
|
|
|
+ public static int GetApplyListReq = 200613; //获取申请列表请求
|
|
|
+ public static int GetApplyListRes = 200614; //获取申请列表响应
|
|
|
+ public static int AgreeOrRefuseJoinReq = 200615; //同意/拒绝加入俱乐部请求
|
|
|
+ public static int AgreeOrRefuseJoinRes = 200616; //同意/拒绝加入俱乐部响应
|
|
|
+ public static int DeleteMemberReq = 200617; //踢出俱乐部成员请求
|
|
|
+ public static int DeleteMemberRes = 200618; //踢出俱乐部成员响应
|
|
|
+ public static int DissolveClubReq = 200619; //解散俱乐部的请求
|
|
|
+ public static int DissolveClubRes = 200620; //解散俱乐部的响应
|
|
|
+ public static int GetMyClubListReq = 200621; //获取我的俱乐部列表请求
|
|
|
+ public static int GetMyClubListRes = 200622; //获取我的俱乐部列表响应
|
|
|
+ public static int CreateClubListReq = 200623; //获取创建俱乐部列表请求
|
|
|
+ public static int CreateClubListRes = 200624; //获取创建俱乐部列表响应
|
|
|
+
|
|
|
+ //官方比赛
|
|
|
+ public static int MatchSignUpReq = 200701; // 赛事报名请求
|
|
|
+ public static int MatchSignUpRes = 200702; // 赛事报名响应
|
|
|
+ public static int MatchSignupListReq = 200703; // 获取官方比赛报名名单请求
|
|
|
+ public static int MatchSignupListRes = 200704; // 获取官方比赛报名名单响应
|
|
|
+ public static int MatchRoomListReq = 200705; // 获取官方比赛轮次详情请求
|
|
|
+ public static int MatchRoomListRes = 200706; // 获取官方比赛轮次详情响应
|
|
|
+
|
|
|
+ //个人活动
|
|
|
+ public static int EventInfoReq = 200801; // 活动信息请求
|
|
|
+ public static int EventInfoRes = 200802; // 活动信息响应
|
|
|
+
|
|
|
+ //个人消息
|
|
|
+ public static int MessageInfoReq = 200901; // 个人消息信息请求
|
|
|
+ public static int MessageInfoRes = 200902; // 个人消息信息响应
|
|
|
+
|
|
|
+
|
|
|
+ // 服务器推送消息 900000-999999 (全部以偶数结尾)
|
|
|
+ public static int PlayerInfoUpdate = 900002; // 玩家信息数据变更推送
|
|
|
+ public static int PlayerOnline = 900004; // 玩家上线推送
|
|
|
+ public static int PlayerOffline = 900006; // 玩家下线推送
|
|
|
+ public static int RoomPlayerJoin = 900008; // 玩家加入房间推送
|
|
|
+ public static int RoomPlayerLeave = 900010; // 玩家离开房间推送
|
|
|
+ public static int ReadyStateUpdate = 900012; // 玩家准备状态数据同步推送
|
|
|
+ public static int GameStateChange = 900014; // 游戏状态变化推送
|
|
|
+ public static int DrawCard = 900016; // 麻将摸牌推送
|
|
|
+ public static int OtherPlayCards = 900020; // 其他玩家出牌通知
|
|
|
+ public static int OtherPlayOperation = 900022; // 其他玩家操作动作通知
|
|
|
+ public static int DisbandRoom = 900024; // 解散房间推送
|
|
|
+
|
|
|
+ public static int MatchPreparationStart = 900026; // 赛事准备开始推送
|
|
|
+ public static int MatchOfficialStart = 900028; // 赛事正式开始推送
|
|
|
+
|
|
|
+ // ShopUpdate = 900016; // 商城更新推送
|
|
|
+ public static int BagUpdate = 900018; // 背包更新推送
|
|
|
+ public static int ErrorRes = 910000; // 错误响应(服务器)
|
|
|
+}
|