Эх сурвалжийг харах

fix: 改进关卡id解析代码.

王刚 1 жил өмнө
parent
commit
1c9b46198e

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922113525.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922115104.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922134555.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922150732.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922151129.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922151337.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922151404.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922155210.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922155231.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922204105.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922204818.sql


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 369 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230922204839.sql


+ 357 - 352
Gameserver/App/configs/GameConfig.php

@@ -1,43 +1,46 @@
 <?php
+
 ////////////////////
- // 由CodeGenerator创建。
- // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
- // author: gwang 
- // 日期: 2023-09-19 17:03:23
+// 由CodeGenerator创建。
+// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+// author: gwang
+// 日期: 2023-09-19 17:03:23
 ////////////////////
 
 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
      */
     private static function CV() {
-        return req() ? req()->CV . '-' : "";
+        return (req() ? req()->CV : "999.999.999") . '-';
     }
 
     /**
@@ -79,550 +82,552 @@ class GameConfig {
                 return $data->$itemId;
             }
         } else {
+            var_dump(self::CV());
             $key = 'gamecfg-' . self::CV() . $modelName . self::zoneid();
+            var_dump($key);
             return gMem()->hget($key, $itemId);
         }
         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);
     }
+
     /**
-    * 7日签到累计
-    * @return \active_day7_accumulate
-    */
-    public static function active_day7_accumulate()
-    { 
-        static $a = null; 
+     * 7日签到累计
+     * @return \active_day7_accumulate
+     */
+    public static function active_day7_accumulate() {
+        static $a = null;
         return self::initValue($a, 'active_day7_accumulate');
     }
+
     /**
-    * @return \sm_active_day7_accumulate active_day7_accumulate item数据 
-    */
-    public static function active_day7_accumulate_getItem($itemid)
-    { 
+     * @return \sm_active_day7_accumulate active_day7_accumulate item数据
+     */
+    public static function active_day7_accumulate_getItem($itemid) {
         return self::get_hash_item('active_day7_accumulate', $itemid);
     }
+
     /**
-    * 装备合成(进化)品阶表
-    * @return \equip_evolve
-    */
-    public static function equip_evolve()
-    { 
-        static $a = null; 
+     * 装备合成(进化)品阶表
+     * @return \equip_evolve
+     */
+    public static function equip_evolve() {
+        static $a = null;
         return self::initValue($a, 'equip_evolve');
     }
+
     /**
-    * @return \sm_equip_evolve equip_evolve item数据 
-    */
-    public static function equip_evolve_getItem($rarity, $qual, $posId)
-    { 
+     * @return \sm_equip_evolve equip_evolve item数据
+     */
+    public static function equip_evolve_getItem($rarity, $qual, $posId) {
         return self::get_hash_item('equip_evolve', "$rarity-$qual-$posId");
     }
+
     /**
-    * 装备合成表
-    * @return \equip_compose
-    */
-    public static function equip_compose()
-    { 
-        static $a = null; 
+     * 装备合成表
+     * @return \equip_compose
+     */
+    public static function equip_compose() {
+        static $a = null;
         return self::initValue($a, 'equip_compose');
     }
+
     /**
-    * @return \sm_equip_compose equip_compose item数据 
-    */
-    public static function equip_compose_getItem($itemid)
-    { 
+     * @return \sm_equip_compose equip_compose item数据
+     */
+    public static function equip_compose_getItem($itemid) {
         return self::get_hash_item('equip_compose', $itemid);
     }
+
     /**
-    * 剧情表
-    * @return \plot
-    */
-    public static function plot()
-    { 
-        static $a = null; 
+     * 剧情表
+     * @return \plot
+     */
+    public static function plot() {
+        static $a = null;
         return self::initValue($a, 'plot');
     }
+
     /**
-    * @return \sm_plot plot item数据 
-    */
-    public static function plot_getItem($gateId, $stage)
-    { 
+     * @return \sm_plot plot item数据
+     */
+    public static function plot_getItem($gateId, $stage) {
         return self::get_hash_item('plot', "$gateId-$stage");
     }
+
     /**
-    * buff配置表
-    * @return \buff
-    */
-    public static function buff()
-    { 
-        static $a = null; 
+     * buff配置表
+     * @return \buff
+     */
+    public static function buff() {
+        static $a = null;
         return self::initValue($a, 'buff');
     }
+
     /**
-    * @return \sm_buff buff item数据 
-    */
-    public static function buff_getItem($itemid)
-    { 
+     * @return \sm_buff buff item数据
+     */
+    public static function buff_getItem($itemid) {
         return self::get_hash_item('buff', $itemid);
     }
+
     /**
-    * 每日任务累计表
-    * @return \task_accumulate
-    */
-    public static function task_accumulate()
-    { 
-        static $a = null; 
+     * 每日任务累计表
+     * @return \task_accumulate
+     */
+    public static function task_accumulate() {
+        static $a = null;
         return self::initValue($a, 'task_accumulate');
     }
+
     /**
-    * @return \sm_task_accumulate task_accumulate item数据 
-    */
-    public static function task_accumulate_getItem($itemid)
-    { 
+     * @return \sm_task_accumulate task_accumulate item数据
+     */
+    public static function task_accumulate_getItem($itemid) {
         return self::get_hash_item('task_accumulate', $itemid);
     }
+
     /**
-    * 任务表
-    * @return \task_step
-    */
-    public static function task_step()
-    { 
-        static $a = null; 
+     * 任务表
+     * @return \task_step
+     */
+    public static function task_step() {
+        static $a = null;
         return self::initValue($a, 'task_step');
     }
+
     /**
-    * @return \sm_task_step task_step item数据 
-    */
-    public static function task_step_getItem($itemid)
-    { 
+     * @return \sm_task_step task_step item数据
+     */
+    public static function task_step_getItem($itemid) {
         return self::get_hash_item('task_step', $itemid);
     }
+
     /**
-    * 任务卡
-    * @return \taskcard
-    */
-    public static function taskcard()
-    { 
-        static $a = null; 
+     * 任务卡
+     * @return \taskcard
+     */
+    public static function taskcard() {
+        static $a = null;
         return self::initValue($a, 'taskcard');
     }
+
     /**
-    * @return \sm_taskcard taskcard item数据 
-    */
-    public static function taskcard_getItem($itemid)
-    { 
+     * @return \sm_taskcard taskcard item数据
+     */
+    public static function taskcard_getItem($itemid) {
         return self::get_hash_item('taskcard', $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);
     }
 }
-

+ 12 - 0
Gameserver/App/model/User/Info_Gates.php

@@ -93,6 +93,17 @@ class Info_Gates extends Object_ext {
         }
     }
 
+    /**
+     * 当前关卡信息
+     * @return Ins_GateInfo
+     */
+    public function CurGateInfo() {
+        $gateId = $this->CurrentGateId;
+        my_Assert(StlUtil::dictHasProperty($this->GateList, $gateId), ErrCode::user_Gate_NoUserGateInfo);
+        $gateInfo = ctx()->gates->GateList->$gateId;
+        return $gateInfo;
+    }
+
     /**
      * @return 解锁下一剧情关卡
      */
@@ -111,6 +122,7 @@ class Info_Gates extends Object_ext {
             $gate->GateId = $nextId;
             $this->GateList->$nextId = $gate;
         }
+
         return $nextId;
     }
 }

+ 64 - 6
Gameserver/App/model/User/Ins_GateInfo.php

@@ -14,14 +14,14 @@ namespace loyalsoft;
  * @author c'y'zhao
  */
 class Ins_GateInfo {
-    
+
     public $GateId = 0;
-  
+
     /**
      * 0: 未领取,1: 五分钟奖励已领取 ,2: 十分钟奖励已领取, 3: 通关奖励已领取 (这个必须顺序领取)
      */
     public $FirstReward = 0;
-    
+
     /**
      * 坚持生存的最长时间(单位秒)
      * @var type
@@ -32,12 +32,70 @@ class Ins_GateInfo {
      * 1:通关
      * @param type $arg
      */
-    public $pass = 0; 
-    
+    public $pass = 0;
+
     /**
      * 本关剧情是否已经播放过 0:没有 1:有
      * @var type
      */
     public $plotStart = 0;
-    
+
+    /**
+     * @return bool 是否主线关卡
+     */
+    public function IsMainPlotGate() {
+        return self::GateTypeFromId($this->GateId) == 1;
+    }
+
+    /**
+     * @return /sm_gate 模板数据
+     */
+    public function mo() {
+        return GameConfig::gate_getItem($this->GateId);
+    }
+
+    /**
+     * 从gateId中提取关卡类型
+     * @param type $gateId
+     * @return int 1 主线剧情, 2 主线挑战
+     */
+    public static function GateTypeFromId($gateId) {
+        return Ints::Slice($gateId, 0, 1);
+    }
+
+    /**
+     * 从gateId中提取关卡索引
+     * @param type $gateId
+     * @return int 0..999
+     */
+    public static function GateMapIdFromId($gateId) {
+        return Ints::Slice($gateId, 1, 3);
+    }
+
+    /**
+     * 从gateId中提取地图风格编号
+     * @param type $gateId
+     * @return int 0..99
+     */
+    public static function GateMapStyleFromId($gateId) {
+        return Ints::Slice($gateId, 4, 2);
+    }
+
+    /**
+     * 从gateId中提取地图类型
+     * @param type $gateId
+     * @return int 1 无限地图 2 上下地图 3 有限地图
+     */
+    public static function GateMapTypeFromId($gateId) {
+        return Ints::Slice($gateId, 6, 1);
+    }
+
+    /**
+     * 从gateId中提取关卡难度(挑战关卡分1,2,3)
+     * @param type $gateId
+     * @return int
+     */
+    public static function GateDifficultyFromId($gateId) {
+        return Ints::Slice($gateId, 7, 1);
+    }
 }

+ 5 - 1
Gameserver/App/process/FightProc.php

@@ -343,7 +343,11 @@ class FightProc {
                 ctx()->gates->GateList->$gateId->pass = 1;
             }
             StoreProc::AddMultiItemInStore($gateMo->reward_win);
-            ctx()->gates->UnlockNextPlotGate();
+            if (Ins_GateInfo::GateTypeFromId($gateId) == 1) {                   # 是主线据情关卡
+                ctx()->gates->UnlockNextPlotGate();                             # 解锁下一剧情关卡
+            } else {                                                            # 其他类型, 比如挑战关卡
+                // 刷新挑战关卡记录
+            }
         } else {                                                                # 失败
             StoreProc::AddMultiItemInStore($gateMo->reward_fail);
         }

+ 1 - 1
Gameserver/App/test.php

@@ -25,6 +25,6 @@ use \loyalsoft\pay\OrderNotice;
 //\loyalsoft\TapDBUtil::TestPay();
 //\loyalsoft\CLog::err("wg");
 //$a = new \sm_activity_tiligift();
-
 $item = GameConfig::shop_cash_getItem(1);
 var_dump($item);
+var_dump(Ints::Slice(123456789, 5, 2));

+ 41 - 0
Gameserver/App/util/Ints.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace loyalsoft;
+
+/**
+ * 针对 int 数据做的特殊操作
+ * @author gwang
+ */
+class Ints {
+
+    /**
+     * int 骚操作, 提取第几位到第几位的值(左数)
+     * @param int $i Int值
+     * @param int $start 左边数第几位, 第一位是0
+     * @param int $len 截取长度
+     * @param bool $throwException 是否抛出异常,默认false
+     * @return string
+     * @throws ArgumentOutOfRangeException
+     */
+    public static function Slice(int $i, int $start, int $len, bool $throwException = false): int {
+        $i_len = strlen("$i");
+        if ($throwException) {
+            if ($start < 0 || $start > 18) {
+                throw new \Exception("start is out of range!");
+            }
+            if ($len <= 0 || $start + $len > $i_len) {
+                throw new \Exception("end is out of range!");
+            }
+        }
+        $start = $start < 0 ? 0 : $start;
+        $start = $start > $i_len ? $i_len : $start;
+        $len = $len < 0 ? 0 : $len;
+        $len = ($start + $len) > $i_len ? $i_len - $start : $len;
+
+        $r = (int) Pow(10, $i_len - $start - $len);
+        $l = (int) Pow(10, $i_len - $start);
+        $ret = $i - intval($i / $l) * $l;    // 去除左边
+        $ret /= $r;                          // 去除右边
+        return (int) $ret;
+    }
+}

+ 3 - 2
Gameserver/App/util/UtilInclude.php

@@ -4,6 +4,8 @@ namespace loyalsoft;
 
 // 添加一些必要的引用, 这样可以避免后期查找,提升性能
 require_once 'Enum.php';                                                        # 模拟枚举功能
+require_once 'Bits.php';                                                        # bit操作辅助
+require_once 'Ints.php';                                                        # Int操作辅助
 require_once 'CommUtil.php';                                                    # 一些通用功能
 require_once 'JsonUtil.php';                                                    # json操作做了些封装
 require_once 'TimeUtil.php';                                                    # 时间处理方法
@@ -15,8 +17,7 @@ require_once 'HttpUtil.php';
 require_once 'Event.php';                                                       # 模拟事件模式
 require_once 'DebugHelper.php';                                                 # 调试辅助脚本
 require_once 'SelfChecker.php';                                                 # 自检模块
-require_once 'dao.php';                                                                                                                # dao辅助脚本
-require_once 'Bits.php';                                                                                                                # bit操作辅助
+require_once 'dao.php';                                                         # dao辅助脚本
 //require_once __DIR__ . '/volcengine/VolcUtil.php';                               # 导入火山引擎封装
 //require_once __DIR__ . '/tapdb/TapDBUtil.php';
 //require_once ROOTDIR . '/Util/traits/RedisFlat.php';

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно