From da1f855dcbb0d5ed8feb2c15e04c5e9fc4b8f237 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 6 Jan 2022 19:42:18 +0800 Subject: [PATCH] 1 --- webapp/controller/GunController.class.php | 8 ++++++-- webapp/controller/HeroController.class.php | 8 ++++++-- webapp/models/Gun.php | 2 +- webapp/models/Hero.php | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/webapp/controller/GunController.class.php b/webapp/controller/GunController.class.php index c90c303b..fa4eb491 100644 --- a/webapp/controller/GunController.class.php +++ b/webapp/controller/GunController.class.php @@ -178,7 +178,9 @@ class GunController extends BaseAuthedController { Gun::update($gunUniId, array( 'gun_lv' => $gunDb['gun_lv'] + 1, - 'rand_attr' => json_encode($attrs) + 'rand_attr' => json_encode($attrs), + 'lock_type' => Gun::LEVEL_LOCK, + 'unlock_time' => $this->_getNowTime() + $currLevelMeta['time'] ) ); $propertyChgService = new services\PropertyChgService(); @@ -275,7 +277,9 @@ class GunController extends BaseAuthedController { array( 'gun_lv' => $gunDb['gun_lv'], 'quality' => $gunDb['quality'] + 1, - 'rand_attr' => json_encode($attrs) + 'rand_attr' => json_encode($attrs), + 'lock_type' => Gun::QUALITY_LOCK, + 'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'] ) ); $propertyChgService = new services\PropertyChgService(); diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index 10a9496c..21d42322 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -165,7 +165,9 @@ class HeroController extends BaseAuthedController { Hero::update($heroUniId, array( 'hero_lv' => $heroDb['hero_lv'] + 1, - 'rand_attr' => json_encode($attrs) + 'rand_attr' => json_encode($attrs), + 'lock_type' => Hero::LEVEL_LOCK, + 'unlock_time' => $this->_getNowTime() + $currLevelMeta['time'] ) ); $propertyChgService = new services\PropertyChgService(); @@ -262,7 +264,9 @@ class HeroController extends BaseAuthedController { array( 'hero_lv' => $heroDb['hero_lv'], 'quality' => $heroDb['quality'] + 1, - 'rand_attr' => json_encode($attrs) + 'rand_attr' => json_encode($attrs), + 'lock_type' => Gun::QUALITY_LOCK, + 'unlock_time' => $this->_getNowTime() + $currQualityMeta['time'] ) ); $propertyChgService = new services\PropertyChgService(); diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index f8851158..2ce3cc53 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -14,7 +14,7 @@ class Gun extends BaseModel { const GETED_STATE = 0; const TRY_STATE = 1; - const NO_LOCK = 1; + const NO_LOCK = 0; const LEVEL_LOCK = 1; const QUALITY_LOCK = 2; diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index fc1c78af..a1466fee 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -15,7 +15,7 @@ class Hero extends BaseModel { const GETED_STATE = 0; const TRY_STATE = 1; - const NO_LOCK = 1; + const NO_LOCK = 0; const LEVEL_LOCK = 1; const QUALITY_LOCK = 2;