Skip to content
Snippets Groups Projects
Commit 4a85f0fc authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@5253 51575b47-30f0-44d4-a5cc-537603b46e54
parent 6f3dade7
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ function _M:init(t, no_default)
next_uid = next_uid + 1
for k, e in pairs(t) do
if k ~= "__CLASSNAME" then
if k ~= "__CLASSNAME" and k ~= "uid" then
local ee = e
if type(e) == "table" and not e.__CLASSNAME then ee = table.clone(e, true) end
self[k] = ee
......
......@@ -62,7 +62,12 @@ function _M:addMember(actor, def)
-- Turn NPCs into party members
if not actor.no_party_class then
local uid = actor.uid
actor.replacedWith = false
actor:replaceWith(require("mod.class.PartyMember").new(actor))
actor.uid = uid
__uids[uid] = actor
actor.replacedWith = nil
end
-- Notify the UI
......
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