Skip to content
Snippets Groups Projects
Commit 481c3db2 authored by dg's avatar dg
Browse files

Fixed a weird death bug

git-svn-id: http://svn.net-core.org/repos/t-engine4@6615 51575b47-30f0-44d4-a5cc-537603b46e54
parent 08a596e4
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment