Gift duplication fixed.

This commit is contained in:
Loudrob 2015-07-14 14:35:15 -04:00
parent 1d48a7fa28
commit dfcd7c2124

View file

@ -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