- def ManagerItemshop(self, cmd):
- cmd = cmd.split('#')
- if cmd[0] == 'QID':
- constInfo.ItemShop['QID'] = int(cmd[1])
- elif cmd[0] == 'INPUT':
- constInfo.INPUT_IGNORE = int(cmd[1])
- elif cmd[0] == 'SEND':
- net.SendQuestInputStringPacket(str(constInfo.ItemShop['QCMD']))
- constInfo.ItemShop['QCMD'] = ''
- elif cmd[0] == 'CREATE_CATEGORY':
- constInfo.ItemShop['ITEMS'][cmd[1]][int(cmd[2])] = []
- elif cmd[0] == 'SET_ITEM':
- constInfo.ItemShop['ITEMS'][cmd[1]][int(cmd[2])].append([int(cmd[3]), int(cmd[4]), int(cmd[5]), [(int(cmd[6]), int(cmd[7])), (int(cmd[8]), int(cmd[9])), (int(cmd[10]), int(cmd[11])), (int(cmd[12]), int(cmd[13])), (int(cmd[14]), int(cmd[15])), (int(cmd[16]), int(cmd[17])), (int(cmd[18]), int(cmd[19]))], [int(cmd[20]), int(cmd[21]), int(cmd[22])], int(cmd[23]), int(cmd[24]), int(cmd[25])])
- elif cmd[0] == 'CLEAR_CONTENT':
- constInfo.ItemShop['ITEMS']['mostBought'] = []
- constInfo.ItemShop['ITEMS']['hotOffers'] = []
- elif cmd[0] == 'SET_ITEM_MOSTBOUGHT':
- constInfo.ItemShop['ITEMS']['mostBought'].append([int(cmd[1]), int(cmd[2]), int(cmd[3]), [(int(cmd[4]), int(cmd[5])), (int(cmd[6]), int(cmd[7])), (int(cmd[8]), int(cmd[9])), (int(cmd[10]), int(cmd[11])), (int(cmd[12]), int(cmd[13])), (int(cmd[14]), int(cmd[15])), (int(cmd[16]), int(cmd[17]))], [int(cmd[17]), int(cmd[19]), int(cmd[20])], int(cmd[21]), int(cmd[22]), int(cmd[23])])
- elif cmd[0] == 'SET_ITEM_HOTOFFERS':
- constInfo.ItemShop['ITEMS']['hotOffers'].append([int(cmd[1]), int(cmd[2]), int(cmd[3]), [(int(cmd[4]), int(cmd[5])), (int(cmd[6]), int(cmd[7])), (int(cmd[8]), int(cmd[9])), (int(cmd[10]), int(cmd[11])), (int(cmd[12]), int(cmd[13])), (int(cmd[14]), int(cmd[15])), (int(cmd[16]), int(cmd[17]))], [int(cmd[17]), int(cmd[19]), int(cmd[20])], int(cmd[21]), int(cmd[22]), int(cmd[23])])
- elif cmd[0] == 'SET_LOG':
- constInfo.ItemShop['LOGS'].append([int(cmd[1]), int(cmd[2]), int(cmd[3]), cmd[4], [(int(cmd[5]), int(cmd[6])), (int(cmd[7]), int(cmd[8])), (int(cmd[9]), int(cmd[10])), (int(cmd[11]), int(cmd[12])), (int(cmd[13]), int(cmd[14])), (int(cmd[15]), int(cmd[16])), (int(cmd[17]), int(cmd[18]))], [int(cmd[19]), int(cmd[20]), int(cmd[21])]])
- elif cmd[0] == 'SEND_COINS':
- constInfo.COINS_DRS = [int(cmd[1]), int(cmd[2])]
- elif cmd[0] == 'SEND_3RD_SHOP_COIN':
- self.interface.wndItemShop.Set3rdCoins(int(cmd[1]))
- elif cmd[0] == 'ALLOW_SPIN_WHEEL':
- self.interface.wndItemShop.SpinWheel()
- elif cmd[0] == 'CLEAR_WHEEL_CONTENT':
- constInfo.ItemShop['WOD'] = [[], []]
- elif cmd[0] == 'SET_WHEEL_PRIZE':
- prize = cmd[2].split(',')
- if cmd[1] == 'G':
- for i in xrange(len(prize)-1):
- constInfo.ItemShop['WOD'][1].append(int(prize[i]))
- elif cmd[1] == 'B':
- for i in xrange(len(prize)-1):
- constInfo.ItemShop['WOD'][0].append(int(prize[i]))
- elif cmd[0] == 'OPEN':
- self.interface.wndItemShop.Open(int(cmd[1]))
- elif cmd[0] == 'REFRESH_CONTENT':
- self.interface.wndItemShop.RefreshWindow()
game.py