diff --git a/toontown/coderedemption/TTCodeRedemptionConsts.py b/toontown/coderedemption/TTCodeRedemptionConsts.py index 912b5a6..798a843 100644 --- a/toontown/coderedemption/TTCodeRedemptionConsts.py +++ b/toontown/coderedemption/TTCodeRedemptionConsts.py @@ -1,5 +1,7 @@ +from enum import IntEnum + DefaultDbName = 'tt_code_redemption' -RedeemErrors = Enum('Success, CodeDoesntExist, CodeIsInactive, CodeAlreadyRedeemed, AwardCouldntBeGiven, TooManyAttempts, SystemUnavailable, ') +RedeemErrors = IntEnum('RedeemErrors', ('Success', 'CodeDoesntExist', 'CodeIsInactive', 'CodeAlreadyRedeemed', 'AwardCouldntBeGiven', 'TooManyAttempts', 'SystemUnavailable')) RedeemErrorStrings = {RedeemErrors.Success: 'Success', RedeemErrors.CodeDoesntExist: 'Invalid code', RedeemErrors.CodeIsInactive: 'Code is inactive', diff --git a/toontown/rpc/AwardManagerConsts.py b/toontown/rpc/AwardManagerConsts.py index bdf5800..e9d7bfe 100644 --- a/toontown/rpc/AwardManagerConsts.py +++ b/toontown/rpc/AwardManagerConsts.py @@ -1,4 +1,6 @@ -GiveAwardErrors = Enum('Success, WrongGender, NotGiftable, FullMailbox, FullAwardMailbox, AlreadyInMailbox, AlreadyInGiftQueue, AlreadyInOrderedQueue, AlreadyInCloset, AlreadyBeingWorn, AlreadyInAwardMailbox, AlreadyInThirtyMinuteQueue, AlreadyInMyPhrases, AlreadyKnowDoodleTraining, AlreadyRented, GenericAlreadyHaveError, UnknownError, UnknownToon, NonToon,') +from enum import IntEnum + +GiveAwardErrors = IntEnum('GiveAwardErrors', ('Success', 'WrongGender', 'NotGiftable', 'FullMailbox', 'FullAwardMailbox', 'AlreadyInMailbox', 'AlreadyInGiftQueue', 'AlreadyInOrderedQueue', 'AlreadyInCloset', 'AlreadyBeingWorn', 'AlreadyInAwardMailbox', 'AlreadyInThirtyMinuteQueue', 'AlreadyInMyPhrases', 'AlreadyKnowDoodleTraining', 'AlreadyRented', 'GenericAlreadyHaveError', 'UnknownError', 'UnknownToon', 'NonToon')) GiveAwardErrorStrings = {GiveAwardErrors.Success: 'success', GiveAwardErrors.WrongGender: 'wrong gender', GiveAwardErrors.NotGiftable: 'item is not giftable',