From dfcd7c2124f4373df52f66fba2e7350812dbb21e Mon Sep 17 00:00:00 2001 From: Loudrob Date: Tue, 14 Jul 2015 14:35:15 -0400 Subject: [PATCH] Gift duplication fixed. --- toontown/toon/DistributedToonAI.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index 86627bf7..4f34b883 100755 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -2100,6 +2100,9 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def d_setDeliverySchedule(self, onOrder): self.sendUpdate('setDeliverySchedule', [onOrder.getBlob(store=CatalogItem.Customization | CatalogItem.DeliveryDate)]) + def d_setGiftSchedule(self, onGiftOrder): + self.sendUpdate('setGiftSchedule', [self.onGiftOrder.getBlob(store=CatalogItem.Customization | CatalogItem.DeliveryDate)]) + def setDeliverySchedule(self, onOrder, doUpdateLater = True): self.setBothSchedules(onOrder, None) @@ -2109,6 +2112,7 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def b_setBothSchedules(self, onOrder, onGiftOrder, doUpdateLater = True): self.setBothSchedules(onOrder, onGiftOrder, doUpdateLater) self.d_setDeliverySchedule(onOrder) + self.d_setGiftSchedule(onGiftOrder) def setBothSchedules(self, onOrder, onGiftOrder, doUpdateLater = True): if onOrder != None: @@ -2180,7 +2184,6 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo delivered, remaining = self.onGiftOrder.extractDeliveryItems(now) self.notify.info('Gift Delivery for %s: %s.' % (self.doId, delivered)) self.b_setMailboxContents(self.mailboxContents + delivered) - self.b_setDeliverySchedule(None, remaining) self.b_setCatalogNotify(self.catalogNotify, ToontownGlobals.NewItems) return Task.done