1
This commit is contained in:
parent
7b8beb94fb
commit
6dd6e74b53
@ -6,6 +6,7 @@ require_once('mt/Parameter.php');
|
||||
require_once('mt/MapMode.php');
|
||||
|
||||
use mt;
|
||||
use phpcommon\SqlHelper;
|
||||
/*
|
||||
1、周期还害没结束,箱子就掉完了
|
||||
完成度=T max/T cost time(last time-start time)
|
||||
@ -85,7 +86,7 @@ class BattleBoxService {
|
||||
$allocableNum = min(5000, $maxNum * $completionDegree);
|
||||
}
|
||||
if ($allocableNum) {
|
||||
self::setDailyPhaseAllocNum($currPhase, $allocableNum);
|
||||
self::setDailyPhaseAllocNum($currPhase, myself()->_getNowDaySeconds(), $allocableNum);
|
||||
}
|
||||
}
|
||||
if ($allocableNum > 0) {
|
||||
@ -99,7 +100,7 @@ class BattleBoxService {
|
||||
}
|
||||
if ($boxNum > 0) {
|
||||
SqlHelper::insert(
|
||||
$this->_getSelfMysql(),
|
||||
myself()->_getSelfMysql(),
|
||||
't_box_alloc',
|
||||
array(
|
||||
'room_uuid' => $roomUuid,
|
||||
@ -145,14 +146,14 @@ class BattleBoxService {
|
||||
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
|
||||
}
|
||||
|
||||
private static function setDailyPhaseDropTotalNum($phase, $time)
|
||||
private static function setDailyPhaseDropTotalNum($phase, $time, $val)
|
||||
{
|
||||
$key = self::DAILY_PHASE_DROP_TOTAL_KEY . $phase . ':' . $time;
|
||||
$r = myself()->_getRedis($key);
|
||||
$r->setPx($key, $val, 1000 * 3600 * 24 * 7);
|
||||
}
|
||||
|
||||
private static function setDailyPhaseAllocNum($phase, $time)
|
||||
private static function setDailyPhaseAllocNum($phase, $time, $val)
|
||||
{
|
||||
$key = self::DAILY_PHASE_ALLOC_NUM_KEY . $phase . ':' . $time;
|
||||
$r = myself()->_getRedis($key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user