Przeglądaj źródła

装备宝石镶嵌bug修复

cyzhao 6 miesięcy temu
rodzic
commit
5b818853db

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 17:21:24
+ // 日期: 2024-11-18 15:22:20
 ////////////////////
 
 /**

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 15:10:25
+ // 日期: 2024-11-14 17:43:00
 ////////////////////
 
 

+ 3 - 1
Gameserver/App/model/Const/sm_equip_compose.php

@@ -24,7 +24,9 @@ class sm_equip_compose
     public $qual;
 
     /**
-    * @var String 合成需要的装备条件;1:本体类型  2:同部位类型  
+    * @var String 合成需要的装备条件;1:本体类型  2:同部位类型(含合成材料)
+    *  品阶要求
+    *  数量  
     */
     public $compose_condition;
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-28 17:15:30
+ // 日期: 2024-11-14 11:27:49
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-04 09:40:43
+ // 日期: 2024-11-18 14:14:57
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-04 09:40:43
+ // 日期: 2024-11-18 14:14:57
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-17 11:35:52
+ // 日期: 2024-11-11 17:35:53
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 17:05:53
+ // 日期: 2024-11-13 16:20:19
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 17:05:53
+ // 日期: 2024-11-13 16:20:19
 ////////////////////
 
 

+ 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 
- // 日期: 2024-11-11 15:33:17
+ // 日期: 2024-11-15 11:35:54
 ////////////////////
 
 

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

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

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-17 15:43:49
+ // 日期: 2024-11-15 09:35:54
 ////////////////////
 
 

+ 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 
- // 日期: 2024-11-11 11:35:53
+ // 日期: 2024-11-12 09:35:53
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 17:01:00
+ // 日期: 2024-11-15 14:22:43
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-11-11 17:01:00
+ // 日期: 2024-11-15 14:22:43
 ////////////////////
 
 

+ 19 - 16
Gameserver/App/process/StoreProc.php

@@ -860,7 +860,7 @@ class StoreProc {
         my_Assert(StlUtil::dictHasProperty(ctx()->store->equip, $equipUid), ErrCode::user_store_NoEquip);
         $ins_equip = new Ins_Equip(ctx()->store->equip->$equipUid);
         $ins_gem = new Ins_Gem(ctx()->store->gemStore->$uid);
-        my_Assert($ins_equip->mo()->position == $ins_gem->mo()->qual, ErrCode::user_store_PositionNotFit);
+        my_Assert($ins_equip->mo()->position == $ins_gem->mo()->position, ErrCode::user_store_PositionNotFit);
 
         $gemSetSlotDic = $ins_equip->gemSetSlot;
         $tag_index = 0;
@@ -880,7 +880,8 @@ class StoreProc {
                 my_Assert($tag_gem == null, ErrCode::user_store_GemCanotSet);
                 for ($i = 1; $i <= $mo->initNum_slot + $mo->buyNum_slot; $i++) {
                     if (!StlUtil::dictHasProperty($gemSetSlotDic, $i)) {
-                        $gemSetSlotDic->$i = $ins_gem;
+                        //$gemSetSlotDic->$i = $ins_gem;
+                        $gemSetSlotDic->$i = $uid;
                         break;
                     }
                 }
@@ -891,7 +892,8 @@ class StoreProc {
                 $gUid = $gemSetSlotDic->$replaceUId;
                 $replace_ins_Gem = new Ins_Gem(ctx()->store->gemStore->$gUid); //这个$replaceUId是坑位的index id
                 my_Assert($replace_ins_Gem->mo()->qual < $ins_gem->mo()->qual, ErrCode::user_store_NoExistGemReplace);
-                $gemSetSlotDic->$replaceUId = $ins_gem;
+                //$gemSetSlotDic->$replaceUId = $ins_gem;
+                $gemSetSlotDic->$replaceUId = $uid;
                 break;
             case 3://手动
                 my_Assert(count((array) $gemSetSlotDic) >= $mo->initNum_slot + $mo->buyNum_slot, ErrCode::user_store_GemCanotSet);
@@ -901,20 +903,21 @@ class StoreProc {
                 //$id = $replace_ins_Gem->uid;
                 if ($tag_gem != null) {//如果有u那
                     my_Assert($replace_ins_Gem->uid == $tag_gem->uid, ErrCode::user_store_SameGemCanotEquip); //点的不是u一样的,则提示同一件装备无法镶嵌多个技能相同的宝石 【错误】
-                    //有U一样的,则点击正好是这个直接替换
-                    //$user->store->gemStore->$id = $replace_ins_Gem;
-                    $gemSetSlotDic->$tag_index = $ins_gem;
+                    //有U一样的,则点击正好是这个直接替换                
+                    //$gemSetSlotDic->$tag_index = $ins_gem;
+                    $gemSetSlotDic->$tag_index = $uid;
                 } else {
-                    $go_index = 0;
-                    foreach ($gemSetSlotDic as $slotId => $gUid) {
-                        if ($gUid == $replaceUId) {
-                            $go_index = $slotId;
-                            break;
-                        }
-                    }
-
-                    my_Assert($go_index > 0, ErrCode::user_store_NoExistGemReplace);
-                    $gemSetSlotDic->$go_index = $ins_gem;
+//                    $go_index = 0;
+//                    foreach ($gemSetSlotDic as $slotId => $gemUid) {
+//                        if ($slotId == $replaceUId) {
+//                            $go_index = $slotId;
+//                            break;
+//                        }
+//                    }
+//
+//                    my_Assert($go_index > 0, ErrCode::user_store_NoExistGemReplace);
+                    //$gemSetSlotDic->$go_index = $ins_gem;
+                    $gemSetSlotDic->$replaceUId = $uid;
                 }
 
                 break;