Просмотр исходного кода

fixed: 刷表更新, 以及一个|=操作符隐藏很深的bug.

gwang 4 лет назад
Родитель
Сommit
5fc9994de5

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-04-02 17:33:39
+ // 日期: 2021-04-12 16:08:15
 ////////////////////
 
 /**

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-08 14:47:32
+ // 日期: 2021-04-09 15:18:36
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-26 10:29:17
+ // 日期: 2021-04-09 17:35:04
 ////////////////////
 
 

+ 7 - 7
Gameserver/Amfphp/model/Const/sm_gate_passCondition.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-09-02 18:00:33
+ // 日期: 2021-04-09 17:42:06
 ////////////////////
 
 
@@ -15,12 +15,12 @@ class sm_gate_passCondition
 
     /**
     * @var Int32 通关条件类型
-    *  1.通关时间
-    *  2.队伍中死亡人数
-    *  3.受击次数
-    *  4.指定角色
-    *  5.连击次数
-    *  6.释放必杀技次数 default(0) 
+    *  1.通关耗时不超过n秒, 参数: n秒
+    *  2.无人阵亡下通关, 参数: 无
+    *  3.唤灵师血量高于n%, 参数: n
+    *  4.装备指定言灵,参数: 言灵TypeId
+    *  5.至少装备n个指定x属性的言灵,参数: 数量n,元素类型s(见言灵表weaktype)
+    *  6.开启关卡内所有宝箱, 参数: 无 default(0) 
     */
     public $conditionType;
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-18 10:12:19
+ // 日期: 2021-04-09 14:37:57
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-05 11:56:07
+ // 日期: 2021-04-12 15:53:12
 ////////////////////
 
 

+ 6 - 1
Gameserver/Amfphp/model/Const/sm_item_yanling.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-19 10:40:09
+ // 日期: 2021-04-09 16:02:30
 ////////////////////
 
 
@@ -193,6 +193,11 @@ class sm_item_yanling
     */
     public $career;
 
+    /**
+    * @var Int32 弱点类型(元素类型)//0 空的//1 金 //2 冰 //3 火 //4 风 //5 雷 //6 毒 //7 黑暗 //8 亡灵 // 9 物理 default(0) 
+    */
+    public $weakType;
+
     /**
     * @var Int32 生命上限加成 default(0) 
     */

+ 16 - 1
Gameserver/Amfphp/model/Const/sm_plot.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-04-02 17:28:52
+ // 日期: 2021-04-12 16:05:57
 ////////////////////
 
 
@@ -114,5 +114,20 @@ class sm_plot
     */
     public $AnimLoop;
 
+    /**
+    * @var String 选择orderIndex 列表,[选择描述语句:orderIndex,选择描述语句:orderIndex]  
+    */
+    public $selectOrder;
+
+    /**
+    * @var Int32 下一句对话orderIndex ,默认为0时 order + 1  
+    */
+    public $nextOrder;
+
+    /**
+    * @var Int32 0:选择所有选项,1:选择唯一选项 default(0) 
+    */
+    public $selectType;
+
 }
 

+ 1 - 1
Gameserver/Amfphp/model/User/Ins_UGate.php

@@ -15,7 +15,7 @@ class Ins_UGate extends Object_ext {
      *
      * @var int 得分评星 
      */
-    public $star = 1;
+    public $star = 0;
     public $cleared = 0;
 
     /**

+ 0 - 3
Gameserver/Amfphp/process/TaskProc.php

@@ -218,10 +218,7 @@ class TaskProc {
     static function PlotFinish($req) {
         list($gate_or_npc_id, $stage) = $req->paras;
         $bUpdate = self::OnPlotOver($gate_or_npc_id, $stage);                   # 触发一下任务检查,更新任务状态
-//        var_dump($gate_or_npc_id);
-//        var_dump($stage);
         $arr = GameConfig::plot_getItem($gate_or_npc_id, $stage);               # 查找对应的剧情
-//        var_dump($arr);
         foreach ($arr as $plot) {
             isEditor() and $plot = new \sm_plot();
             if (!empty($plot->presentItem)) {

+ 1 - 1
Gameserver/Amfphp/service_call/pay/Mo/payRequest.php

@@ -1,7 +1,7 @@
 <?php
 
 /**
- * Description of PayRequest
+ * 统一的预创建订单请求对象
  * @version
  *          1.0.0 Created at 2017-12-21. by --gwang
  * @author gwang (mail@wanggangzero.cn)

+ 1 - 1
Gameserver/Amfphp/test.php

@@ -10,4 +10,4 @@ echoLine("phpver: " . PHP_VERSION . PHP_EOL);
 //set_time_limit(15);                                                           # 设置执行超时时间
 //
 // 
- 
+echo number_format(1.0125, 2, '.', '');

+ 57 - 6
Gameserver/Amfphp/util/CLog.php

@@ -189,7 +189,7 @@ class CLog {
             $sql = "create table  if not exists `$key` (`row` INT(11) NOT NULL AUTO_INCREMENT COMMENT '自增行号', `msg` TEXT NULL COMMENT '错误消息内容',	PRIMARY KEY (`row`)) COLLATE='utf8_general_ci' ENGINE=InnoDB;";
             daoInst()->exec($sql);                                              # 创建表
             $data = array();
-            array_map(function($v) use(&$data) {
+            array_map(function ($v) use (&$data) {
                 $s = daoInst()->quote($v);
                 $data[] = "(" . $s . ")";
             }, $arr);
@@ -222,16 +222,67 @@ class CLog {
         $row = $array[0];
         $server_addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : "-";
         $client_addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "-";
-        $str = "[" . $server_addr . "][$zoneid 区][" . date('Y-m-d H:i:s') #              # 主机地址、分区、时间
-                . "][" . $client_addr . "][" #                                            # 客户端地址
+        $str = "[" . $server_addr . "][$zoneid 区][" . req()->oid . "]"                    # 请求主机ip地址、分区, uid
+                . "[" . date('Y-m-d H:i:s') . "][" . $client_addr . "]["                   # 时间, 客户端来源ip地址
                 . (isset($row['file']) ? CommUtil::str2UTF8(basename($row['file'])) : '-') # 所在文件名
-                . ":" . (isset($row['line']) ? $row['line'] : "???")#                     # 所在行   
-                . "]" . (isset($tag) ? "[" . CommUtil::str2UTF8($tag) . "]" : "")         #
-                . "=> " . var_export($msg, true)#   # 标签、内容
+                . ":" . (isset($row['line']) ? $row['line'] : "???")#                      # 所在行   
+                . "]" . (isset($tag) ? "[" . CommUtil::str2UTF8($tag) . "]" : "")          # 标签
+                . "=> " . var_export($msg, true)#                                          # 内容
                 . PHP_EOL;
         return $str;
     }
 
+// </editor-fold>
+//
+// <editor-fold defaultstate="collapsed" desc="优化后的文件日志(引入cache)">
+
+    /**
+     * 写入文件日志
+     * @global \loyalsoft\type $zoneid
+     * @param type $type
+     * @param type $msg
+     * @return type
+     */
+    private static function fileLog($type, $msg) {
+        $fileName = self::GetDir($type) . date('Ymd') . ".log";                 # 日志文件名(按天分割) 
+        $fd = fopen($fileName, "a");
+        if (is_array($msg) || is_object($msg)) {
+            $msg = JsonUtil::encode($msg);
+        }
+        global $zoneid;
+        fputs($fd, "[" . self::dtCurrent() . "] $zoneid 区, " . $msg . "\r\n");
+        fclose($fd);
+    }
+
+    private static $cache = array();
+
+    private static function output2($type, $msg) {
+        if (!isset(self::$cache[$type])) {
+            self::$cache[$type] = array();
+        }
+        if (is_array($msg) || is_object($msg)) {
+            $msg = JsonUtil::encode($msg);
+        }
+        global $zoneid;
+        self::$cache[$type][] = "[" . self::dtCurrent() . "] $zoneid 区, " . $msg . "\r\n";
+    }
+
+    private static function flushFileCache() {
+        if (is_array(self::$cache)) {
+            foreach (self::$cache as $t => $varr) {
+                $fileName = self::GetDir($t) . date('Ymd') . ".log";            # 日志文件名(按天分割) 
+                $fd = fopen($fileName, "a");
+                if (is_array($varr)) {
+                    foreach ($varr as $msg) {
+                        fputs($fd, $msg);
+                    }
+                }
+                fclose($fd);
+            }
+            self::$cache = array();
+        }
+    }
+
 // </editor-fold>
 //
 // 避免异常导致缓存丢失, 付费模块的日志直接写入文件