From 244fc5f0572af78698cbb6353c3c6c1638a3c4bf Mon Sep 17 00:00:00 2001 From: John Date: Tue, 30 Jun 2015 20:55:38 +0300 Subject: [PATCH] Unique ID allocator holocausted --- toontown/parties/GlobalPartyManagerUD.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toontown/parties/GlobalPartyManagerUD.py b/toontown/parties/GlobalPartyManagerUD.py index 1afc0129..6aa3864e 100755 --- a/toontown/parties/GlobalPartyManagerUD.py +++ b/toontown/parties/GlobalPartyManagerUD.py @@ -22,7 +22,7 @@ class GlobalPartyManagerUD(DistributedObjectGlobalUD): PARTY_TIME_FORMAT = '%Y-%m-%d %H:%M:%S' startTime = datetime.strptime('2014-01-20 11:50:00', PARTY_TIME_FORMAT) endTime = datetime.strptime('2014-01-20 12:20:00', PARTY_TIME_FORMAT) - self.partyAllocator = UniqueIdAllocator(0, 100000000) + self.nextId = 0 #self.host2Party[100000001] = {'hostId': 100000001, 'start': startTime, 'end': endTime, 'partyId': 1717986918400000, 'decorations': [[3,5,7,6]], 'activities': [[10,13,6,18],[7,8,7,0]],'inviteTheme':1,'isPrivate':0,'inviteeIds':[]} config = getConfigShowbase() self.wantInstantParties = config.GetBool('want-instant-parties', 0) @@ -247,5 +247,6 @@ class GlobalPartyManagerUD(DistributedObjectGlobalUD): def allocIds(self, numIds): ids = [] while len(ids) < numIds: - ids.append(self.partyAllocator.allocate()) + ids.append(self.nextId) + self.nextId += 1 self.sendToAI('receiveId', ids) \ No newline at end of file