Skip to content

Commit

Permalink
修正一些(●´ω`●)φ 问题
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Jan 26, 2014
1 parent d0ddf03 commit bb216b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions maclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,8 +1496,8 @@ def fairy_floor(f = fairy):
# 回到妖精界面; 尾刀时是否回妖精界面由尾刀决定,父过程此处跳过
if not need_tail:
fairy_floor()
# 如果是醒妖则问好
if bt_type == WAKE_BATTLE and self.cfg_auto_greet:
# 如果是醒妖且不是公会妖则问好
if bt_type == WAKE_BATTLE and not fairy.race_type in GUILD_RACE_TYPE and self.cfg_auto_greet :
self.like()

@plugin.func_hook
Expand Down
8 changes: 4 additions & 4 deletions maclient_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ def update(self, carddict):
# print self.cid('124')

def _found_card_by_value(self, key, value):
res = []
for i in self.cards:
if i[key] == value:
res.append(i)
res = [c for c in self.cards if c[key] == value]
# for i in self.cards:
# if i[key] == value:
# res.append(i)
return res

def sid(self, sid):
Expand Down
11 changes: 9 additions & 2 deletions plugins/carddeck_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# start meta
__plugin_name__ = 'scratch carddeck from REAL client'
__author = 'fffonion'
__version__ = 0.2
__version__ = 0.3
hooks = {}
extra_cmd = {'scratch_carddeck':'scratch_carddeck', 'scc':'scratch_carddeck','check_debug':'check_debug','cd':'check_debug',
'read_decks':'read_decks','rd':'read_decks'}
Expand All @@ -34,6 +34,13 @@ def do(*args):
poster=plugin_vals['poster']
pcard=plugin_vals['player'].card
cf=plugin_vals['cf']
def write_config(sec, key, val):
if not cf.has_section(sec):
cf.add_section(sec)
cf.set(sec, key, val)
f = open(plugin_vals['configfile'], "w")
cf.write(f)
f.flush()
list_option=cf.options
for i in range(1,4,1):
print(du8('卡组%d:'%i))
Expand All @@ -53,7 +60,7 @@ def do(*args):
name = decks[int(inp) - 1]
else:
name = inp
write_config('carddeck', name, C)
write_config('carddeck', name, ','.join(C))
print(du8('保存到了%s' % name))
#poster.post('roundtable/edit', postdata = 'move=1&deck_id=1')
return do
Expand Down

0 comments on commit bb216b3

Please sign in to comment.