Bladeren bron

降级和章节bug

cyzhao 1 jaar geleden
bovenliggende
commit
6ac2029e58

File diff suppressed because it is too large
+ 368 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230913171504.sql


File diff suppressed because it is too large
+ 368 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230913171758.sql


File diff suppressed because it is too large
+ 368 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230913173303.sql


File diff suppressed because it is too large
+ 368 - 0
DevOps/flscfg/sqlback/jzhj2023_cfg20230914104004.sql


+ 15 - 0
Gameserver/App/base/CmdCode.php

@@ -149,6 +149,21 @@ class CmdCode {
      * 合成
      */
     const cmd_store_equipCompose = 6406;
+    
+    /**
+     * 消耗体力
+     */
+    const store_comsumeTili = 6407;
+    
+    /**
+     * 装备降级
+     */
+    const store_equip_fallLevel = 6408;
+    
+    /**
+     * 装备降品
+     */
+    const store_equip_fallQual = 6409;
 
     // </editor-fold>
     // <editor-fold defaultstate="collapsed" desc="商城操作码 - 65xx">

+ 13 - 0
Gameserver/App/base/ErrCode.php

@@ -349,7 +349,20 @@ class ErrCode {
     
 //   // <editor-fold defaultstate="collapsed" desc="    store 3300    ">    
 
+    /**
+     * 不存在该装备
+     */
     const user_store_NoEquip = 3301;
+    
+    /**
+     * 该装备降级
+     */
+    const user_store_equipNoFallLevel = 3302;
+    
+    /**
+     * 
+     */
+    const user_store_equipNoFallQual = 3303;
 // </editor-fold>
 //
     

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2023-09-13 17:33:01
+ // 日期: 2023-09-14 10:40:02
 ////////////////////
 
 /**

+ 69 - 0
Gameserver/App/model/Const/sm_buff.php

@@ -0,0 +1,69 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2023-09-13 18:04:51
+////////////////////
+
+
+/**
+ * Static Model buff buff配置表
+ */
+class sm_buff
+{
+
+    /**
+    * @var Int32 唯一id  
+    */
+    public $id;
+
+    /**
+    * @var String 名称  
+    */
+    public $name;
+
+    /**
+    * @var String buff描述  
+    */
+    public $desc;
+
+    /**
+    * @var String 附加对象: "none" 无, 角色 'hero', 怪'monster' default(none) 
+    */
+    public $attachTarget;
+
+    /**
+    * @var String 行为类型:
+    *      /// 无 
+    *      none,
+    *      // 无敌
+    *      invincible,
+    *      // 流血: 每秒流逝血量1%
+    *      bleed,    
+    *   default(none) 
+    */
+    public $actionType;
+
+    /**
+    * @var Single 行为参数1: default(0) 
+    */
+    public $actionParam1;
+
+    /**
+    * @var Single 行为参数2: default(0) 
+    */
+    public $actionParam2;
+
+    /**
+    * @var Single 生存时间(秒) default(0) 
+    */
+    public $lifeTime;
+
+    /**
+    * @var Single 生效逻辑触发时间间隔(秒) default(1) 
+    */
+    public $effectInterval;
+
+}
+

+ 6 - 1
Gameserver/App/model/Const/sm_evolve.php

@@ -33,6 +33,11 @@ class sm_evolve
     */
     public $needGold_unlock;
 
+    /**
+    * @var String 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $icon;
+
     /**
     * @var Int32 等级  
     */
@@ -56,7 +61,7 @@ class sm_evolve
     /**
     * @var String 用途未知!!请到数据库中添加字段注释。  
     */
-    public $icon;
+    public $specificIcon;
 
 }
 

+ 1 - 1
Gameserver/App/model/Const/sm_item.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2023-09-08 14:34:51
+ // 日期: 2023-09-14 10:02:09
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_skillTypeArr.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2023-09-08 12:04:51
+ // 日期: 2023-09-14 10:04:51
 ////////////////////
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_skills.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2023-09-08 12:04:51
+ // 日期: 2023-09-14 10:04:51
 ////////////////////
 
 

+ 2 - 2
Gameserver/App/process/FightProc.php

@@ -388,7 +388,7 @@ class FightProc {
         switch ($index) {
             case 1:
                 $ts = $gateMo->first_ts1 * 60;
-                if ($ts >= $gateInfo->MaxSeconds) {
+                if ($gateInfo->MaxSeconds >= $ts) {
                     $tag = true;
                 }
                 $mask = 1;
@@ -396,7 +396,7 @@ class FightProc {
                 break;
             case 2:
                 $ts = $gateMo->first_ts2 * 60;
-                if ($ts >= $gateInfo->MaxSeconds) {
+                if ($gateInfo->MaxSeconds>= $ts) {
                     $tag = true;
                 }
                 $mask = 2;

+ 113 - 0
Gameserver/App/process/StoreProc.php

@@ -34,10 +34,123 @@ class StoreProc {
                 return StoreProc::equipUpgrade_MaxLv();
             case CmdCode::cmd_store_equipCompose:                               # 6406 装备合成(升阶/进化)
                 return StoreProc::equipCompose();
+            case CmdCode::store_equip_fallLevel:                                #6408 装备降级
+                return StoreProc::equipFallLevel();
+            case CmdCode::store_equip_fallQual:                                 #6409 装备降品    
+                return StoreProc::equipFallQual();    
             default:
                 Err(ErrCode::cmd_err);
         }
     }
+    /**
+     * 6409 装备降品  
+     * @return type
+     */
+    public static function equipFallLevel() {
+        list($uid) = req()->paras;//武器uid
+                            
+        $price = self::GetEquipFallLevelInfo($uid);
+        StoreProc::AddMultiItemInStore($price);
+        ctx()->store->equip->$uid->level = 1;
+                
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,));
+    }
+    
+    public static function GetEquipFallLevelInfo($uid) {
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->equip, $uid), ErrCode::user_store_NoEquip);
+        $curLv = ctx()->store->equip->$uid->level;   
+        my_Assert($curLv > 1, ErrCode::user_store_equipNoFallLevel);
+        
+        $equipMo = GameConfig::equip_getItem(ctx()->store->equip->$uid->typeId);
+        my_Assert($equipMo != null, ErrCode::err_const_no);
+        
+        $id = $equipMo->position;
+        $strList = explode(';', glc()->equipLeveUpTuzhi);
+        $tuzhiId = 0;
+        foreach ($strList as $str) {
+            $s = explode(',', $str);
+            if ($s[0] == $id)
+            {
+                $tuzhiId = $s[1];
+                break;
+            }
+        }
+                      
+        $dic = GameConfig::equip_levelupgrade();
+        $gold = 0;
+        $tuzhiNum = 0;
+        for ($i = 1; $i < $curLv; $i++)
+        {
+            $gold += $dic->$i->needGold;
+            $tuzhiNum += $dic->$i->needItemNum;
+        }
+        
+        $price = "1,".$gold.";".$tuzhiId.",".$tuzhiNum;
+        return $price;
+    }
+
+        /**
+     * 6408 装备降级
+     * @return type
+     */
+    public static function equipFallQual() {
+        list($uid) = req()->paras;
+         
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->equip, $uid), ErrCode::user_store_NoEquip);
+        $qual = ctx()->store->equip->$uid->qual;   
+        my_Assert($qual > 4, ErrCode::user_store_equipNoFallQual);
+        
+        $sList = explode(';',glc()->equipQualUnlockSkillId);                    
+        $tag = true;       
+        $fallQual = $qual;
+        foreach ($sList as $s) {
+            $str = explode(',', $s);
+            if ($qual == $str[0])
+            {
+                $tag = false;
+                break;
+            }
+            $num = 0;     
+            $fallQual = $str[0];
+            foreach ($str as $str2)
+            {
+                $num += 1;
+                if ($str2 == $qual)
+                {
+                    break;
+                }                
+            }
+        }
+        
+        my_Assert($tag, ErrCode::user_store_equipNoFallQual);           
+        $posId = 1;    
+        $commonId = 0;
+        $commonList = explode(';', glc()->EquipFallQualCommonItem);
+        foreach ($commonList as $str)
+        {
+            $s = explode(',', $str);
+            if ($s[0] == $posId)
+            {
+                $commonId = $s[1];
+            }
+        }
+        
+        $price = self::GetEquipFallLevelInfo($uid);
+        StoreProc::AddMultiItemInStore($price);    
+        if($num -1 > 0){
+            $num-=1;
+            StoreProc::AddMultiItemInStore($commonId.','.$num);
+        }    
+        ctx()->store->equip->$uid->qual = $fallQual;
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,));
+    }
 
     /**
      * 6406 合成

Some files were not shown because too many files changed in this diff