autouse talents without no_energy: unplayable

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
lifanov
Cornac
Posts: 32
Joined: Sat Jan 14, 2012 12:53 am

autouse talents without no_energy: unplayable

#1 Post by lifanov »

I reported this in-game once, the only time the error didn't loop:
an < bn blows up when these are null. Check for null before doing a comparison.
Deleting this condition restores previous functionality, which works okay.

Code: Select all

diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player
index 83a68b5..5c940b8 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -828,13 +828,13 @@ function _M:automaticTalents()
        end
        table.sort(uses, function(a, b)
                local an, nb = util.getval(a.no_energy, self, a), util.getval(b.
-               if an < bn then return true
-               elseif an > bn then return false
-               else
+--             if an < bn then return true
+--             elseif an > bn then return false
+--             else
                        if a.cd > b.cd then return true
                        else return false
                        end
-               end
+--             end
        end)
        table.print(uses)
        for _, use in ipairs(uses) do

grayswandir
Uruivellas
Posts: 708
Joined: Wed Apr 30, 2008 5:55 pm

Re: autouse talents without no_energy: unplayable

#2 Post by grayswandir »

The real error is the:
local an, nb
should be:
local an, bn

I showed this to Shibari like a week ago, it must've gotten lost in the pipeline somewhere.
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated. :)

lifanov
Cornac
Posts: 32
Joined: Sat Jan 14, 2012 12:53 am

Re: autouse talents without no_energy: unplayable

#3 Post by lifanov »

You are right! This works for me.

Post Reply