예제 #1
0
        def CantTradableItem(self, destSlotIndex, srcSlotIndex):
            if True == exchange.GetAcceptFromTarget():
                return

            itemInvenPage = srcSlotIndex / player.INVENTORY_PAGE_SIZE
            localSlotPos = srcSlotIndex - (itemInvenPage *
                                           player.INVENTORY_PAGE_SIZE)
            self.lockedItems[destSlotIndex] = (itemInvenPage, localSlotPos)

            if self.wndInventory.GetInventoryPageIndex(
            ) == itemInvenPage and self.IsShow():
                self.wndInventory.wndItem.SetCantMouseEventSlot(localSlotPos)
예제 #2
0
	def Refresh(self):

		self.RefreshOwnerSlot()
		self.RefreshTargetSlot()

		if TRUE == exchange.GetAcceptFromSelf():
			self.Owner_Accept_Light.Down()
		else:
			self.AcceptButton.Enable()
			self.AcceptButton.SetUp()
			self.Owner_Accept_Light.SetUp()

		if TRUE == exchange.GetAcceptFromTarget():
			self.Target_Accept_Light.Down()
		else:
			self.Target_Accept_Light.SetUp()
예제 #3
0
    def Refresh(self):

        self.RefreshOwnerSlot()
        self.RefreshTargetSlot()

        self.OwnerMoney.SetText(str(exchange.GetElkFromSelf()))
        self.TargetMoney.SetText(str(exchange.GetElkFromTarget()))

        if TRUE == exchange.GetAcceptFromSelf():
            self.OwnerAcceptLight.Down()
        else:
            self.AcceptButton.Enable()
            self.AcceptButton.SetUp()
            self.OwnerAcceptLight.SetUp()

        if TRUE == exchange.GetAcceptFromTarget():
            self.TargetAcceptLight.Down()
        else:
            self.TargetAcceptLight.SetUp()
예제 #4
0
    def Refresh(self):

        self.RefreshOwnerSlot()
        self.RefreshTargetSlot()
        if app.WJ_ENABLE_TRADABLE_ICON:
            self.RefreshLockedSlot()

        self.OwnerMoney.SetText(str(exchange.GetElkFromSelf()))
        self.TargetMoney.SetText(str(exchange.GetElkFromTarget()))

        if True == exchange.GetAcceptFromSelf():
            self.OwnerAcceptLight.Down()
        else:
            self.AcceptButton.Enable()
            self.AcceptButton.SetUp()
            self.OwnerAcceptLight.SetUp()

        if True == exchange.GetAcceptFromTarget():
            self.TargetAcceptLight.Down()
        else:
            self.TargetAcceptLight.SetUp()
예제 #5
0
    def Refresh(self):
        self.RefreshOwnerSlot()
        self.RefreshTargetSlot()

        self.OwnerMoney.SetText(
            localeInfo.NumberToMoneyString(exchange.GetElkFromSelf()))
        self.TargetMoney.SetText(
            localeInfo.NumberToMoneyString(exchange.GetElkFromTarget()))
        if exchange.GetAcceptFromSelf() == True:
            if not app.ENABLE_NEW_EXCHANGE_WINDOW:
                self.OwnerAcceptLight.Down()
            else:
                self.OwnerSlot.SetSlotBaseImage(
                    "d:/ymir work/ui/public/slot_base.sub", 0.3500, 0.8500,
                    0.3500, 1.0)
                self.LogsDropList.AppendItem(
                    self.Item(
                        self, localeInfo.NEW_EXCHANGE_YOU_ACCEPT % (str(
                            (time.strftime("[%H:%M:%S]")))), 0))
        else:
            if self.AcceptButton.IsDown() == True:
                self.LogsDropList.AppendItem(
                    self.Item(
                        self, localeInfo.NEW_EXCHANGE_YOU_ABORT % (str(
                            (time.strftime("[%H:%M:%S]")))), 0))

            self.AcceptButton.Enable()
            self.AcceptButton.SetUp()
            if not app.ENABLE_NEW_EXCHANGE_WINDOW:
                self.OwnerAcceptLight.SetUp()
            else:
                self.OwnerSlot.SetSlotBaseImage(
                    "d:/ymir work/ui/public/slot_base.sub", 1.0, 1.0, 1.0, 1.0)

        if exchange.GetAcceptFromTarget() == True:
            if not app.ENABLE_NEW_EXCHANGE_WINDOW:
                self.TargetAcceptLight.Down()
            else:
                self.TargetAcceptButton.Down()
                self.TargetSlot.SetSlotBaseImage(
                    "d:/ymir work/ui/public/slot_base.sub", 0.3500, 0.8500,
                    0.3500, 1.0)
                self.LogsDropList.AppendItem(
                    self.Item(
                        self, localeInfo.NEW_EXCHANGE_ACCEPT %
                        (str((time.strftime("[%H:%M:%S]"))),
                         exchange.GetNameFromTarget()), 0))
        else:
            if not app.ENABLE_NEW_EXCHANGE_WINDOW:
                self.TargetAcceptLight.SetUp()
            else:
                if self.TargetAcceptButton.IsDown() == True:
                    self.LogsDropList.AppendItem(
                        self.Item(
                            self, localeInfo.NEW_EXCHANGE_ABORT %
                            (str((time.strftime("[%H:%M:%S]"))),
                             exchange.GetNameFromTarget()), 0))

                self.TargetAcceptButton.SetUp()
                self.TargetSlot.SetSlotBaseImage(
                    "d:/ymir work/ui/public/slot_base.sub", 1.0, 1.0, 1.0, 1.0)