From 35abc0b1c392f0cb51fb47fce59a2ff791fa326c Mon Sep 17 00:00:00 2001 From: Loudrob Date: Sun, 29 Mar 2015 12:19:47 -0400 Subject: [PATCH] Fix --- otp/distributed/DCClassImports.py | 2 +- toontown/toon/DistributedNPCPetclerkAI.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index f0e371ae..aaf09b3a 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 3216321797L +hashVal = 188749006 from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py index 9833f518..92c0e578 100644 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -27,7 +27,7 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): if self.isBusy(): self.freeAvatar(avId) return - self.petSeeds = self.petMgr.getAvailablePets(3, ZoneUtil.getCanonicalSafeZoneId(self.zoneId)) + self.petSeeds = self.air.petMgr.getAvailablePets(3, ZoneUtil.getCanonicalHoodId(self.zoneId)) numGenders = len(PetDNA.PetGenders) self.petSeeds *= numGenders self.petSeeds.sort() @@ -40,7 +40,7 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): self.d_setMovie(avId, flag) taskMgr.doMethodLater(PetConstants.PETCLERK_TIMER, self.sendTimeoutMovie, self.uniqueName('clearMovie')) DistributedNPCToonBaseAI.avatarEnter(self) - + def rejectAvatar(self, avId): self.notify.warning('rejectAvatar: should not be called by a fisherman!') @@ -105,11 +105,12 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): if av.petId != 0: simbase.air.petMgr.deleteToonsPet(avId) gender = petNum % len(PetDNA.PetGenders) - if nameIndex not in xrange(0, len(TTLocalizer.PetNameDictionary) - 1): + if nameIndex not in xrange(0, TTLocalizer.PetNameIndexMAX): self.air.writeServerEvent('avoid_crash', avId, "DistributedNPCPetclerkAI.petAdopted and didn't have valid nameIndex!") self.notify.warning("somebody called petAdopted and didn't have valid nameIndex to adopt! avId: %s" % avId) return simbase.air.petMgr.createNewPetFromSeed(avId, self.petSeeds[petNum], nameIndex=nameIndex, gender=gender, safeZoneId=zoneId) + self.notify.warning("Created new pet from seed") self.transactionType = 'adopt' bankPrice = min(av.getBankMoney(), cost) walletPrice = cost - bankPrice @@ -126,7 +127,8 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): if av: simbase.air.petMgr.deleteToonsPet(avId) self.transactionType = 'return' - self.transactionDone() + + self.transactionDone() def transactionDone(self): avId = self.air.getAvatarIdFromSender()