diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index fb930166953..c35fb06081a 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -658,12 +658,18 @@ var/response = tgui_alert(user, "The [src] loadout cannot be refunded once bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) if(response != "Yes") return FALSE + if(!CanBuy(user, book)) + to_chat(user, "You can't afford that anymore!") + return FALSE to_chat(user, "[book] crumbles to ashes as you acquire its knowledge.") qdel(book) else if(items_path.len) var/response = tgui_alert(user, "The [src] loadout contains items that will not be refundable if bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) if(response != "Yes") return FALSE + if(!CanBuy(user, book)) + to_chat(user, "You can't afford that anymore!") + return FALSE if(items_path.len) var/obj/item/storage/box/wizard/B = new(src) for(var/path in items_path)