diff --git a/OlivaDiceJoy/app.json b/OlivaDiceJoy/app.json index d85fc0c..c69b3c8 100644 --- a/OlivaDiceJoy/app.json +++ b/OlivaDiceJoy/app.json @@ -4,8 +4,8 @@ "namespace" : "OlivaDiceJoy", "message_mode" : "old_string", "info" : "本模块为OlivaDice的娱乐模块,提供了一些无关紧要的娱乐功能,它们或许是与跑团关系不大、或许只是一些历史原因遗留下来的传统,总之,这些在野蛮生长时期被或是由于开发者无知、或是作为恶性竞争手段、或是用户呼声较大但对于跑团而言意义不明的,被添加进来的小功能,都会被放入这个模块。", - "version" : "3.0.9", - "svn" : 17, + "version" : "3.0.10", + "svn" : 18, "compatible_svn" : 101, "priority" : 20010, "support" : [ diff --git a/OlivaDiceJoy/data.py b/OlivaDiceJoy/data.py index 97eab36..33bcc6d 100644 --- a/OlivaDiceJoy/data.py +++ b/OlivaDiceJoy/data.py @@ -15,8 +15,8 @@ ''' -OlivaDiceJoy_ver = '3.0.9' -OlivaDiceJoy_svn = 17 +OlivaDiceJoy_ver = '3.0.10' +OlivaDiceJoy_svn = 18 OlivaDiceJoy_ver_short = '%s(%s)' % (str(OlivaDiceJoy_ver), str(OlivaDiceJoy_svn)) listPlugin = [] diff --git a/OlivaDiceJoy/msgReply.py b/OlivaDiceJoy/msgReply.py index 92dd94d..bf43316 100644 --- a/OlivaDiceJoy/msgReply.py +++ b/OlivaDiceJoy/msgReply.py @@ -22,6 +22,7 @@ import time import traceback from functools import wraps +import copy def unity_init(plugin_event, Proc): pass @@ -93,6 +94,7 @@ def poke_jrrp(plugin_event, type): def poke_rd(plugin_event, event_type): tmp_group_id = plugin_event.data.group_id + tmp_user_platform = plugin_event.platform['platform'] tmp_hagID = None if event_type == 'group': if tmp_group_id == -1: @@ -126,6 +128,29 @@ def poke_rd(plugin_event, event_type): tmp_template_customDefault = tmp_template['customDefault'] if 'mainDice' in tmp_template: rd_para_str = tmp_template['mainDice'] + rd_para_main_str = OlivaDiceCore.userConfig.getUserConfigByKey( + userId = tmp_hagID, + userType = 'group', + platform = tmp_user_platform, + userConfigKey = 'groupMainDice', + botHash = plugin_event.bot_info.hash + ) + rd_para_main_D_right = OlivaDiceCore.userConfig.getUserConfigByKey( + userId = tmp_hagID, + userType = 'group', + platform = tmp_user_platform, + userConfigKey = 'groupMainDiceDRight', + botHash = plugin_event.bot_info.hash + ) + if rd_para_main_str != None: + rd_para_str = rd_para_main_str + tmp_template_customDefault = copy.deepcopy(tmp_template_customDefault) + if type(rd_para_main_D_right) == int: + if type(tmp_template_customDefault) != dict: + tmp_template_customDefault = {} + if 'd' not in tmp_template_customDefault: + tmp_template_customDefault['d'] = {} + tmp_template_customDefault['d']['rightD'] = rd_para_main_D_right rd = OlivaDiceCore.onedice.RD(rd_para_str, tmp_template_customDefault, valueTable = skill_valueTable) rd.roll() if tmp_pcName == None: