From 32bfb37897f03b992e198c3229656b4a4cf76549 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 8 Mar 2013 14:07:41 +0000
Subject: [PATCH] ci

git-svn-id: http://svn.net-core.org/repos/t-engine4@6517 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/Actor.lua        | 2 ++
 game/modules/tome/class/Player.lua       | 1 +
 game/modules/tome/dialogs/UseTalents.lua | 6 ------
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index d375e46456..77f67adb6a 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -4140,6 +4140,8 @@ function _M:setTalentAuto(tid, v, opt)
 	if v then self.talents_auto[tid] = opt
 	else self.talents_auto[tid] = nil
 	end
+	print("===set tal auto", tid, v, opt)
+	util.show_backtrace()
 end
 
 --- Setups a talent automatic use
diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua
index 398148c47d..9c54cd912f 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -688,6 +688,7 @@ function _M:automaticTalents()
 		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
+			print("===auto", tid, c)
 			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 e943f04137..559b30bf46 100644
--- a/game/modules/tome/dialogs/UseTalents.lua
+++ b/game/modules/tome/dialogs/UseTalents.lua
@@ -198,23 +198,17 @@ function _M:use(item, button)
 			elseif b.what == "unset-confirm" then
 				self.actor:setTalentConfirmable(item.talent, false)
 			elseif b.what == "auto-en-1" then
-				self.actor:setTalentAuto(item.talent, true, 1)
 				self.actor:checkSetTalentAuto(item.talent, true, 1)
-				--self.actor:setTalentAuto(item.talent, true, automode)
 			elseif b.what == "auto-en-2" then
-				self.actor:setTalentAuto(item.talent, true, 2)
 				self.actor:checkSetTalentAuto(item.talent, true, 2)
 			elseif b.what == "auto-en-3" then
-				self.actor:setTalentAuto(item.talent, true, 3)
 				self.actor:checkSetTalentAuto(item.talent, true, 3)
 			elseif b.what == "auto-en-4" then
-				self.actor:setTalentAuto(item.talent, true, 4)
 				self.actor:checkSetTalentAuto(item.talent, true, 4)
 			elseif b.what == "auto-dis" then
 				self.actor:checkSetTalentAuto(item.talent, false)
 			end
 			self.c_list:drawTree()
-			if b.what ~= "auto-dis" and automode then self.actor:setTalentAuto(item.talent, true, automode) else self.actor:setTalentAuto(item.talent, false) end
 			self.actor.changed = true
 		end)
 		self.c_list:drawTree()
-- 
GitLab