feat:优化代码
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user