diff --git a/game/modules/tome/class/interface/PlayerDumpJSON.lua b/game/modules/tome/class/interface/PlayerDumpJSON.lua index cab3df3e0c855aaea1122d91bdc82a7926fd02e3..10b1dc23ea8ec5b76ce7bad30a4e04f376435909 100644 --- a/game/modules/tome/class/interface/PlayerDumpJSON.lua +++ b/game/modules/tome/class/interface/PlayerDumpJSON.lua @@ -354,7 +354,9 @@ function _M:dumpToJSON(js, bypass, nosub) local achs = js:newSection("achievements") for id, data in pairs(self.achievements or {}) do local a = world:getAchievementFromId(id) - achs[#achs+1] = { name=a.name, when=game.calendar:getTimeDate(data.turn, "%s %s %s year of Ascendancy at %02d:%02d"), desc=a.desc.."\nBy "..(data.who or "???")} + if a then + achs[#achs+1] = { name=a.name, when=game.calendar:getTimeDate(data.turn, "%s %s %s year of Ascendancy at %02d:%02d"), desc=a.desc.."\nBy "..(data.who or "???")} + end end table.sort(achs, function(a, b) return a.name < b.name end) diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua index f51ac4554a5f6a43950bb84fc9cf530750f20300..9988c0219670f0c0b1079de119a1aecd0f8b7668 100644 --- a/game/modules/tome/dialogs/DeathDialog.lua +++ b/game/modules/tome/dialogs/DeathDialog.lua @@ -127,8 +127,8 @@ function _M:resurrectBasic(actor) -- apply cursed equipment if actor.hasTalent and actor.hasTalent(actor.T_DEFILING_TOUCH) then - local t = self:getTalentFromId(self.T_DEFILING_TOUCH) - t.updateCurses(self, t, true) + local t = actor:getTalentFromId(actor.T_DEFILING_TOUCH) + t.updateCurses(actor, t, true) end actor.changed = true