فهرست منبع

约简参数ope合并cmd

王刚 1 سال پیش
والد
کامیت
f63f935923

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 311 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230830143340.sql


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 311 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230830143444.sql


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 311 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230831084218.sql


+ 3 - 2
Gameserver/App/Services/AppServer.php

@@ -70,7 +70,7 @@ class AppServer {
         $resp->AfterProc();
 
         //self::LogCmdMongo($resp);                                               # 向MongoDB写入操作日志
-        // CLog::flush();                                                          # flush日志     
+        // CLog::flush();                                                          # flush日志
         return true;
     }
 
@@ -110,7 +110,8 @@ class AppServer {
      * 路由方法
      */
     private static function Route() {
-        $proc = OpeCode::getProc(req()->ope);                                   # 映射处理模块.
+        $opc = substr(req()->cmd, 0, 2);
+        $proc = OpeCode::getProc($opc);                                   # 映射处理模块.
 //        DebugHelper::print_stack_trace();
         my_Assert($proc != "err", ErrCode::ope_err);                            # 未能找到对应的处理模块
         try {

+ 35 - 36
Gameserver/App/base/CmdCode.php

@@ -3,8 +3,9 @@
 namespace loyalsoft;
 
 /**
- * 操作码常量定义
- * @author jgao
+ * 操作码常量定义:
+ * @version 2023.8.31 修改约定: cmdcode前两位为opecode. 参数传递过程中不单独传输opecode了.
+ * @author jgao,gwang,cyzhao
  */
 class CmdCode {
     //
@@ -84,26 +85,20 @@ class CmdCode {
     /**
      * 常量信息指令
      */
-    const cmd_user_gameconstinfo = 6002; 
-    
-    
-    
+    const cmd_user_gameconstinfo = 6002;
+
     /**
-     * 
+     *
      */
     const cmd_user_setAnimation = 6004;
-            
     // </editor-fold>
-    
     // <editor-fold defaultstate="collapsed" desc="活动操作码 - 61xx">
-    
+
     const cmd_active_sign = 6101;
-    
-    
+
     // </editor-fold>
-          
     // <editor-fold defaultstate="collapsed" desc="任务操作码 - 62xx">
-    
+
     /**
      * [6201] 任务 - 拉取最新任务信息
      */
@@ -113,26 +108,20 @@ class CmdCode {
      * [6202] 任务 - 领取任务奖励
      */
     const cmd_task_getReward = 6202;
-    
-    
     // </editor-fold>
-    
     // <editor-fold defaultstate="collapsed" desc="邮件操作码 - 63xx">
-    
-    const cmd_email_questEmailList = 6301;
 
-         
+    const cmd_email_questEmailList = 6301;
     // </editor-fold>
-    
     // <editor-fold defaultstate="collapsed" desc="背包操作码 - 64xx">
-    
+
     const cmd_store_put = 6401;
-    
+
     /**
      * 装备
      */
     const cmd_store_equip = 6402;
-    
+
     /**
      * 卸下装备
      */
@@ -147,45 +136,55 @@ class CmdCode {
      * 一键升级
      */
     const cmd_store_equipUpgrade_MaxLv = 6405;
-    
+
     /**
      * 合成
      */
     const cmd_store_equipCompose = 6406;
-    
+
     // </editor-fold>
-    
     // <editor-fold defaultstate="collapsed" desc="商城操作码 - 65xx">
+
     /**
      * 商城购买东西
      */
     const cmd_shop_BuyGift = 6501;
-    
     // </editor-fold>
-    
+    // <editor-fold defaultstate="collapsed" desc="英雄模块操作码 - 66xx">
+    //
+
+    /**
+     * 切换英雄
+     */
+    const hero_swith = 6601;
+
+    /**
+     * 解锁英雄
+     */
+    const hero_unlock = 6602;
+    //
+// </editor-fold>
     // <editor-fold defaultstate="collapsed" desc="战斗操作码 - 68xx">
-    
+
     const cmd_fight_settle = 6801;
-    
+
     /**
      * 章节宝箱的领取
      */
     const cmd_fight_PassGateTsPrizeReceive = 6802;
-    
+
     /**
      * 关卡选择
      */
     const cmd_fight_selectGate = 6803;
-    
     const cmd_fight_gateChallengePriceReviced = 6804;
-    
+
     /**
      * 进化解锁
      */
     const cmd_fight_evolveUnlock = 6805;
-    
+
     // </editor-fold>
-    
     // <editor-fold defaultstate="collapsed" desc="    反射方法    ">
 
     /**

+ 11 - 9
Gameserver/App/base/OpeCode.php

@@ -4,25 +4,27 @@ namespace loyalsoft;
 
 /**
  * 功能码常量定义, 要求: 常量名称和对应的功能处理模块的名称相一致(无需Proc后缀).
- * @author gwang
+ * @version 2023.8.31 修改约定: cmdcode前两位为opecode. 参数传递过程中不单独传输opecode了.
+ * @author gwang,cyzhao
  */
 class OpeCode {
 
     /**
      * 支付功能
      */
-    const Pay = 888;
+    const Pay = 88;
 
     /**
      * 玩家主功能
      */
-    const User = 600;
-    
-    const Store = 604;
-    
-    const Shop = 605;
-    
-    const Fight = 608;
+    const User = 60;
+    const Active = 61;
+    const Task = 62;
+    const Email = 63;
+    const Store = 64;
+    const Shop = 65;
+    const Hero = 66;
+    const Fight = 68;
 
     // <editor-fold defaultstate="collapsed" desc="反射方法">
     //

+ 2 - 8
Gameserver/App/base/Req.php

@@ -5,7 +5,7 @@ namespace loyalsoft;
 /**
  * Description of Req
  * 客户端数据请求实体
- * @author jgao
+ * @author gwang
  */
 class Req extends Object_ext {
 
@@ -15,12 +15,6 @@ class Req extends Object_ext {
      */
     public $uid;
 
-    /**
-     * 对哪个功能
-     * @var int
-     */
-    public $ope;
-
     /**
      * 执行什么操作
      * @var int
@@ -96,7 +90,7 @@ class Req extends Object_ext {
             case CmdCode::cmd_user_getzonelist:                                 # 下载分区列表
             case CmdCode::cmd_user_loginuserinfo :                              # 登录
             case CmdCode::cmd_user_gameconstinfo :                              # 下载常量
-            //case CmdCode::cmd_user_registerNewRole :                            # 测试注册角色
+                //case CmdCode::cmd_user_registerNewRole :                            # 测试注册角色
                 # 这些消息不需要初始化UserInfo
                 break;
             default :                                                           # 其余消息,初始化UserInfo

+ 1 - 1
Gameserver/App/base/Resp.php

@@ -5,7 +5,7 @@ namespace loyalsoft;
 /**
  * Description of ResponseVo
  * 服务端消息应答实体
- * @author jgao,gwang
+ * @author gwang
  */
 class Resp extends Object_ext {
 

+ 284 - 281
Gameserver/App/configs/GameConfig.php

@@ -1,38 +1,41 @@
 <?php
+
 ////////////////////
- // 由CodeGenerator创建。
- // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
- // author: gwang 
- // 日期: 2023-08-24 16:38:15
+// 由CodeGenerator创建。
+// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+// author: gwang
+// 日期: 2023-08-24 16:38:15
 ////////////////////
 
 namespace loyalsoft;
 
 /**
- * 常量配置数据 
+ * 常量配置数据
  */
 class GameConfig {
-// <editor-fold defaultstate="collapsed" desc="  基础代码 ">    
+// <editor-fold defaultstate="collapsed" desc="  基础代码 ">
+
     /**
-     * 是否启用codegen 
+     * 是否启用codegen
      */
-    private static function isCG()  {
-        return defined('CodeGen_Enabled') && CodeGen_Enabled; 
+    private static function isCG() {
+        return defined('CodeGen_Enabled') && CodeGen_Enabled;
     }
+
     /**
      * @var bool 分区是否使用独立的常量配置数据
      */
     private static $useZoneId = false;
+
     /**
      * 追加分区列表字符串
      * @return string
      */
-    private static function zoneid()
-    {
+    private static function zoneid() {
         global $zoneid;
         return self::$useZoneId ? "-zone$zoneid" : "";
     }
-	
+
     /**
      * @return ClientVersion
      */
@@ -84,433 +87,433 @@ class GameConfig {
         }
         return null;
     }
+
 // </editor-fold>
+
     /**
-    * 全局参数
-    * @return \globalsettings
-    */
-    public static function globalsettings()
-    { 
-        static $a = null; 
+     * 全局参数
+     * @return \globalsettings
+     */
+    public static function globalsettings() {
+        static $a = null;
         return self::initValue($a, 'globalsettings');
     }
+
     /**
-    * 停服计划
-    * @return \service_schedule
-    */
-    public static function service_schedule()
-    { 
-        static $a = null; 
+     * 停服计划
+     * @return \service_schedule
+     */
+    public static function service_schedule() {
+        static $a = null;
         return self::initValue($a, 'service_schedule');
     }
+
     /**
-    * @return \sm_service_schedule service_schedule item数据 
-    */
-    public static function service_schedule_getItem($itemid)
-    { 
+     * @return \sm_service_schedule service_schedule item数据
+     */
+    public static function service_schedule_getItem($itemid) {
         return self::get_hash_item('service_schedule', $itemid);
     }
+
     /**
-    * 道具表
-    * @return \item
-    */
-    public static function item()
-    { 
-        static $a = null; 
+     * 道具表
+     * @return \item
+     */
+    public static function item() {
+        static $a = null;
         return self::initValue($a, 'item');
     }
+
     /**
-    * @return \sm_item item item数据 
-    */
-    public static function item_getItem($itemid)
-    { 
+     * @return \sm_item item item数据
+     */
+    public static function item_getItem($itemid) {
         return self::get_hash_item('item', $itemid);
     }
+
     /**
-    * 系统邮件
-    * @return \sysmail
-    */
-    public static function sysmail()
-    { 
-        static $a = null; 
+     * 系统邮件
+     * @return \sysmail
+     */
+    public static function sysmail() {
+        static $a = null;
         return self::initValue($a, 'sysmail');
     }
+
     /**
-    * @return \sm_sysmail sysmail item数据 
-    */
-    public static function sysmail_getItem($itemid)
-    { 
+     * @return \sm_sysmail sysmail item数据
+     */
+    public static function sysmail_getItem($itemid) {
         return self::get_hash_item('sysmail', $itemid);
     }
+
     /**
-    * 客户端版本信息
-    * @return \clientVersionHistory
-    */
-    public static function clientVersionHistory()
-    { 
-        static $a = null; 
+     * 客户端版本信息
+     * @return \clientVersionHistory
+     */
+    public static function clientVersionHistory() {
+        static $a = null;
         return self::initValue($a, 'clientVersionHistory');
     }
+
     /**
-    * @return \sm_clientVersionHistory clientVersionHistory item数据 
-    */
-    public static function clientVersionHistory_getItem($itemid)
-    { 
+     * @return \sm_clientVersionHistory clientVersionHistory item数据
+     */
+    public static function clientVersionHistory_getItem($itemid) {
         return self::get_hash_item('clientVersionHistory', $itemid);
     }
+
     /**
-    * 分区列表
-    * @return \zonelist
-    */
-    public static function zonelist()
-    { 
-        static $a = null; 
+     * 分区列表
+     * @return \zonelist
+     */
+    public static function zonelist() {
+        static $a = null;
         return self::initValue($a, 'zonelist');
     }
+
     /**
-    * @return \sm_zonelist zonelist item数据 
-    */
-    public static function zonelist_getItem($itemid)
-    { 
+     * @return \sm_zonelist zonelist item数据
+     */
+    public static function zonelist_getItem($itemid) {
         return self::get_hash_item('zonelist', $itemid);
     }
+
     /**
-    * 错误信息表
-    * @return \errmsg
-    */
-    public static function errmsg()
-    { 
-        static $a = null; 
+     * 错误信息表
+     * @return \errmsg
+     */
+    public static function errmsg() {
+        static $a = null;
         return self::initValue($a, 'errmsg');
     }
+
     /**
-    * @return \sm_errmsg errmsg item数据 
-    */
-    public static function errmsg_getItem($itemid)
-    { 
+     * @return \sm_errmsg errmsg item数据
+     */
+    public static function errmsg_getItem($itemid) {
         return self::get_hash_item('errmsg', $itemid);
     }
+
     /**
-    * 技能表
-    * @return \skills
-    */
-    public static function skills()
-    { 
-        static $a = null; 
+     * 技能表
+     * @return \skills
+     */
+    public static function skills() {
+        static $a = null;
         return self::initValue($a, 'skills');
     }
+
     /**
-    * @return \sm_skills skills item数据 
-    */
-    public static function skills_getItem($itemid)
-    { 
+     * @return \sm_skills skills item数据
+     */
+    public static function skills_getItem($itemid) {
         return self::get_hash_item('skills', $itemid);
     }
+
     /**
-    * 活动: 七日签到
-    * @return \activity_day7
-    */
-    public static function activity_day7()
-    { 
-        static $a = null; 
+     * 活动: 七日签到
+     * @return \activity_day7
+     */
+    public static function activity_day7() {
+        static $a = null;
         return self::initValue($a, 'activity_day7');
     }
+
     /**
-    * @return \sm_activity_day7 activity_day7 item数据 
-    */
-    public static function activity_day7_getItem($itemid)
-    { 
+     * @return \sm_activity_day7 activity_day7 item数据
+     */
+    public static function activity_day7_getItem($itemid) {
         return self::get_hash_item('activity_day7', $itemid);
     }
+
     /**
-    * 公共兑换码
-    * @return \token_PublicGift
-    */
-    public static function token_PublicGift()
-    { 
-        static $a = null; 
+     * 公共兑换码
+     * @return \token_PublicGift
+     */
+    public static function token_PublicGift() {
+        static $a = null;
         return self::initValue($a, 'token_PublicGift');
     }
+
     /**
-    * @return \sm_token_PublicGift token_PublicGift item数据 
-    */
-    public static function token_PublicGift_getItem($itemid)
-    { 
+     * @return \sm_token_PublicGift token_PublicGift item数据
+     */
+    public static function token_PublicGift_getItem($itemid) {
         return self::get_hash_item('token_PublicGift', $itemid);
     }
+
     /**
-    * 活动: 体力加油站
-    * @return \activity_tiligift
-    */
-    public static function activity_tiligift()
-    { 
-        static $a = null; 
+     * 活动: 体力加油站
+     * @return \activity_tiligift
+     */
+    public static function activity_tiligift() {
+        static $a = null;
         return self::initValue($a, 'activity_tiligift');
     }
+
     /**
-    * @return \sm_activity_tiligift activity_tiligift item数据 
-    */
-    public static function activity_tiligift_getItem($itemid)
-    { 
+     * @return \sm_activity_tiligift activity_tiligift item数据
+     */
+    public static function activity_tiligift_getItem($itemid) {
         return self::get_hash_item('activity_tiligift', $itemid);
     }
+
     /**
-    * 活动: 等级礼包
-    * @return \activity_levelgift
-    */
-    public static function activity_levelgift()
-    { 
-        static $a = null; 
+     * 活动: 等级礼包
+     * @return \activity_levelgift
+     */
+    public static function activity_levelgift() {
+        static $a = null;
         return self::initValue($a, 'activity_levelgift');
     }
+
     /**
-    * @return \sm_activity_levelgift activity_levelgift item数据 
-    */
-    public static function activity_levelgift_getItem($itemid)
-    { 
+     * @return \sm_activity_levelgift activity_levelgift item数据
+     */
+    public static function activity_levelgift_getItem($itemid) {
         return self::get_hash_item('activity_levelgift', $itemid);
     }
+
     /**
-    * 技能表根据分类分组
-    * @return \skillTypeArr
-    */
-    public static function skillTypeArr()
-    { 
-        static $a = null; 
+     * 技能表根据分类分组
+     * @return \skillTypeArr
+     */
+    public static function skillTypeArr() {
+        static $a = null;
         return self::initValue($a, 'skillTypeArr');
     }
+
     /**
-    * @return \sm_skillTypeArr skillTypeArr itemArray 
-    */
-    public static function skillTypeArr_getItemArray($key)
-    { 
+     * @return \sm_skillTypeArr skillTypeArr itemArray
+     */
+    public static function skillTypeArr_getItemArray($key) {
         return self::get_hash_item('skillTypeArr', $key);
     }
+
     /**
-    * 章节表
-    * @return \gate
-    */
-    public static function gate()
-    { 
-        static $a = null; 
+     * 章节表
+     * @return \gate
+     */
+    public static function gate() {
+        static $a = null;
         return self::initValue($a, 'gate');
     }
+
     /**
-    * @return \sm_gate gate item数据 
-    */
-    public static function gate_getItem($itemid)
-    { 
+     * @return \sm_gate gate item数据
+     */
+    public static function gate_getItem($itemid) {
         return self::get_hash_item('gate', $itemid);
     }
+
     /**
-    * 角色
-    * @return \hero
-    */
-    public static function hero()
-    { 
-        static $a = null; 
+     * 角色
+     * @return \hero
+     */
+    public static function hero() {
+        static $a = null;
         return self::initValue($a, 'hero');
     }
+
     /**
-    * @return \sm_hero hero item数据 
-    */
-    public static function hero_getItem($itemid)
-    { 
+     * @return \sm_hero hero item数据
+     */
+    public static function hero_getItem($itemid) {
         return self::get_hash_item('hero', $itemid);
     }
+
     /**
-    * 装备表
-    * @return \equip
-    */
-    public static function equip()
-    { 
-        static $a = null; 
+     * 装备表
+     * @return \equip
+     */
+    public static function equip() {
+        static $a = null;
         return self::initValue($a, 'equip');
     }
+
     /**
-    * @return \sm_equip equip item数据 
-    */
-    public static function equip_getItem($itemid)
-    { 
+     * @return \sm_equip equip item数据
+     */
+    public static function equip_getItem($itemid) {
         return self::get_hash_item('equip', $itemid);
     }
+
     /**
-    * 装备升级表
-    * @return \equip_levelupgrade
-    */
-    public static function equip_levelupgrade()
-    { 
-        static $a = null; 
+     * 装备升级表
+     * @return \equip_levelupgrade
+     */
+    public static function equip_levelupgrade() {
+        static $a = null;
         return self::initValue($a, 'equip_levelupgrade');
     }
+
     /**
-    * @return \sm_equip_levelupgrade equip_levelupgrade item数据 
-    */
-    public static function equip_levelupgrade_getItem($itemid)
-    { 
+     * @return \sm_equip_levelupgrade equip_levelupgrade item数据
+     */
+    public static function equip_levelupgrade_getItem($itemid) {
         return self::get_hash_item('equip_levelupgrade', $itemid);
     }
+
     /**
-    * 章节礼包表
-    * @return \shop_gategift
-    */
-    public static function shop_gategift()
-    { 
-        static $a = null; 
+     * 章节礼包表
+     * @return \shop_gategift
+     */
+    public static function shop_gategift() {
+        static $a = null;
         return self::initValue($a, 'shop_gategift');
     }
+
     /**
-    * @return \sm_shop_gategift shop_gategift item数据 
-    */
-    public static function shop_gategift_getItem($itemid)
-    { 
+     * @return \sm_shop_gategift shop_gategift item数据
+     */
+    public static function shop_gategift_getItem($itemid) {
         return self::get_hash_item('shop_gategift', $itemid);
     }
+
     /**
-    * 每日商店
-    * @return \shop_daily
-    */
-    public static function shop_daily()
-    { 
-        static $a = null; 
+     * 每日商店
+     * @return \shop_daily
+     */
+    public static function shop_daily() {
+        static $a = null;
         return self::initValue($a, 'shop_daily');
     }
+
     /**
-    * @return \sm_shop_daily shop_daily item数据 
-    */
-    public static function shop_daily_getItem($itemid)
-    { 
+     * @return \sm_shop_daily shop_daily item数据
+     */
+    public static function shop_daily_getItem($itemid) {
         return self::get_hash_item('shop_daily', $itemid);
     }
+
     /**
-    * 钻石
-    * @return \shop_cash
-    */
-    public static function shop_cash()
-    { 
-        static $a = null; 
+     * 钻石
+     * @return \shop_cash
+     */
+    public static function shop_cash() {
+        static $a = null;
         return self::initValue($a, 'shop_cash');
     }
+
     /**
-    * @return \sm_shop_cash shop_cash item数据 
-    */
-    public static function shop_cash_getItem($itemid)
-    { 
+     * @return \sm_shop_cash shop_cash item数据
+     */
+    public static function shop_cash_getItem($itemid) {
         return self::get_hash_item('shop_cash', $itemid);
     }
+
     /**
-    * 金币
-    * @return \shop_gold
-    */
-    public static function shop_gold()
-    { 
-        static $a = null; 
+     * 金币
+     * @return \shop_gold
+     */
+    public static function shop_gold() {
+        static $a = null;
         return self::initValue($a, 'shop_gold');
     }
+
     /**
-    * @return \sm_shop_gold shop_gold item数据 
-    */
-    public static function shop_gold_getItem($itemid)
-    { 
+     * @return \sm_shop_gold shop_gold item数据
+     */
+    public static function shop_gold_getItem($itemid) {
         return self::get_hash_item('shop_gold', $itemid);
     }
+
     /**
-    * 
-    * @return \shop_supply
-    */
-    public static function shop_supply()
-    { 
-        static $a = null; 
+     *
+     * @return \shop_supply
+     */
+    public static function shop_supply() {
+        static $a = null;
         return self::initValue($a, 'shop_supply');
     }
+
     /**
-    * @return \sm_shop_supply shop_supply item数据 
-    */
-    public static function shop_supply_getItem($itemid)
-    { 
+     * @return \sm_shop_supply shop_supply item数据
+     */
+    public static function shop_supply_getItem($itemid) {
         return self::get_hash_item('shop_supply', $itemid);
     }
+
     /**
-    * 商城军备
-    * @return \shop_junbei
-    */
-    public static function shop_junbei()
-    { 
-        static $a = null; 
+     * 商城军备
+     * @return \shop_junbei
+     */
+    public static function shop_junbei() {
+        static $a = null;
         return self::initValue($a, 'shop_junbei');
     }
+
     /**
-    * @return \sm_shop_junbei shop_junbei item数据 
-    */
-    public static function shop_junbei_getItem($itemid)
-    { 
+     * @return \sm_shop_junbei shop_junbei item数据
+     */
+    public static function shop_junbei_getItem($itemid) {
         return self::get_hash_item('shop_junbei', $itemid);
     }
+
     /**
-    * 挑战表
-    * @return \gate_challenge
-    */
-    public static function gate_challenge()
-    { 
-        static $a = null; 
+     * 挑战表
+     * @return \gate_challenge
+     */
+    public static function gate_challenge() {
+        static $a = null;
         return self::initValue($a, 'gate_challenge');
     }
+
     /**
-    * @return \sm_gate_challenge gate_challenge item数据 
-    */
-    public static function gate_challenge_getItem($itemid)
-    { 
+     * @return \sm_gate_challenge gate_challenge item数据
+     */
+    public static function gate_challenge_getItem($itemid) {
         return self::get_hash_item('gate_challenge', $itemid);
     }
+
     /**
-    * 进化表
-    * @return \evolve
-    */
-    public static function evolve()
-    { 
-        static $a = null; 
+     * 进化表
+     * @return \evolve
+     */
+    public static function evolve() {
+        static $a = null;
         return self::initValue($a, 'evolve');
     }
+
     /**
-    * @return \sm_evolve evolve item数据 
-    */
-    public static function evolve_getItem($itemid)
-    { 
+     * @return \sm_evolve evolve item数据
+     */
+    public static function evolve_getItem($itemid) {
         return self::get_hash_item('evolve', $itemid);
     }
+
     /**
-    * 进化功能里的特定磁条信息
-    * @return \evolveSpecific
-    */
-    public static function evolveSpecific()
-    { 
-        static $a = null; 
+     * 进化功能里的特定磁条信息
+     * @return \evolveSpecific
+     */
+    public static function evolveSpecific() {
+        static $a = null;
         return self::initValue($a, 'evolveSpecific');
     }
+
     /**
-    * @return \sm_evolveSpecific evolveSpecific item数据 
-    */
-    public static function evolveSpecific_getItem($itemid)
-    { 
+     * @return \sm_evolveSpecific evolveSpecific item数据
+     */
+    public static function evolveSpecific_getItem($itemid) {
         return self::get_hash_item('evolveSpecific', $itemid);
     }
+
     /**
-    * 当前版本(时间戳)
-    * @return \ver
-    */
-    public static function ver()
-    { 
-        static $a = null; 
+     * 当前版本(时间戳)
+     * @return \ver
+     */
+    public static function ver() {
+        static $a = null;
         return self::initValue($a, 'ver', false);
     }
+
     /**
-    * 客户端配置数据
-    * @return \client
-    */
-    public static function client()
-    { 
-        static $a = null; 
+     * 客户端配置数据
+     * @return \client
+     */
+    public static function client() {
+        static $a = null;
         return self::initValue($a, 'client', false);
     }
 }
-

+ 9 - 10
Gameserver/App/model/User/Data_UserGame.php

@@ -13,25 +13,25 @@ class Data_UserGame extends HashSaver {
      * @var Info_UserBase 基础数据
      */
     public $baseInfo;
-    
+
     /**
      * 背包
      * @var Info_Store
      */
     public $store;
-    
+
     /**
      * 关卡
      * @var Info_Gates
      */
     public $gates;
-    
+
     /**
      * 关卡
-     * @var Info_Hero
+     * @var Info_Heros
      */
     public $heros;
-    
+
     /**
      * 私有信息
      * @var Info_PrivateState
@@ -57,7 +57,7 @@ class Data_UserGame extends HashSaver {
     public function initialize() {
         //my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御
         //$this->baseInfo = new Info_UserBase();
-        $this->baseInfo->initialize();      
+        $this->baseInfo->initialize();
         $this->store->initialize();
         $this->gates->initialize();
         $this->heros->initialize();
@@ -81,13 +81,12 @@ class Data_UserGame extends HashSaver {
             $this->base()->fixArray();
             $this->privateData()->fixArray();
             $this->gates()->fixArray();
-            
         }
     }
 
     // <editor-fold defaultstate="collapsed" desc="实例方法">
 
-     /**
+    /**
      * 关卡数据
      * @param bool $save 是否需要回存
      * @return Info_UserGateDifficulty
@@ -99,7 +98,7 @@ class Data_UserGame extends HashSaver {
         }
         return $this->gates;
     }
-    
+
     /**
      * 基础信息
      * @param bool $save 是否需要回存
@@ -112,7 +111,7 @@ class Data_UserGame extends HashSaver {
         }
         return $this->baseInfo;
     }
-    
+
     /**
      * 玩家仓库
      * @param bool $save 是否需要回存

+ 57 - 0
Gameserver/App/process/HeroProc.php

@@ -0,0 +1,57 @@
+<?php
+
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
+ */
+
+namespace loyalsoft;
+
+/**
+ * Description of HeroProc
+ *
+ * @author gwang
+ */
+class HeroProc {
+    //put your code here
+
+    /**
+     * 逻辑分发
+     * 所有的Proc中必须有这样一个方法
+     * @param Req $req
+     */
+    public static function procMain($req) {
+        switch ($req->cmd) {
+            case CmdCode::hero_swith:                                           # 6601 切换英雄
+                return HeroProc::SwithHero();
+            case CmdCode::hero_unlock:                                          # 6602 解锁英雄
+                return self::UnlockHero();
+            default:
+                Err(ErrCode::cmd_err);
+        }
+    }
+
+    /**
+     * 6602 解锁英雄
+     * @return type
+     */
+    private static function UnlockHero() {
+        list($newHeroId) = req()->paras;                                        # 切换英雄id
+        my_Assert(GameConfig::hero_getItem($newHeroId) != null, "找不到英雄配置数据!");
+        // 解锁消耗,
+        // 解锁成功.
+        ctx()->heros->Dic->$newHeroId = new Ins_Hero();
+
+        return Resp::ok();
+    }
+
+    /**
+     * 6601 切换英雄
+     */
+    private static function SwithHero() {
+        list($newHeroId) = req()->paras;                                        # 切换英雄id
+        my_Assert(CommUtil::isPropertyExists(ctx()->heros->Dic, $newHeroId), "尚未获得此英雄!");
+        ctx()->heros->CurrentHeroId = $newHeroId;
+        return Resp::ok();
+    }
+}

+ 2 - 13
Gameserver/App/test.php

@@ -25,17 +25,6 @@ use \loyalsoft\pay\OrderNotice;
 //\loyalsoft\TapDBUtil::TestPay();
 //\loyalsoft\CLog::err("wg");
 //$a = new \sm_activity_tiligift();
-// PHP 纯真 IP 地址数据库自动更新功能
-//$ip = new IPQuery();
-test(function () {
-    $addr = HttpUtil::IpInfo('123.233.233.233');
-    echoLine($addr);
-}, 10);
 
-//
-//echo "<pre>
-//IP起始段:{$addr['beginip']}
-//IP结束段:{$addr['endip']}
-//实际地址:{$addr['pos']}
-//运 营 商:{$addr['isp']}
-//</pre>";
+$item = GameConfig::shop_cash_getItem(1);
+var_dump($item);

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است