spellbook: Fix preventing MW usage in tutorial.

This commit is contained in:
Little Cat 2022-12-28 02:42:55 -04:00
parent caaaa39a92
commit cee392fa33
No known key found for this signature in database
GPG key ID: 96455BD9C4399BE8

View file

@ -77,12 +77,11 @@ class ToontownMagicWordManagerAI(DistributedObjectAI.DistributedObjectAI):
self.notify.warning('requestExecuteMagicWord: Magic Word use requested but invoker avatar is non-existent!')
return
# FIXME:
# Same thing with the Toontorial. Magic Words are strictly forbidden here
# Tell the user they can't use it because they're in the Toontorial
# if hasattr(self.air, 'tutorialManager') and avId in list(self.air.tutorialManager.avId2fsm.keys()):
# self.generateResponse(avId=avId, responseType="Tutorial")
# return
if hasattr(self.air, 'tutorialManager') and avId in self.air.tutorialManager.playerDict:
self.generateResponse(avId=avId, responseType="Tutorial")
return
# Our Magic Word affectRange is either SELF (the invoker) or BOTH (invoker and a target)
# Because of this, we should add the invoker to the target list