pets: Fix crash for newer panda.
This commit is contained in:
parent
0072059a41
commit
0c12e38c83
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase.PythonUtil import list2dict, Enum
|
||||
from enum import IntEnum
|
||||
from toontown.pets import PetTricks
|
||||
import types
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('PetObserve')
|
||||
|
@ -16,8 +16,8 @@ def send(zoneIds, petObserve):
|
|||
messenger.send(getEventName(zoneId), [petObserve])
|
||||
|
||||
|
||||
Phrases = Enum('HI, BYE, YES, NO, SOOTHE, PRAISE, CRITICISM, HAPPY,SAD, ANGRY, HURRY, QUESTION, FRIENDLY, LETS_PLAY,COME, FOLLOW_ME, STAY, NEED_LAFF, NEED_GAGS, NEED_JB,GO_AWAY, DO_TRICK,')
|
||||
Actions = Enum('FEED, SCRATCH,ATTENDED_START, ATTENDED_STOP,ATTENDING_START, ATTENDING_STOP,CHANGE_ZONE, LOGOUT,GARDEN')
|
||||
Phrases = IntEnum('Phrases', ('HI', 'BYE', 'YES', 'NO', 'SOOTHE', 'PRAISE', 'CRITICISM', 'HAPPY', 'SAD', 'ANGRY', 'HURRY', 'QUESTION', 'FRIENDLY', 'LETS_PLAY', 'COME', 'FOLLOW_ME', 'STAY', 'NEED_LAFF', 'NEED_GAGS', 'NEED_JB','GO_AWAY', 'DO_TRICK'), start=0)
|
||||
Actions = IntEnum('Actions', ('FEED', 'SCRATCH', 'ATTENDED_START', 'ATTENDED_STOP', 'ATTENDING_START', 'ATTENDING_STOP', 'CHANGE_ZONE', 'LOGOUT', 'GARDEN'), start=0)
|
||||
|
||||
class PetObserve:
|
||||
|
||||
|
@ -76,7 +76,7 @@ class PetPhraseObserve(PetObserve):
|
|||
petBrain._handlePhraseObserve(self)
|
||||
|
||||
def __repr__(self):
|
||||
return '%s(%s,%s)' % (self.__class__.__name__, Phrases.getString(self.petPhrase), self.avId)
|
||||
return '%s(%s,%s)' % (self.__class__.__name__, Phrases(self.petPhrase).name, self.avId)
|
||||
|
||||
|
||||
class SCObserve(PetPhraseObserve):
|
||||
|
|
Loading…
Reference in a new issue