cyzhao 1 year ago
parent
commit
4f9c2f581c
1 changed files with 9 additions and 2 deletions
  1. 9 2
      Gameserver/App/process/FightProc.php

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

@@ -136,8 +136,7 @@ class FightProc {
         $ctxArr = explode(';', $rewardStr);
         $numArr = explode('-', $ctxArr[0]);
         $num = rand($numArr[0], $numArr[1]);
-
-
+        
         $rand = 0;
         $itemArr = explode(',', $ctxArr[1]);
         foreach ($itemArr as $value) {
@@ -469,6 +468,14 @@ class FightProc {
                 'task' => ctx()->task,
             );
             return Resp::ok($ret);
+        } else if ($finalLayer == $lastLayer) {
+            $ret = array(
+                'store' => ctx()->store,
+                'gold' => ctx()->base()->gold,
+                'cash' => ctx()->base()->cash,
+                'task' => ctx()->task,
+            );
+            return Resp::ok($ret);
         }
         return Resp::err(ErrCode::tower_rewardNo);                              # 没有奖励
     }