From 1d42bf8c6b7564b2aaa50c864e88354fd9b91b47 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 5 Jan 2022 18:53:09 +0800 Subject: [PATCH] 1 --- webapp/controller/HeroController.class.php | 1 + webapp/mt/HeroLevel.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index bd973b1f..b4a414ef 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -156,6 +156,7 @@ class HeroController extends BaseAuthedController { $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem)); return; } + $oldAttr = json_decode($heroDb['rand_attr'], true); $randAttr = array(); $this->_decItems($costItems); Hero::update($heroUniId, diff --git a/webapp/mt/HeroLevel.php b/webapp/mt/HeroLevel.php index 0c7205ff..e136a4f1 100644 --- a/webapp/mt/HeroLevel.php +++ b/webapp/mt/HeroLevel.php @@ -17,7 +17,7 @@ class HeroLevel { return getXVal(self::$qualityLevelHash, $quality . '_' . $level, null); } - public static function getRandAttr($initMeta, $currMeta) + public static function getRandAttr($initMeta, $currMeta, $oldAttr, &$newAttr) { }