Page 1 of 1

Thunderstorm zaps after death

Posted: Sat Jul 06, 2013 12:13 am
by SageAcrin
This bug has been around...almost since I started playing, and I'm still not sure why it happens. It still happens in 1.04 though; Sometimes, for some reason, enemies will zap you with Thunderstorm after death.

However, in skimming the code, I happened to notice something; If you change...

Code: Select all

                 if self:isTalentActive(self.T_THUNDERSTORM) then
To...

Code: Select all

if not self.dead and if self:isTalentActive(self.T_THUNDERSTORM) then
...In Actor.lua, wouldn't that fix the problem no matter how it's happening?

Re: Thunderstorm zaps after death

Posted: Sat Jul 06, 2013 7:19 pm
by Hachem_Muche
I think this bug is caused when a timed effect (poison, bleeding, etc) kills the actor while having the effect active. An extra check for death should indeed fix the problem, but moved to the wilderness check so that it catches all similar effects: Patch:

Code: Select all

 game/modules/tome/class/Actor.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index b465254..e314ac0 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -470,7 +470,7 @@ function _M:actBase()
 	self:timedEffects()
 
 	-- Handle thunderstorm, even if the actor is stunned or incapacitated it still works
-	if not game.zone.wilderness then
+	if not game.zone.wilderness and not self.dead then
 		if self:isTalentActive(self.T_THUNDERSTORM) then
 			local t = self:getTalentFromId(self.T_THUNDERSTORM)
 			t.do_storm(self, t)