mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Fix
This commit is contained in:
parent
9b755ed2a7
commit
35abc0b1c3
2 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
@ -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,6 +127,7 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI):
|
|||
if av:
|
||||
simbase.air.petMgr.deleteToonsPet(avId)
|
||||
self.transactionType = 'return'
|
||||
|
||||
self.transactionDone()
|
||||
|
||||
def transactionDone(self):
|
||||
|
|
Loading…
Reference in a new issue