diff --git a/toontown/catalog/CatalogScreen.py b/toontown/catalog/CatalogScreen.py index 3a712892..a7ad4d4e 100755 --- a/toontown/catalog/CatalogScreen.py +++ b/toontown/catalog/CatalogScreen.py @@ -4,6 +4,7 @@ from pandac.PandaModules import * from direct.gui.DirectScrolledList import * from toontown.toonbase import ToontownGlobals from toontown.toontowngui import TTDialog +from toontown.friends import FriendHandle import CatalogItem import CatalogInvalidItem import CatalogFurnitureItem @@ -1024,7 +1025,8 @@ class CatalogScreen(DirectFrame): def __makeFFlist(self): for id, handle in base.cr.friendsMap.items(): - self.ffList.append((id, handle.getName(), NametagGlobals.getFriendColor(handle))) + if isinstance(handle, FriendHandle.FriendHandle): + self.ffList.append((id, handle.getName(), NametagGlobals.getFriendColor(handle))) def __makeScrollList(self): for ff in self.ffList: diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index 35eb081c..590902a2 100755 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -175,8 +175,6 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): return if self.hasLocalAvatar: self.freeAvatar() - if config.GetBool('want-pets', 1): - base.localAvatar.lookupPetDNA() self.notify.debug('Entering Phone Sphere....') taskMgr.remove(self.uniqueName('ringDoLater')) self.ignore(self.phoneSphereEnterEvent) diff --git a/toontown/toon/DistributedToon.py b/toontown/toon/DistributedToon.py index 1213616e..a12726af 100755 --- a/toontown/toon/DistributedToon.py +++ b/toontown/toon/DistributedToon.py @@ -108,7 +108,6 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute self.savedCheesyExpireTime = 0 if hasattr(base, 'wantPets') and base.wantPets: self.petTrickPhrases = [] - self.petDNA = None self.customMessages = [] self.resistanceMessages = [] self.cogSummonsEarned = [] @@ -1662,11 +1661,8 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def setPetId(self, petId): self.petId = petId - if petId == 0: - self.petDNA = None - elif self.isLocal(): + if self.isLocal(): base.cr.addPetToFriendsMap() - return def getPetId(self): return self.petId @@ -1722,6 +1718,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute def __petDetailsLoaded(self, pet): self.petDNA = pet.style + def trickOrTreatTargetMet(self, beanAmount): if self.effect: self.effect.stop() diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 28cd7647..e4f2d45c 100755 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -1768,13 +1768,11 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): def getPetDNA(self): if self.hasPet(): - pet = base.cr.doId2do(self.petId) - return pet.petDNA + pet = base.cr.identifyFriend(self.petId) + return pet.style if pet else None return None def setPetId(self, petId): self.petId = petId - if petId == 0: - self.petDNA = None - elif self.isLocal(): + if self.isLocal(): base.cr.addPetToFriendsMap()