浏览代码

升星获取配置问题修改

cyzhao 4 年之前
父节点
当前提交
7629a93fba
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Gameserver/Amfphp/process/HeroProc.php

+ 5 - 3
Gameserver/Amfphp/process/HeroProc.php

@@ -979,8 +979,9 @@ class HeroProc {
         $tag = true;
         foreach ($uidList as $costUid) {
             if (StlUtil::dictHasProperty($store->yanling, $costUid)) {//校验是否是同类型
-                $confDic = GameConfig::item_yanling_getItem($costUid);
-                if ($confDic->type != GameConfig::item_yanling_getItem($yanlingUid)->type) {
+                $confDic = GameConfig::item_yanling_getItem($store->yanling->$costUid->typeId);
+                my_Assert(null != $confDic, ErrCode::hero_const_no_err);
+                if ($confDic->type != GameConfig::item_yanling_getItem($store->yanling->$yanlingUid->typeId)->type) {
                     $tag = false;
                     break;
                 }
@@ -996,7 +997,8 @@ class HeroProc {
 
         $exp = 0;
         foreach ($uidList as $costuid) {
-            $confDic = GameConfig::item_yanling_getItem($costuid);
+            $confDic = GameConfig::item_yanling_getItem($store->yanling->$costUid->typeId);
+            my_Assert(null != $confDic, ErrCode::hero_const_no_err);
             $exp += $confDic->addStarExp;
 
             StlUtil::dictRemove($store->yanling, $costuid);