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

Replacing inscriptions will keep existing keybind

git-svn-id: http://svn.net-core.org/repos/t-engine4@2898 51575b47-30f0-44d4-a5cc-537603b46e54
parent a01a6305
No related branches found
No related tags found
No related merge requests found
......@@ -394,7 +394,7 @@ end
function _M:updateCurrentChar()
if not self.party then return end
local player = self.party:findMember{main=true}
profile:currentCharacter(self.__mod_info.name, ("%s the level %d %s %s"):format(player.name, player.level, player.descriptor.subrace, player.descriptor.subclass))
profile:currentCharacter(self.__mod_info.name, ("%s the level %d %s %s"):format(player.name, player.level, player.descriptor.subrace, player.descriptor.subclass), player.__te4_uuid)
end
function _M:getSaveDescription()
......
......@@ -83,12 +83,15 @@ function _M:setInscription(id, name, data, cooldown, vocal, src, bypass_max_same
-- Unlearn old talent
local oldname = self.inscriptions[id]
local oldpos = nil
if oldname then
for i = 1, 36 do
if self.hotkey[i] and self.hotkey[i][1] == "talent" and self.hotkey[i][2] == "T_"..oldname then oldpos = i break end
end
self:unlearnTalent(self["T_"..oldname])
self.inscriptions_data[oldname] = nil
end
-- for k, e in pairs(data) do print(" ****",k,e) end
-- Learn new talent
name = name.."_"..id
......@@ -103,6 +106,15 @@ function _M:setInscription(id, name, data, cooldown, vocal, src, bypass_max_same
if vocal then
game.logPlayer(self, "You are now inscribed with %s.", t.name)
end
-- Hotkey
if oldpos then
for i = 1, 36 do
if self.hotkey[i] and self.hotkey[i][1] == "talent" and self.hotkey[i][2] == "T_"..name then self.hotkey[i] = nil end
end
self.hotkey[oldpos] = {"talent", "T_"..name}
end
return true
end
......
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