spellbook: Fix crash when using minigame word in welcome valley.

This commit is contained in:
Little Cat 2023-01-13 05:37:32 -04:00
parent 325fdddf93
commit 5151d94ac4
No known key found for this signature in database
GPG key ID: FBAEF89E48C4CD61

View file

@ -352,7 +352,7 @@ class Minigame(MagicWord):
if any((isTeleport, isRequest)):
if isTeleport and (ZoneUtil.isDynamicZone(toon.zoneId) or not toon.zoneId == mgSzId):
return "Target needs to be in a playground to teleport to a minigame."
MinigameCreatorAI.RequestMinigame[avId] = (mgId, mgKeep, mgDiff, mgSzId)
MinigameCreatorAI.RequestMinigame[avId] = (mgId, mgKeep, mgDiff, ToontownGlobals.ToontownCentral if ZoneUtil.isWelcomeValley(mgSzId) else mgSzId)
if isTeleport:
try:
result = MinigameCreatorAI.createMinigame(self.air, [avId], mgSzId)