網路編程中的指令號命名技巧

來源:互聯網
上載者:User

標籤:

package com.catstudio.interstellar.net;public class CMD {    // 模組類型    public static final int TYPE_USER = 1001;    // 使用者    public static final int TYPE_RANK = 1002;    // 排行    public static final int TYPE_BROADCAST = 1004;    // 廣播    public static final int TYPE_AWARD = 1005;    // 獎勵    public static final int TYPE_MAIL = 1006;    // 郵件    public static final int TYPE_SYSTEM = 1007;    // 系統(不做登入驗證)    public static final int TYPE_TASK = 1008;    // 任務    public static final int TYPE_MISSION = 1009;    // 關卡    public static final int TYPE_SHOP = 1010;    // 商店    public static final int TYPE_SIGNIN = 1011;    // 簽到    public static final int TYPE_ACTIVITY = 1012;    // 活動    public static final int TYPE_CHAT = 1013;    // 聊天    public static final int TYPE_GUILD = 1014;    // 公會    public static final int TYPE_CODE = 1015;    // 兌換碼    public static final int TYPE_MAP                     = 1016;    //地圖    public static final int TYPE_PAY                     = 1017;    //儲值         public static final int C_PAY_擷取儲值資訊    =10170001;;     public static final int C_PAY_申請訂單        =10170005;    public static final int C_PAY_驗證支付訂單    =10170007;    public static final int C_PAY_晶體兌換金幣    =10170003;;         //地圖     public static final int C_MAP_GET_CELL_INFO  = 10160003;//擷取我所在位置的格子資訊    public static final int C_MAP_REQUEST_MOVE   =10160005;//請求移動    public static final int C_MAP_REQUEST_IN     =10160007;//請求駐守格子       public static final int C_MAP_SEND_TEAM_INFO = 10160009;; //發送爭霸地圖戰鬥組資訊    public static final int C_MAP_INIT_COMBATTEAM = 10160011;//派出化戰鬥組    public static final int C_MAP_CELL_OUT=10160013;//放棄格子    public static final int C_MAP_RECALL_COMBATTEAM = 10160015;//撤回戰鬥組    public static final int C_MAP_GETALL_TEAMCELLS =10160017;//擷取所有出戰隊伍附近的格子    public static final int C_MAP_STTLE_WB_PVP = 10160019;//爭霸pvp結算     public static final int C_MAP_START_WBFIGHT = 10160021;//開始爭霸戰鬥    public static final int C_MAP_GET_CELLS = 10160023;//擷取指定座標的格子    public static final int C_MAP_recoverWBbili = 10160025;//回複槽位的卡片血量比    public static final int C_MAP_getAllTeamAndCells = 10160027;//擷取戰鬥組資訊和格子資訊    public static final int C_MAP_newBuild = 10160029;//建立一個建築    public static final int C_MAP_remove_build=10160031;//拆除建築    public static final int C_MAP_use_build = 10160033;//使用建築         public static final int C_MAP_REPAIR_TEAMSHIPS = 10160035;//維修隊伍中的船    public static final int C_MAP_useSkillSpy = 10160037;//使用技能偵查    public static final int C_MAP_getMapLogs = 10160039;//擷取地圖日誌    public static final int C_MAP_GetBaseMapAllCells = 10160041;//擷取整個地圖的基本資料    public static final int C_MAP_getDefReward = 10160043;//領取防禦獎勵    public static final int C_MAP_canReward    = 10160045;//查詢是否有獎勵    public static final int C_MAP_seachReward  = 10160057;//查詢獎勵詳細    public static final int C_MAP_MOVE_BASE = 10160059;//移動基地    public static final int C_MAP_SETTLE_NPC_PVP=10160061;//結算 野怪pvp戰鬥    public static final int C_MAP_SEND_TEAM = 10160063;//移動戰鬥組     public static final int C_MAP_RepairMultiShips =10160065;//修理多個戰艦     public static final int C_MAP_unlockNewTeam = 10160067; //解鎖新戰鬥組     // 兌換碼兌換    public static final int C_CODE_EXCHANGE = 10150001; // 兌換     // 活動    public static final int C_ACTIVITY_GET_AWARD = 10120001; // 領取活動獎勵    // 公會模組    public static final int C_GUILD_CHAT_SEND = 10140001; // 發送公會訊息    public static final int C_GUILD_CHAT_GET_LATEST = 10140003; // 擷取最新公會聊天    public static final int C_GUILD_CHECK_GUILD_NAME = 10140005; // 檢查公會名字是否已經存在    public static final int C_GUILD_ADD = 10140007; // 添加公告    public static final int C_GUILD_GET_LIST = 10140009; // 擷取軍團列表    public static final int C_GUILD_REQUEST_ADD = 10140011; // 請求添加一個軍團    public static final int C_GUILD_HANDLE_REQUEST = 10140013; // 處理添加請求    public static final int C_GUILD_CLEAR_ADD_REQUEST = 10140015; // 清除所有軍團添加請求    public static final int C_GUILD_GET_REQUEST = 10140017; // 過去所有添加請求    public static final int C_GUILD_EXIT = 10140019; // 退出軍團    public static final int C_GUILD_MAKEOVER = 10140021; // 轉讓    public static final int C_GUILD_CHANGE_ROLE = 10140023; // 修改許可權    public static final int C_GUILD_GET_MY_GUILD_INFO = 10140025; // 擷取我的軍團的資訊    public static final int C_GUILD_CHANGE_ADDSTATE      = 10140027;//改變軍團接受成員的狀態    public static final int C_GUILD_DELETE_MEMBER        =10140029;//提出成員    public static final int C_GUILD_GET_MY_ADDREQUEST    = 10140031;//擷取我的請求    public static final int C_GUILD_FAFAGN_JUNXIANG = 10140033;//發放軍餉    public static final int C_GUILD_LINGQU_JUNXIANG = 10140035;//領取軍餉    public static final int C_GUILD_CHANGE_GUILD_AFFICHE=10140037;//改變軍團公告    public static final int C_GUILD_CHANGE_RECRUIT_NOTICE=10140039;//改變招募通知          // 聊天相關    public static final int C_CHAT_SEND = 10130001; // 發送聊天    public static final int C_CHAT_GET_LATEST = 10130003; // 擷取最新聊天    public static final int C_CHAT_GET_LATEST_MESSAGE = 10130007; // 擷取最新公會聊天     public static final int C_CHAT_SEND_MESSAGE = 10130005; // 發送公會聊天訊息        public static final int C_CHAT_GET_LATEST_TWENTY     =10130009;//獲得最新20條    // 排行相關    public static final int C_RANK_USERS_BY_PVP  = 10020015; // 根據pvp排行擷取9個使用者    public static final int C_RANK_GET_PVP_TOP  = 10020017; // 擷取pvp熱門排行榜前N名玩家    public static final int C_RANK_GET_FIGHT_INFO  = 10020019; // 擷取一個玩家的戰鬥資訊    public static final int C_RANK_GET_BATTLE_INFO  = 10020021; // 擷取一個玩家的最新戰報     public static final int C_RANK_GET_WAVE_TOP_NEW  = 10020025; // 擷取前10無盡熱門排行榜    public static final int C_RANK_GET_ALL                =10020027;  //擷取所有排行:無盡,天氣,軍團,軍團成員 4中排行     // 新的發送廣播2015-10-29    public static final int C_sendBroadCastMessage  = 10040005; // 發送廣播    public static final int C_getBroadCastMessages  = 10040007; //擷取最新廣播     // 獎勵相關     public static final int C_AWARD_VIP_LV_REWARD = 10050003; // 領取vip等級獎勵    // 郵件    public static final int C_MAIL_SEND = 10060001; // 發送    public static final int C_MAIL_UPDATE = 10060003; // 更新    public static final int C_MAIL_GET = 10060005; // 擷取    public static final int C_GET_SERVER_MAIL_VIEW = 10060007; // 擷取伺服器郵件視圖,包括    public static final int C_MAIL_GET_SERVER_MAIL_ITEM = 10060009; // 領取系統郵件    public static final int C_MAIL_DELETE = 10060011; // 刪除郵件    public static final int C_MAIL_LATEST_FIGHT_INFO_COUNT = 10060013; // 擷取最新戰報個數    // 系統相關(這個模組不做 登入驗證)     public static final int C_SYSTEM_GET_SERVER_TIME        = 10070003; // 擷取伺服器時間      public static final int C_loginByKey= 10070013; // 新的登陸方法2015-10-22     // 任務相關    public static final int C_TASK_DAILY_ADD_DAI_ORD_MISS_NUM   = 10080003; // 完成每日普通關卡    public static final int C_TASK_DAILY_ADD_WIN_PVP_NUM= 10080005; // 每日PVP勝利次數    public static final int C_TASK_DAILY_ADD_WIN_ORD_MIS_NUM    = 10080007; // 每日關卡模式勝利次數     // 次數    public static final int C_TASK_DAILY_ADD_PVP_SUM_COUNT      = 10080017; // 每日pvp勝利吃書    public static final int C_TASK_DAILY_ADD_WIN_TREA_MISS_NUM  = 10080019; // 每日     // 勝利次數    public static final int C_TASK_DAILY_GET_TASK_REWARD= 10080013; // 領取每日任務獎勵;    public static final int C_TASK_ONCE_GET_TASK_REWARD        = 10080015; // 領取一次性任務獎勵    public static final int C_TASK_ONCE_SET_PASS_MISSION= 10080021; // 設定通過的關卡     public static final int C_TASK_GET_TASK_INFO                =10080023; //擷取任務相關資訊    // 關卡相關    public static final int C_MISSION_UNLOCK_NEXT_TO_MISSION    = 10090007; // 解鎖下一關    public static final int C_MISSION_SWEEP        = 10090013; // 關卡掃蕩    public static final int C_MISSION_PLAY_MISSION_MODE        = 10090015; // 開始玩遊戲     public static final int C_MISSION_SET_MISSION_TEACH_STEP2   = 10090017;    public static final int C_MISSION_NEW_SWEEP = 10090019;//新的掃蕩            // 商店相關     public static final int C_SHOP_COMMON_SELL_CARD        = 10100013; // 普通商店賣掉卡片    public static final int C_SHOP_COMMON_COIN_BUY        = 10100001; // 商店普通硬幣購買        public static final int C_SHOP_DARK_CRYSTAL_BUY     = 10100005; // 商店黑商晶體購買片段    public static final int C_SHOP_DARK_COIN_BUY= 10100007; // 商店黑商晶體購買片段    public static final int C_SHOP_DARK_GET_REFRESH_COUNT       = 10100009; // 添加重新整理次數    public static final int C_SHOP_DARK_REFRESH = 10100011; // 重新整理黑商    public static final int C_SIGNIN_TODAY_REWARD       = 10110001; // 領取今天簽到獎勵    public static final int C_SIGNIN_YESTERDAY_REWARD   = 10110002; // 領取昨天補簽獎勵     // 使用者相關    public static final int C_USER_CHANGE_NICK  = 10010005; // 修改暱稱    public static final int C_USER_CHANGE_AVATAR= 10010007; // 修改頭像     public static final int C_USER_GET_DATA     = 10010017; // 請求使用者資料     public static final int C_USER_BUY_COIN     = 10010021; // 購買硬幣    public static final int C_USER_LV_UP2_CARD  = 10010029; // 兩材料卡片升級    public static final int C_USER_LV_UP3_CARD  = 10010031; // 三材料卡片升級    public static final int C_USER_PICK_COIN    = 10010033; // //撿金幣    public static final int C_USER_PICK_CRYSTAL = 10010035; // //撿晶體    public static final int C_USER_PICK_MATERIAL= 10010037; // //撿材料    public static final int C_USER_COMPLETION_MATERIAL  = 10010039; // 補全材料    public static final int C_USER_REPAIR       = 10010041; // 晶體立即修複        public static final int C_USER_PICK_PIECE   = 10010045; // 撿片段        public static final int C_USER_PICK_EQUIP   = 10010049; // //撿裝備     public static final int C_USER_SHIP_CARD_TO_SLOT    = 10010053; // 戰艦卡片拖到空槽位上       public static final int C_USER_STUDY_SKILL  = 10010059; // //技能研發(學習,升級)    public static final int C_USER_EQUIP_SKILL  = 10010061; // //技能裝備    public static final int C_USER_PUT_SHIP     = 10010063; // //在陣上放戰艦     public static final int C_USER_TAKE_SHIP    = 10010065; // 從陣上取下戰艦     public static final int C_USER_TAKE_FIGHT_SHIP      = 10010067; // 從陣上取下戰艦    public static final int C_USER_CHANGE_SHIP_SLOT     = 10010069; // 切換當前所選戰艦槽位    public static final int C_USER_COMPLETION_MATERIAL2 = 10010071; // 補全2個材料    public static final int C_USER_COMPLETION_MATERIAL3 = 10010073; // 補全3個材料    public static final int C_USER_ASSEMBLE_SHIP= 10010075; // 合成戰艦    public static final int C_USER_UNLOCK_SLOT  = 10010077; // 解鎖新的船槽位    public static final int C_USER_SET_FLAG     = 10010079; // 設定旗艦    public static final int C_USER_EQUIP_CARD_TO_SLOT   = 10010081; // 裝備卡片拖到槽位上    public static final int C_USER_EXCHANGE_EQUIP       = 10010083; // 戰艦上裝備位置調換    public static final int C_USER_REMOVE_SHIP_EQUIP    = 10010085; // 拆下戰艦上的裝備    public static final int C_USER_SETTLE_PVP   = 10010087; // pvp結算     public static final int C_USER_RENAME_SHIP  = 10010089; // 戰艦修改名字    public static final int C_USER_SET_SHOP_TEACH_STEP  = 10010091; // 商店教學    public static final int C_USER_SET_SKILL_TEACH_STEP = 10010093; // 商店教學    public static final int C_USER_SET_MISSION_TEACH_STEP       = 10010095; // 關卡教學    public static final int C_USER_SET_DOCK_TEACH_STEP  = 10010097; // 設定船塢教學步驟    public static final int C_USER_SET_PVPPLACE_TEACH_STEP      = 10010099; // 設定pvp布陣教學    public static final int C_USER_SET_PVPPRE_TEACH_STEP= 10010101; // 設定pvp步驟教學    public static final int C_USER_SET_COOL_PLAY_TEACH_STEP     = 10010103; // 設定試玩教學     public static final int C_USER_GET_OTHERS_DATA      = 10010107; // 擷取其他玩家的存檔資料    public static final int C_USER_RESET_SKILL  = 10010109; // 重設技能    public static final int C_USER_SETTLE_PVE   = 10010111; // pvp結算    public static final int C_USER_SET_SLOTPROP = 10010113; // 設定船塢屬性      public static final int C_USER_RECEIVE_ASSEMBLE_SHIP= 10010121; // 領取合成的戰艦    public static final int C_USER_LOGINOUT     = 10010123; // 登出    public static final int C_User_BEAT = 10010125; // 心跳    public static final int C_USER_CRYSTAL_GET_SHIP     = 10010127; // 鑽石立即領取合成戰艦    public static final int C_USER_UPDATE_ASSEMBLE_TIME = 10010129; // 每隔一段時間更新剩餘合成戰艦時間    public static final int C_USER_SEND_PLACE_INFO      = 10010131; // //向伺服器發送布陣介面資訊     public static final int C_USER_FINISH_TEACH_STEP    = 10010134; // //勝利失敗介面教學    public static final int C_USER_ASSEMBLE_TEACH_STEP  = 10010137; // 合成戰艦介面教學    public static final int C_USER_SHOP_BLACK_TEACHSTEP = 10010139; // 黑商介面教學    public static final int C_USER_PVP_START    = 10010141; // 挑戰pvp開始     public static final int setPVPPlayTeachStep = 10010143;      public static final int setDailyTaskTeachStep       = 10010145; // 每日任務引導     public static final int C_advertiseAwardCrystal     = 10010151; // 廣告獎勵晶體     public static final int setPvePlayTeachStep = 10010155;     public static final int C_USER_SEND_DOCK_INFOS = 10010157;//向伺服器發送船塢介面資訊     public static final int C_USER_changeAutoAim = 10010159;//改變自動瞄準主炮狀態      //設定 彈出公告的id    public static final int C_USER_setMaxAfficeID = 10010161;        public static final int C_USER_sellManyCards = 10010165;     /**購買體力*/    public static final int C_USER_BUY_ACTION_VALUE = 10010167;    //擷取最新的體力資訊    public static final int C_USER_GET_CURRENT_ACTION_INFO = 10010169;    /** 玩家作弊 */    public static final int C_USER_PLAYER_CHEAT = 10010191;  }

命名時採用:類型+指令號,這兩段來進行命名,比如類型用4位,指令再用4位,這樣就用不完了。

網路編程中的指令號命名技巧

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.