def __init__(self, distObj, replyToChannelId, avatarId, time, timeout=4.0): AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj = distObj self.avatarId = avatarId self.time = time self.askForObjectField("DistributedToonUD", "setGiftSchedule", avatarId)
def __init__(self, awardManagerDo, isDcRequest, dcId, toonIdsList, catalogItem, specialEventId, browserReplyTo, specialCommands, echoBack, timeout=4.0): """Construct ourself.""" replyToChannelId = awardManagerDo.air.getSenderReturnChannel AsyncRequest.__init__(self, awardManagerDo.air, replyToChannelId, timeout) self.awardManagerDo = awardManagerDo self._isDcRequest = isDcRequest self._dcId = dcId self.toonIds = toonIdsList self.item = catalogItem self.specialEventId = specialEventId self.retcode = None self.browserReplyTo = browserReplyTo self.catalogType = None self.specialCommands = specialCommands self.echoBack = echoBack for toonId in self.toonIds: self.neededObjects[toonId] = None for toonId in self.toonIds: self.askForObject(toonId)
def __init__(self, distObj, replyToChannelId,avatarId, newGift, timeout = 4.0): #print("AddGiftRequestFR INIT") AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj=distObj self.avatarId=avatarId self.newGift = newGift self.askForObjectField( "DistributedToonUD", "setGiftSchedule", avatarId)
def __init__(self,replyTo,idList): """ replyTo is where we stick the response idList is a list of IDs of the toons whose names we're fetching """ assert self.notify.debugCall() self.__deleted=False AsyncRequest.__init__(self,uber.air) self.air = uber.air self.replyTo = replyTo self.idList = idList for id in idList: self.askForObjectField("DistributedToonUD","setName",id,key=id)
def __init__(self,replyTo,toonID): """ replyTo is where we stick the response toonID is the doID of the toon whose picture we want """ assert self.notify.debugCall() self.__deleted=False AsyncRequest.__init__(self,uber.air) self.air = uber.air self.replyTo = replyTo self.toonID = toonID self.air.writeServerEvent("UberRPC-GetToonDNA",self.replyTo.getSourceAddress(),"%u" % self.toonID) self.askForObjectField("DistributedToonUD","setDNAString",self.toonID)
def __init__(self, resultQueue, clientIP, accountName): """ resultQueue is where we stick the response clientIP is the client's address for logging purposes accountName is the account whose avatar list we're fetching """ assert self.notify.debugCall() self.__deleted = False AsyncRequest.__init__(self, uber.air) self.air = uber.air self.resultQueue = resultQueue self.clientIP = clientIP self.accountName = accountName
def __init__(self, resultQueue, clientIP, toonID): """ resultQueue is where we stick the response clientIP is for logging purposes toonID is the ID of the toon whose name we're fetching """ assert self.notify.debugCall() self.__deleted = False AsyncRequest.__init__(self, uber.air) self.air = uber.air self.resultQueue = resultQueue self.clientIP = clientIP self.toonID = toonID
def __init__(self,replyTo,accountName): """ replyTo is where we stick the response accountName is the account whose avatar list we're fetching """ assert self.notify.debugCall() self.__deleted=False AsyncRequest.__init__(self,uber.air) self.air = uber.air self.replyTo = replyTo self.accountName = accountName self.askForObjectFieldsByString(4008,"AccountUD",self.accountName,("ACCOUNT_AV_SET",))
def __init__(self, distObj, replyToChannelId, receiverId, itemBlob, timeout = 4.0): #print("AddItem INIT") AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj=distObj #self.senderId=senderId self.receiverId=receiverId self.itemBlob=itemBlob self.item = None self.catalogType = None self.neededObjects[receiverId] = None #self.askForObject(senderId) self.askForObject(receiverId) self.cost = 0
def __init__(self, air, jobId, avatarId, writeToFile): assert self.notify.debugCall() self.__deleted = False AsyncRequest.__init__(self, air) self.avatarId = avatarId self.jobId = jobId self.writeToFile = writeToFile self.neededObjects[avatarId] = self.air.doId2do.get(avatarId) if self.neededObjects[avatarId] is not None: self.finish() else: self.askForObject(avatarId)
def __init__(self, distObj, avatarId=None, inventoryId=None, timeout=4.0): self.responseKey = 'tradeResponse' AsyncRequest.__init__(self, distObj.air, distObj.getDoId(), timeout) self.distObj = distObj self.avatarId = avatarId self.inventoryId = inventoryId self.failureCallback = [] self.successCallback = [] self.timeoutCallback = [] self.nextNewDoIdKey = 0 self.newDoId = {} self.readyToSend = False self.giving = [] self.taking = [] self.unequippables = []
def __init__(self, distObj, avatarId=None, inventoryId=None, timeout=4.0): self.responseKey = "tradeResponse" AsyncRequest.__init__(self, distObj.air, distObj.getDoId(), timeout) self.distObj = distObj self.avatarId = avatarId self.inventoryId = inventoryId self.failureCallback = [] self.successCallback = [] self.timeoutCallback = [] self.nextNewDoIdKey = 0 self.newDoId = {} self.readyToSend = False self.giving = [] self.taking = [] self.unequippables = []
def __init__(self, resultQueue, clientIP, toonID, beanAmount): """ resultQueue is where we stick the response clientIP is for logging purposes toonID is the toon receiving beans beanAmount is the number of beans to give """ assert self.notify.debugCall() self.__deleted = False AsyncRequest.__init__(self, uber.air) self.air = uber.air self.resultQueue = resultQueue self.clientIP = clientIP self.toonID = toonID self.beanAmount = beanAmount self.done = False
def __init__(self, distObj, air, replyToChannelId=None, timeoutTime=ASYNC_REQUEST_DEFAULT_TIMEOUT_IN_SECONDS, key=None): assert self.notify.debugCall() self.distObj = distObj self.key = key if key is not None: req = distObj.asyncRequests.get(key) if req: req.delete() distObj.asyncRequests[key] = self AsyncRequest.__init__(self, air, replyToChannelId, timeoutTime, ASYNC_REQUEST_INFINITE_RETRIES)
def __init__(self, distObj, replyToChannelId, senderId, receiverId, itemBlob, context, timeout = 4.0): #print("PurchaseGiftRequest INIT") AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj=distObj self.senderId=senderId self.receiverId=receiverId self.itemBlob=itemBlob self.context = context self.retcode = None self.item = None self.catalogType = None self.neededObjects[senderId] = None self.neededObjects[receiverId] = None self.askForObject(senderId) self.askForObject(receiverId) self.cost = 0
def __init__(self, distObj, replyToChannelId, avatarId, newGift, senderId, context, retcode, timeout=4.0): #print "AddGiftRequestFR INIT" AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj = distObj self.avatarId = avatarId self.newGift = newGift self.senderId = senderId self.context = context self.retcode = retcode self.askForObjectField("DistributedToonUD", "setGiftSchedule", avatarId)
def __init__(self, distObj, replyToChannelId, avatarId, timeout=4.0): AsyncRequest.__init__(self, distObj.air, replyToChannelId, timeout) self.distObj = distObj self.avatarId = avatarId self.askForObject(avatarId)