Example #1
0
    def socketMouseOver(self, event):
        element = event.current_element

        if cursor is False:
            current_id = int(element.GetAttribute("id").split("inv-item-socket")[1])

            if current_id >= 10:
                current_x = int(str(current_id)[1])
                current_y = int(str(current_id)[0])
            else:
                current_x = int(str(current_id)[0])
                current_y = 0

            if current_y + cursorItem["sizeY"] - 1 > 3 or current_x + cursorItem["sizeX"] - 1 > 9:
                return
            if freeablo.canPlaceItem(
                0,
                10,
                0,
                0,
                int(element.child_nodes[0].GetAttribute("InvY")),
                int(element.child_nodes[0].GetAttribute("InvX")),
                0,
            ):
                for y in range(current_y, current_y + cursorItem["sizeY"]):
                    for x in range(current_x, current_x + cursorItem["sizeX"]):
                        element = self.document.GetElementById("inv-item-socket" + str(y * 10 + x))
                        element.style.background_color = "#A3191950"
Example #2
0
    def onBeltMouseOut(self, event):
        current_id = int(event.current_element.GetAttribute("id").split("belt")[1])
        if not cursor:
            if freeablo.canPlaceItem(8, 10, 0, 0, 0, 0, current_id) is True:


                event.current_element.style.background_color = "#00000000"
Example #3
0
    def onBeltMouseOut(self, event):
        current_id = int(event.current_element.GetAttribute("id").split("belt")[1])
        if not cursor:
            if freeablo.canPlaceItem(8, 10, 0, 0, 0, 0, current_id) is True:


                event.current_element.style.background_color = "#00000000"
Example #4
0
 def onEquipMouseOut(self, event):
     if not cursor:
         equip = event.current_element.GetAttribute("id")
         to = 0
         if equip == "leftHand":
             to = 12
         elif equip == "rightHand":
             to = 11
         elif equip == "rightRing":
             to = 13
         elif equip == "leftRing":
             to = 14
         elif equip == "head":
             to = 4
         elif equip == "amulet":
             to = 6
         elif equip == "body":
             to = 3
         if freeablo.canPlaceItem(to, 10, 0, 0, 0, 0, 0) is True:
             event.current_element.style.background_color = "#00000000"
Example #5
0
 def onEquipMouseOut(self, event):
     if not cursor:
         equip = event.current_element.GetAttribute("id")
         to = 0
         if equip == "leftHand":
             to=12
         elif equip == "rightHand":
             to=11
         elif equip == "rightRing":
             to=13
         elif equip == "leftRing":
             to=14
         elif equip == "head":
             to=4
         elif equip == "amulet":
             to=6
         elif equip == "body":
             to=3
         if freeablo.canPlaceItem(to, 10, 0, 0, 0, 0, 0) is True:
             event.current_element.style.background_color = "#00000000"
Example #6
0
    def socketMouseOver(self, event):
        element = event.current_element

        if cursor is False:
            current_id  = int(element.GetAttribute("id").split("inv-item-socket")[1])

            if current_id >= 10:
                current_x = int(str(current_id)[1])
                current_y = int(str(current_id)[0])
            else:
                current_x = int(str(current_id)[0])
                current_y = 0

            if current_y + cursorItem["sizeY"] -1 > 3 or current_x + cursorItem["sizeX"] -1 > 9:
                return
            if freeablo.canPlaceItem(0, 10, 0, 0, int(element.child_nodes[0].GetAttribute("InvY")), int(element.child_nodes[0].GetAttribute("InvX")), 0):
                for y in range(current_y, current_y + cursorItem["sizeY"]):
                    for x in range(current_x, current_x + cursorItem["sizeX"]):
                        element = self.document.GetElementById("inv-item-socket" + str(y*10 + x))
                        element.style.background_color = "#A3191950"