diff --git a/toontown/catalog/CatalogItem.py b/toontown/catalog/CatalogItem.py index 8d9149c2..9004a9f4 100755 --- a/toontown/catalog/CatalogItem.py +++ b/toontown/catalog/CatalogItem.py @@ -196,6 +196,8 @@ class CatalogItem: return TTLocalizer.CatalogPurchaseGiftLimitReached elif retcode == ToontownGlobals.P_NotEnoughMoney: return TTLocalizer.CatalogPurchaseGiftNotEnoughMoney + elif retcode == ToontownGlobals.P_TooFast: + return TTLocalizer.CatalogPurchaseGiftTooFast else: return TTLocalizer.CatalogPurchaseGiftGeneralError % {'friend': '%s', 'error': retcode} diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index ceb0e33b..0278f052 100755 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -814,6 +814,7 @@ class CatalogScreen(DirectFrame): taskMgr.remove('clarabelleGreeting') taskMgr.remove('clarabelleHelpText1') taskMgr.remove('clarabelleAskAnythingElse') + taskMgr.remove('friendButtonsReady') self.hide() self.hangup.hide() self.destroy() @@ -1026,15 +1027,18 @@ class CatalogScreen(DirectFrame): self.friend = None self.friendLabel['text'] = TTLocalizer.CatalogGiftUpdating + taskMgr.remove('friendButtonsReady') self['phone'].requestGiftAvatar(self.friendAvId) def setFriendReady(self, friend): - for friendButton in self.friends: - friendButton['state'] = DGG.NORMAL - self.friend = friend self.friendLabel['text'] = TTLocalizer.CatalogGiftTo % self.friendName + taskMgr.doMethodLater(1.5, self.setFriendButtonsReady, 'friendButtonsReady') self.update() + + def setFriendButtonsReady(self, task=None): + for friendButton in self.friends: + friendButton['state'] = DGG.NORMAL def __giftToggle(self): messenger.send('wakeup') diff --git a/toontown/estate/DistributedPhoneAI.py b/toontown/estate/DistributedPhoneAI.py index dd50c845..b836a9e0 100755 --- a/toontown/estate/DistributedPhoneAI.py +++ b/toontown/estate/DistributedPhoneAI.py @@ -248,7 +248,7 @@ class DistributedPhoneAI(DistributedFurnitureItemAI): def requestGiftAvatarOperation(self, avId, doId, optional, callback): if avId in self.fsms: - return + return ToontownGlobals.P_TooFast loadOperation = LoadGiftAvatar(self, avId, doId, optional, callback) loadOperation.start() diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 7baf7d84..7ae0f1ba 100755 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -5513,6 +5513,7 @@ CatalogPurchaseGiftNotAGift = 'This item could not be sent to %s because it woul CatalogPurchaseGiftWillNotFit = "This item could not be sent to %s because it doesn't fit them." CatalogPurchaseGiftLimitReached = "This item could not be sent to %s because they already have it." CatalogPurchaseGiftNotEnoughMoney = "This item could not be sent to %s because you can't afford it." +CatalogPurchaseGiftTooFast = "This item could not be sent to %s because you are sending gifts too fast." CatalogAcceptGeneralError = 'The item could not be removed from your mailbox because of some internal game error: error code %s.' CatalogAcceptRoomError = "You don't have any place to put this. You'll have to get rid of something." CatalogAcceptLimitError = "You already have as many of these as you can handle. You'll have to get rid of something." diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 68b42ecf..b5bf9b66 100755 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -46,6 +46,7 @@ CatalogNumWeeksPerSeries = 13 CatalogNumWeeks = 78 PetFloorCollPriority = 5 PetPanelProximityPriority = 6 +P_TooFast = -29 P_NoTrunk = -28 P_AlreadyOwnBiggerCloset = -27 P_ItemAlreadyRented = -26