Browse Source

孵化扣钻石bug

cyzhao 1 tuần trước cách đây
mục cha
commit
c67c4b859f
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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);