1
This commit is contained in:
parent
da1f855dcb
commit
c6b59f1961
@ -138,8 +138,8 @@ class Hero(object):
|
|||||||
['!attr', [Attr()], '属性'],
|
['!attr', [Attr()], '属性'],
|
||||||
['try_count', 0, '剩余体验次数 当state=1时才有意义'],
|
['try_count', 0, '剩余体验次数 当state=1时才有意义'],
|
||||||
['lock_type', 0, '0:无锁 1:升级 2:升阶'],
|
['lock_type', 0, '0:无锁 1:升级 2:升阶'],
|
||||||
['lock_time', 0, '使用锁定时间(升级或者升阶触发),单位秒,锁定期间不可战斗和做其他操作'],
|
['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'],
|
||||||
['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'],
|
['unlock_trade_time', 0, '出售解锁utc时间(升级或者升阶完成后触发),只锁交易,其他的操作仍可进行,和lock_type无关是独立的锁!!!'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class HeroSkin(object):
|
class HeroSkin(object):
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
require_once('mt/GunTalentGrow.php');
|
require_once('mt/GunTalentGrow.php');
|
||||||
require_once('mt/GunTalent.php');
|
require_once('mt/GunTalent.php');
|
||||||
|
require_once('mt/Parameter.php');
|
||||||
|
|
||||||
require_once('models/GunSkin.php');
|
require_once('models/GunSkin.php');
|
||||||
require_once('models/GunTalent.php');
|
require_once('models/GunTalent.php');
|
||||||
@ -180,7 +181,8 @@ class GunController extends BaseAuthedController {
|
|||||||
'gun_lv' => $gunDb['gun_lv'] + 1,
|
'gun_lv' => $gunDb['gun_lv'] + 1,
|
||||||
'rand_attr' => json_encode($attrs),
|
'rand_attr' => json_encode($attrs),
|
||||||
'lock_type' => Gun::LEVEL_LOCK,
|
'lock_type' => Gun::LEVEL_LOCK,
|
||||||
'unlock_time' => $this->_getNowTime() + $currLevelMeta['time']
|
'unlock_time' => $this->_getNowTime() + $currLevelMeta['time'],
|
||||||
|
'unlock_trade_time' => $this->_getNowTime() + $currLevelMeta['time'] + mt\Parameter::getVal('gun_lock_transaction_time', 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
@ -279,7 +281,8 @@ class GunController extends BaseAuthedController {
|
|||||||
'quality' => $gunDb['quality'] + 1,
|
'quality' => $gunDb['quality'] + 1,
|
||||||
'rand_attr' => json_encode($attrs),
|
'rand_attr' => json_encode($attrs),
|
||||||
'lock_type' => Gun::QUALITY_LOCK,
|
'lock_type' => Gun::QUALITY_LOCK,
|
||||||
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time']
|
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'],
|
||||||
|
'unlock_trade_time' => $this->_getNowTime() + $currQualityMeta['time'] + mt\Parameter::getVal('gun_lock_transaction_time', 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
|
@ -6,6 +6,7 @@ require_once('mt/Item.php');
|
|||||||
require_once('mt/HeroLevel.php');
|
require_once('mt/HeroLevel.php');
|
||||||
require_once('mt/HeroQuality.php');
|
require_once('mt/HeroQuality.php');
|
||||||
require_once('mt/AttrHelper.php');
|
require_once('mt/AttrHelper.php');
|
||||||
|
require_once('mt/Parameter.php');
|
||||||
|
|
||||||
require_once('models/Hero.php');
|
require_once('models/Hero.php');
|
||||||
require_once('models/HeroSkin.php');
|
require_once('models/HeroSkin.php');
|
||||||
@ -167,7 +168,8 @@ class HeroController extends BaseAuthedController {
|
|||||||
'hero_lv' => $heroDb['hero_lv'] + 1,
|
'hero_lv' => $heroDb['hero_lv'] + 1,
|
||||||
'rand_attr' => json_encode($attrs),
|
'rand_attr' => json_encode($attrs),
|
||||||
'lock_type' => Hero::LEVEL_LOCK,
|
'lock_type' => Hero::LEVEL_LOCK,
|
||||||
'unlock_time' => $this->_getNowTime() + $currLevelMeta['time']
|
'unlock_time' => $this->_getNowTime() + $currLevelMeta['time'],
|
||||||
|
'unlock_trade_time' => $this->_getNowTime() + $currLevelMeta['time'] + mt\Parameter::getVal('hero_lock_transaction_time', 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
@ -266,7 +268,8 @@ class HeroController extends BaseAuthedController {
|
|||||||
'quality' => $heroDb['quality'] + 1,
|
'quality' => $heroDb['quality'] + 1,
|
||||||
'rand_attr' => json_encode($attrs),
|
'rand_attr' => json_encode($attrs),
|
||||||
'lock_type' => Gun::QUALITY_LOCK,
|
'lock_type' => Gun::QUALITY_LOCK,
|
||||||
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time']
|
'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'],
|
||||||
|
'unlock_trade_time' => $this->_getNowTime() + $currQualityMeta['time'] + mt\Parameter::getVal('hero_lock_transaction_time', 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$propertyChgService = new services\PropertyChgService();
|
$propertyChgService = new services\PropertyChgService();
|
||||||
|
@ -55,12 +55,11 @@ class Gun extends BaseModel {
|
|||||||
{
|
{
|
||||||
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
||||||
$lockType = 0;
|
$lockType = 0;
|
||||||
$lockTime = 0;
|
$unlockTime = 0;
|
||||||
if ($row['lock_type'] != 0 && $row['unlock_time'] - myself()->_getNowTime() > 0) {
|
if ($row['lock_type'] != 0 && $row['unlock_time'] - myself()->_getNowTime() > 0) {
|
||||||
$lockType = $row['lock_type'];
|
$lockType = $row['lock_type'];
|
||||||
$lockTime = $row['unlock_time'] - myself()->_getNowTime();
|
$unlockTime = $row['unlock_time'];
|
||||||
}
|
}
|
||||||
$tradeLocktime = max(0, $row['unlock_trade_time'] - myself()->_getNowTime());
|
|
||||||
$dto = array(
|
$dto = array(
|
||||||
'gun_uniid' => $row['idx'],
|
'gun_uniid' => $row['idx'],
|
||||||
'gun_id' => $row['gun_id'],
|
'gun_id' => $row['gun_id'],
|
||||||
@ -70,8 +69,8 @@ class Gun extends BaseModel {
|
|||||||
'attr' => $attr,
|
'attr' => $attr,
|
||||||
'try_count' => $row['try_count'],
|
'try_count' => $row['try_count'],
|
||||||
'lock_type' => $lockType,
|
'lock_type' => $lockType,
|
||||||
'lock_time' => $lockTime,
|
'unlock_time' => $unlockTime,
|
||||||
'trade_locktime' => $tradeLocktime,
|
'unlock_trade_time' => $row['unlock_trade_time'],
|
||||||
);
|
);
|
||||||
return $dto;
|
return $dto;
|
||||||
}
|
}
|
||||||
|
@ -56,12 +56,11 @@ class Hero extends BaseModel {
|
|||||||
{
|
{
|
||||||
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
||||||
$lockType = 0;
|
$lockType = 0;
|
||||||
$lockTime = 0;
|
$unlockTime = 0;
|
||||||
if ($row['lock_type'] != 0 && $row['unlock_time'] - myself()->_getNowTime() > 0) {
|
if ($row['lock_type'] != 0 && $row['unlock_time'] - myself()->_getNowTime() > 0) {
|
||||||
$lockType = $row['lock_type'];
|
$lockType = $row['lock_type'];
|
||||||
$lockTime = $row['unlock_time'] - myself()->_getNowTime();
|
$unlockTime = $row['unlock_time'];
|
||||||
}
|
}
|
||||||
$tradeLocktime = max(0, $row['unlock_trade_time'] - myself()->_getNowTime());
|
|
||||||
$dto = array(
|
$dto = array(
|
||||||
'hero_uniid' => $row['idx'],
|
'hero_uniid' => $row['idx'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
@ -75,8 +74,8 @@ class Hero extends BaseModel {
|
|||||||
'attr' => $attr,
|
'attr' => $attr,
|
||||||
'try_count' => $row['try_count'],
|
'try_count' => $row['try_count'],
|
||||||
'lock_type' => $lockType,
|
'lock_type' => $lockType,
|
||||||
'lock_time' => $lockTime,
|
'unlock_time' => $unlockTime,
|
||||||
'trade_locktime' => $tradeLocktime,
|
'unlock_trade_time' => $row['unlock_trade_time'],
|
||||||
);
|
);
|
||||||
return $dto;
|
return $dto;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user