From 103962bd71bf1b2e1c4a9040f3471fb6498c97a8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 23 Apr 2024 11:21:28 +0800 Subject: [PATCH] 1 --- webapp/controller/UserController.class.php | 2 +- webapp/models/HeroPreset.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 8b3a3328..066defa5 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -594,7 +594,7 @@ class UserController extends BaseAuthedController { $heroInfo = Hero::toDto($heroDb); $heroInfo['avatar_info'] = Hero::avatarInfo($heroDb); { - $preset = HeroPreset::getHeroPreset($heroUniId); + HeroPreset::upsertPresetNew($heroUniId, $specSkill); $heroInfo['spec_skill'] = '' . $specSkill; } myself()->_rspData(array( diff --git a/webapp/models/HeroPreset.php b/webapp/models/HeroPreset.php index 97c1adf4..a148c9c2 100644 --- a/webapp/models/HeroPreset.php +++ b/webapp/models/HeroPreset.php @@ -93,4 +93,9 @@ class HeroPreset extends BaseModel { ) ); } -} \ No newline at end of file + + public static function upsertPresetNew($heroId,$skillId){ + self::upsertPreset($heroId, $skillId, 0, 0, 0); + } + +}