Przeglądaj źródła

添加地图解锁逻辑

gwang 4 lat temu
rodzic
commit
ec150e50e3

+ 1 - 1
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-01 16:38:18
+ // 日期: 2021-03-02 16:01:21
 ////////////////////
 
 /**

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_gate.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-10 13:46:48
+ // 日期: 2021-03-02 14:52:58
 ////////////////////
 
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_gate_mainland.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-22 15:13:55
+ // 日期: 2021-03-02 16:00:39
 ////////////////////
 
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_hero.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-09 14:15:57
+ // 日期: 2021-03-02 14:51:11
 ////////////////////
 
 

+ 131 - 0
Gameserver/Amfphp/model/User/Info_Map.php

@@ -0,0 +1,131 @@
+<?php
+
+namespace loyalsoft;
+
+/**
+ * 玩家关卡地图数据
+ * @author gwang
+ * @version 
+ *         1.0.0 Created at 2021年3月2日14:32:52 关卡分三层处理 大陆->区域->关卡.
+ */
+class Info_Map extends Object_ext {
+
+    /**
+     * 大陆数据
+     * @var dict<int,Ins_Mainland>
+     */
+    public $mainlands;
+
+    function __construct($arg = null) {
+        if (null === $arg) {
+            // 直接初始化8个大陆的基本数据
+            foreach (GameConfig::gate_mainland() as $id => $land) {
+                $this->mainlands = ObjectInit();
+                $ins = new Ins_Mainland();
+                $ins->landId = $id;
+                if (1 == $id) {                                                 # 第一个大陆, 直接开启第一个区域
+                    $zones = explode(',', $land->containZones);
+                    $zoneid = $zones[0];
+                    $zone = new Ins_Mapzone();
+                    $zone->zoneid = $zoneid;
+                    $zonecfg = GameConfig::gate_zone_getItem($zoneid);
+                    my_Assert($zonecfg, ErrCode::err_const_no);
+                    $gateIds = explode(',', $zonecfg->contains);
+                    $zone->highest = $gateIds[0];
+                    $ins->normal->$zoneid = $zone;
+                }
+                $this->$id = $ins;
+            }
+        } else {
+            parent::__construct($arg);
+        }
+    }
+
+}
+
+/**
+ * 八大陆数据 extends Object
+ * 困难难度不会垮大陆关联, 只在本大陆中同一个区域或者不同区域之间互相关联
+ * @version
+ *          2.0.0 改成八大陆数据 at 2021年3月2日14:37:51 -gwang  
+ *          1.0.0 Created at 2017-2-14. by --gwang
+ * @author gwang (mail@wanggangzero.cn)
+ * @copyright ? 2017-2-14, SJZ LoyalSoft Corporation & gwang. All rights reserved.
+ */
+class Ins_Mainland extends Object_ext {
+
+    /**
+     * @var int 当前大陆id
+     */
+    public $landId;
+
+    /**
+     * 普通关卡
+     */
+    public $normal;
+
+    /**
+     * 困难关卡
+     */
+    public $hard;
+
+    /**
+     * 精英关卡
+     */
+    public $elite;
+
+    function __construct($arg = null) {
+        if (null === $arg) {
+            $this->normal = new \stdClass();
+            $this->hard = new \stdClass();
+            $this->elite = new \stdClass;
+        } else {
+            parent::__construct($arg);
+        }
+    }
+
+}
+
+/**
+ * 玩家关卡地图区域数据
+ * @author gwang
+ */
+class Ins_Mapzone extends Object_ext {
+
+    /**
+     * 当前区域id
+     * @var type
+     */
+    public $zoneid;
+
+    /**
+     * 最后一次挑战的关卡ID
+     * @var int
+     */
+    public $latest = 1;
+
+    /**
+     * 已挑战的最高关卡Id(用于限定解锁关卡)
+     * @var int
+     */
+    public $highest = 1;
+
+    /**
+     * 关卡具体数据()
+     * @var asoc_array/Ins_UGate dic<gateId,Ins_UGate>
+     */
+    public $gates;
+
+    /**
+     * 构造函数
+     * @param type $arg
+     */
+    function __construct($arg = null) {
+        if (null === $arg) {
+            $this->gates = ObjectInit();
+        } else {
+            parent::__construct($arg);
+        }
+    }
+
+}

+ 10 - 0
Gameserver/Amfphp/model/User/Info_UserGateDifficulty.php

@@ -27,28 +27,38 @@ class Info_UserGateDifficulty extends Object_ext {
      */
     public $elite;
 
+//
+// <editor-fold defaultstate="collapsed" desc="'淘汰'的功能">
+
     /**
      * 战斗总次数
+     * @deprecated since 2021年3月2日 没人关注这个了 
      */
     public $TotalNum;
 
     /**
      * 当天战斗的次数
+     * @deprecated since version 2021.3.2 策划都不知道有这种设定了吧, 狗熊掰棒子
      */
     public $Times;
 
     /**
      * 已经消灭的bossid集合
+     * @deprecated since version 2021.3.2 没人关注这个了(缺少延续性)
      * @var array
      */
     public $killedBoss;
 
     /**
      * 章节星数奖励
+     * @deprecated since version 2021.3.2 后面没有评星的需求了, 打关卡主要是掉落物品.
      * @var { "chapterId":{"1":[],"2":[],"3":[]},"chapterId":{...}:.... }
      */
     public $chapterStarsRwd;
 
+// </editor-fold>
+//
+
     function __construct($arg = null) {
         if (null === $arg) {
             $this->TotalNum = 0;

+ 14 - 13
Gameserver/nbproject/private/private.xml

@@ -12,25 +12,26 @@
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_UGate.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/StoreProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PublicState.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc/NormalEventProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/UserProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc/SweepGatesProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_UserBase.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskCard.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/main.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskStep.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_UserGateDifficulty.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PrivateState.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Enum_EventType.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_UGate.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/CmdCode.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PublicState.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_UserGameHero.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_PrivateState.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Enum_EventType.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_UserGateDifficulty.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/StoreProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskCard.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Ins_TaskStep.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_TaskCard_Shop.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/UserProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/main.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EventProc/NormalEventProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Data_UserGame.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/Info_Map.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc.php</file>
         </group>
     </open-files>
 </project-private>