소스 검색

升级bug修复

cyzhao 1 주 전
부모
커밋
1cd6554131
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      Gameserver/App/process/PetProc.php

+ 5 - 3
Gameserver/App/process/PetProc.php

@@ -39,10 +39,12 @@ class PetProc {
         $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
         $vo->level += 1;
 
-        my_Assert(ctx()->baseInfo->gold >= $vo->mo()->unlockArea_gold, ErrCode::notenough_gold_msg);
-        my_Assert(ctx()->baseInfo->level >= $vo->mo()->unlockArea_userLv, ErrCode::user_levelnotenough_msg);
+        
+        $mo = GameConfig::pet_area_level_getItem($areaId, $vo->level);
+        my_Assert(ctx()->baseInfo->gold >= $mo->unlockArea_gold, ErrCode::notenough_gold_msg);
+        my_Assert(ctx()->baseInfo->level >= $mo->unlockArea_userLv, ErrCode::user_levelnotenough_msg);
 
-        ctx()->base()->Consume_Gold($vo->mo()->unlockArea_gold);
+        ctx()->base()->Consume_Gold($mo->unlockArea_gold);
         ctx()->store->exploreArea->$areaId = $vo;
         UserProc::updateUserInfo();