spellbook: Fix Toon keeping old GM icon on switch

This commit is contained in:
Samuel T 2023-11-09 01:18:57 +00:00
parent 50601fc92d
commit eb2f347f09

View file

@ -732,6 +732,7 @@ class SetGM(MagicWord):
if iconRequest > len(TTLocalizer.GM_NAMES) or iconRequest < 0: if iconRequest > len(TTLocalizer.GM_NAMES) or iconRequest < 0:
return "Invalid GM icon ID!" return "Invalid GM icon ID!"
toon.b_setGM(0) # Reset it first, otherwise the Toon keeps the old icon, but the name still changes.
toon.b_setGM(iconRequest) toon.b_setGM(iconRequest)
return f"GM icon set to {iconRequest} for {toon.getName()}" return f"GM icon set to {iconRequest} for {toon.getName()}"