diff --git a/game/engines/default/engine/interface/ActorTalents.lua b/game/engines/default/engine/interface/ActorTalents.lua index 8ee3ca6ce3d2c1517dfaf9525b2384a5b305abe1..69fd116dde190e78995623e70b269ab0365ec78e 100644 --- a/game/engines/default/engine/interface/ActorTalents.lua +++ b/game/engines/default/engine/interface/ActorTalents.lua @@ -754,7 +754,7 @@ end function _M:automaticTalents() for tid, c in pairs(self.talents_auto) do local t = self.talents_def[tid] - if (t.mode ~= "sustained" or not self.sustain_talents[tid]) and not self.talents_cd[tid] and self:preUseTalent(t, true, true) and (not t.auto_use_check or t.auto_use_check(self, t)) then + if not t.np_npc_use and (t.mode ~= "sustained" or not self.sustain_talents[tid]) and not self.talents_cd[tid] and self:preUseTalent(t, true, true) and (not t.auto_use_check or t.auto_use_check(self, t)) then self:useTalent(tid) end end diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 8006f4fc472f580fa4acbcb7ac2c944e24435065..15e4aaba55e19c5d62145851c15bad94197f1cca 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -679,7 +679,7 @@ function _M:automaticTalents() for tid, c in pairs(self.talents_auto) do local t = self.talents_def[tid] local spotted = spotHostiles(self) - if (t.mode ~= "sustained" or not self.sustain_talents[tid]) and not self.talents_cd[tid] and self:preUseTalent(t, true, true) and (not t.auto_use_check or t.auto_use_check(self, t)) then + if not t.no_npc_use and (t.mode ~= "sustained" or not self.sustain_talents[tid]) and not self.talents_cd[tid] and self:preUseTalent(t, true, true) and (not t.auto_use_check or t.auto_use_check(self, t)) then if (c == 1) or (c == 2 and #spotted <= 0) or (c == 3 and #spotted > 0) then if c ~= 2 then self:useTalent(tid) diff --git a/game/modules/tome/dialogs/UseTalents.lua b/game/modules/tome/dialogs/UseTalents.lua index cceb8b3d881160db14ab1c76a35ab30c982b3368..8a1cfc33242703470f34b4dad8369a3e47d9dea1 100644 --- a/game/modules/tome/dialogs/UseTalents.lua +++ b/game/modules/tome/dialogs/UseTalents.lua @@ -167,10 +167,12 @@ function _M:use(item, button) end local automode = self.actor:isTalentAuto(t) local ds = "#YELLOW#Disable " - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==1 and ds or "").."Auto-use when available", what=(automode==1 and "auto-dis" or "auto-en-1")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==2 and ds or "").."Auto-use when no enemies are visible", what=(automode==2 and "auto-dis" or "auto-en-2")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==3 and ds or "").."Auto-use when enemies are visible", what=(automode==3 and "auto-dis" or "auto-en-3")}) - table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==4 and ds or "").."Auto-use when enemies are visible and adjacent", what=(automode==4 and "auto-dis" or "auto-en-4")}) + if not t.no_npc_use then + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==1 and ds or "").."Auto-use when available", what=(automode==1 and "auto-dis" or "auto-en-1")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==2 and ds or "").."Auto-use when no enemies are visible", what=(automode==2 and "auto-dis" or "auto-en-2")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==3 and ds or "").."Auto-use when enemies are visible", what=(automode==3 and "auto-dis" or "auto-en-3")}) + table.insert(list, 2, {name=autoMark:getDisplayString()..(automode==4 and ds or "").."Auto-use when enemies are visible and adjacent", what=(automode==4 and "auto-dis" or "auto-en-4")}) + end for i = 1, 12 * self.actor.nb_hotkey_pages do list[#list+1] = {name="Hotkey "..i, what=i} end Dialog:listPopup("Bind talent: "..item.name:toString(), "How do you want to bind this talent?", list, 400, 500, function(b)