def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount): # 개인상점 열고 있는 동안 아이템 사용 방지 if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, locale.MOVE_ITEM_FAILURE_PRIVATE_SHOP) return net.SendItemMovePacket(srcSlotPos, dstSlotPos, srcItemCount)
def OnUpdate(self): val, self.lastTime = OpenLib.timeSleep(self.lastTime, self.TIME_WAIT) if val: if len(self.toDropSlots) > 0: slot = self.toDropSlots.pop(0) net.SendItemDropPacketNew(slot, player.GetItemCount(slot)) return if len(self.toSellSlots) > 0: slot = self.toSellSlots.pop(0) net.SendShopSellPacketNew(slot, player.GetItemCount(slot), 1) return if len(self.toStackMoveActions) > 0: args = self.toStackMoveActions.pop(0) OpenLog.DebugPrint("[STACK] - Changing item position from " + str(args[0]) + " to " + str(args[1]) + " count " + str(args[2])) net.SendItemMovePacket(args[0], args[1], args[2]) return if len(self.toSortMoveActions) > 0: args = self.toSortMoveActions.pop(0) OpenLog.DebugPrint("[SORT] - Changing item position from " + str(args[0]) + " to " + str(args[1]) + " count " + str(args[2])) net.SendItemMovePacket(args[0], args[1], args[2]) return if len(self.toBuySlots) > 0: slot = self.toBuySlots.pop(0) net.SendShopBuyPacket(slot) return if self.callback != None: self.callback() self.callback = None