feat:优化代码

This commit is contained in:
2026-06-04 11:03:35 +08:00
parent bb3ad71d21
commit 060de9494f
4 changed files with 262 additions and 60 deletions
@@ -1,4 +1,4 @@
import inspect
import sys
from core.abstract.character import CharacterProperty
from core.basic.equipment import EquEffect
@@ -6,8 +6,7 @@ from .register import register
def check_suit(char: CharacterProperty) -> bool:
caller_frame = inspect.stack()[1]
fun_name = caller_frame.function
fun_name = sys._getframe(1).f_code.co_name
suitId = int(int(fun_name.split('_')[-1]) / 10000) + 16000
result = next((x for x in char.suitInfo if str(x.suitId) == str(suitId)), None) is not None
return result