cyzhao 1 týždeň pred
rodič
commit
c67c4b859f
1 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 3 2
      Gameserver/App/process/PetProc.php

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

@@ -386,8 +386,9 @@ class PetProc {
         $num = $ins_breed->mo()->breedTs/60/10;
         $cash_one = $ins_breed->mo()->fastBreed_cost/$num;
         
-        $ts = $ins_breed->endTs - now();
-        $costNum = intval($ts/60/10);
+        $ts_shengyu = $ins_breed->endTs - now();
+        $cost_Ts = $ins_breed->mo()->breedTs - $ts_shengyu;
+        $costNum = intval($cost_Ts/60/10);
         
         my_Assert(ctx()->baseInfo->cash >= $costNum*$cash_one, ErrCode::notenough_cash_msg);
         ctx()->base()->Consume_Cash($costNum*$cash_one);