File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -650,17 +650,20 @@ async def unit_merge(context: idol.SchoolIdolUserParams, request: UnitMergeReque
650650 await exchange .add_exchange_point (context , current_user , exchange_point_id , amount )
651651 get_exchange_point_list .append (exchange .ExchangePointInfo (rarity = exchange_point_id , exchange_point = amount ))
652652
653- # Update album and trigger achievement
653+ # Update album
654654 after_unit , _ = await unit .get_unit_data_full_info (context , source_unit )
655655 await album .update (context , current_user , source_unit .unit_id , rank_level_max = after_unit .is_level_max )
656- achievement_list = await achievement . check (
657- context ,
658- current_user ,
656+
657+ # Trigger achievement
658+ ach_list_to_test = [
659659 achievement .AchievementUpdateUnitRankUp (unit_ids = []),
660660 achievement .AchievementUpdateUnitMerge (
661661 unit_owning_user_id = source_unit .id , skill_level = after_unit .skill_level , amount = member_count
662662 ),
663- )
663+ ]
664+ if after_unit .is_level_max :
665+ ach_list_to_test .append (achievement .AchievementUpdateUnitMaxLevel ())
666+ achievement_list = await achievement .check (context , current_user , * ach_list_to_test )
664667 accomplished_rewards = [
665668 await achievement .get_achievement_rewards (context , ach ) for ach in achievement_list .accomplished
666669 ]
You can’t perform that action at this time.
0 commit comments