Fix callback found after finding spell
This commit is contained in:
parent
154bdbbd9f
commit
117a2fc63e
|
|
@ -32,8 +32,8 @@ class BattlegroundAgent:
|
||||||
self.tagInBg()
|
self.tagInBg()
|
||||||
else:
|
else:
|
||||||
self.logger.log("Deserter debuff found, waiting for debuff to disapear before tagging to bg...")
|
self.logger.log("Deserter debuff found, waiting for debuff to disapear before tagging to bg...")
|
||||||
# self.inBgRoutine()
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
self.logger.log("Battleground bg farming ended.")
|
||||||
|
|
||||||
def isDeserter(self):
|
def isDeserter(self):
|
||||||
res = self.monitor.findMatch(self.deserterIcon)
|
res = self.monitor.findMatch(self.deserterIcon)
|
||||||
|
|
@ -64,10 +64,10 @@ class BattlegroundAgent:
|
||||||
self.inBgRoutine()
|
self.inBgRoutine()
|
||||||
|
|
||||||
|
|
||||||
def foundEndOfBg(self ):
|
def foundEndOfBg(self, _res):
|
||||||
self.logger.log("End of bg detected, leaving...")
|
self.logger.log("End of bg detected, leaving...")
|
||||||
self.status = BG_STATUS.IDLE
|
self.status = BG_STATUS.IDLE
|
||||||
time.sleep(10)
|
time.sleep(25)
|
||||||
|
|
||||||
def checkEndOfBg(self):
|
def checkEndOfBg(self):
|
||||||
self.monitor.findMatchAndClickIfAvailable(self.leaveBgButton, self.foundEndOfBg)
|
self.monitor.findMatchAndClickIfAvailable(self.leaveBgButton, self.foundEndOfBg)
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,14 @@ class Monitor:
|
||||||
|
|
||||||
if (res == -1):
|
if (res == -1):
|
||||||
addHumanReaction()
|
addHumanReaction()
|
||||||
if isfunction(onNotFound) is True:
|
if onNotFound is not None:
|
||||||
return onNotFound(res)
|
return onNotFound(res)
|
||||||
else:
|
else:
|
||||||
addHumanReaction()
|
addHumanReaction()
|
||||||
pyautogui.click()
|
pyautogui.click()
|
||||||
addHumanReaction()
|
addHumanReaction()
|
||||||
if (isfunction(onFound) is True):
|
print(isfunction(onFound))
|
||||||
|
if (onFound is not None):
|
||||||
return onFound(res)
|
return onFound(res)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,12 @@ class Player:
|
||||||
self.reconnectButton = cv.imread("assets/" + self.lang + "/menus/Reconnect.jpg", cv.IMREAD_GRAYSCALE)
|
self.reconnectButton = cv.imread("assets/" + self.lang + "/menus/Reconnect.jpg", cv.IMREAD_GRAYSCALE)
|
||||||
self.logger.log("Connected with " + self.playerName + " (" + self.playerClass + " - " + self.playerSpe + ")")
|
self.logger.log("Connected with " + self.playerName + " (" + self.playerClass + " - " + self.playerSpe + ")")
|
||||||
|
|
||||||
def connectButtonFound(self):
|
def connectButtonFound(self, _res):
|
||||||
self.isConnected = CONNECT_STATUS.DISCONNECTED
|
self.isConnected = CONNECT_STATUS.DISCONNECTED
|
||||||
self.logger.log("Player not connected attempting to connect...")
|
self.logger.log("Player not connected attempting to connect...")
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
|
||||||
def connectButtonNotFound(self):
|
def connectButtonNotFound(self, _res):
|
||||||
self.isConnected = CONNECT_STATUS.CONNECTED
|
self.isConnected = CONNECT_STATUS.CONNECTED
|
||||||
|
|
||||||
def checkConnection(self):
|
def checkConnection(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user