diff --git a/OlivaDiceJoy/msgCustom.py b/OlivaDiceJoy/msgCustom.py index 13de04b..cfd067c 100644 --- a/OlivaDiceJoy/msgCustom.py +++ b/OlivaDiceJoy/msgCustom.py @@ -21,7 +21,7 @@ dictConsoleSwitchTemplate = { 'default' : { 'joyPokeMode': 0, - 'joyEnableChance': 0 + 'joyEnableCCPK': 0 } } diff --git a/OlivaDiceJoy/msgReply.py b/OlivaDiceJoy/msgReply.py index f06a792..d631f6b 100644 --- a/OlivaDiceJoy/msgReply.py +++ b/OlivaDiceJoy/msgReply.py @@ -20,6 +20,7 @@ import hashlib import time +import traceback from functools import wraps def unity_init(plugin_event, Proc): @@ -330,7 +331,7 @@ def msg_func(data:str, valDict:dict): if 'vPluginEvent' in valDict['vValDict']: plugin_event = valDict['vValDict']['vPluginEvent'] flag_need = OlivaDiceCore.console.getConsoleSwitchByHash( - 'joyEnableChance', + 'joyEnableCCPK', bot_hash ) if flag_need == 1 and plugin_event != None: @@ -359,8 +360,15 @@ def chance_custom_msg(plugin_event:OlivOS.API.Event, data:str, valDict:dict): ChanceCustom.replyCore.getValDict(chance_valDict, plugin_event, OlivaDiceJoy.data.globalProc, event_name) chance_valDict['innerVal']['bot_hash'] = plugin_event.bot_info.hash chance_valDict['innerVal']['bot_hash_self'] = plugin_event.bot_info.hash - msg = ChanceCustom.replyReg.replyValueRegTotal( - data, - chance_valDict - ) + try: + msg = ChanceCustom.replyReg.replyValueRegTotal( + data, + chance_valDict + ) + except: + msg = data + OlivaDiceJoy.data.globalProc.log(3, traceback.format_exc(), [ + ('OlivaDice', 'default'), + ('joyCCPK', 'default') + ]) return msg