From 5b8a0428cb6bd06577a4c8672b50898a992038b0 Mon Sep 17 00:00:00 2001 From: DenialMC Date: Wed, 13 May 2015 20:40:06 +0300 Subject: [PATCH] Perhaps this is a better solution --- toontown/pets/PetManagerAI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py index 410470f5..b674bc6c 100644 --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -23,7 +23,7 @@ class PetManagerAI: self.seeds = {} for hood in (ToontownGlobals.ToontownCentral, ToontownGlobals.DonaldsDock, ToontownGlobals.DaisyGardens, ToontownGlobals.MinniesMelodyland, ToontownGlobals.TheBrrrgh, ToontownGlobals.DonaldsDreamland): - self.seeds[hood] = [seeds.pop() for _ in xrange(self.NUM_DAILY_PETS)] + self.seeds[str(hood)] = [seeds.pop() for _ in xrange(self.NUM_DAILY_PETS)] self.seeds['day'] = getDayId() simbase.backups.save('pet-seeds', (self.air.districtId,), self.seeds) @@ -32,7 +32,7 @@ class PetManagerAI: if self.seeds.get('day', -1) != getDayId(): self.generateSeeds() - return self.seeds[safezoneId] if safezoneId in self.seeds else self.seeds[str(safezoneId)] + return self.seeds.get(str(safezoneId), [random.randint(0, 255)]) def createNewPetFromSeed(self, avId, seed, nameIndex, gender, safeZoneId): av = self.air.doId2do[avId]