1.6.7 Possible selffire code logic error

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
VanceVasser
Low Yeek
Posts: 8
Joined: Tue Jul 21, 2020 11:03 pm

1.6.7 Possible selffire code logic error

#1 Post by VanceVasser »

While developing an addon, I noticed what appears to be a logic error in part of the class/Actor.lua code for the function _M:projectDoAct in the tome module. Specifically, around line 8134 of that file, the code looks like this:

Code: Select all

if act and act == self and not (
((type(typ.selffire) == "number" and rng.percent(typ.selffire))
			or
			(type(typ.selffire) ~= "number" and typ.selffire))
			and (act == game.player and (typ.player_selffire or act.allow_player_selffire))  -- Disable friendlyfire for player projectiles unless explicitly overriden
			)
With the "and (act == game.player..." there, it always prevents selffire from projectiles when they are striking targets that are NOT the player (as if act ~= player, then that whole statement evaluates to false, completely preventing selffire for everything that is not the player).

Post Reply