[1.0.4] Unlearning pool talents
Posted: Mon May 27, 2013 3:41 am
Bug: If a player unlearns all talents that use a pool he will keep the talent pool
Example: Create an adventurer, learn 1 talent (an spell, or anything), unlearn it and the pool will stay.
Problem:
In actor.lua: http://git.develz.org/?p=tome.git;a=blo ... .lua#l3227
-- Check the various pools
3227 for key, num_refs in pairs(self.resource_pool_refs) do
3228 if num_refs == 0 then
3229 self:unlearnTalent(key)
3230 end
3231 end
It will remove the pool when num_refs is 0, but even unlearning the last talent that uses a resource "self_pool_refs" stays at 1.
This is not an important, except when an item grants a talent which uses a resource (wand of strike, volcano, void blast) is worn because after removing the equipment the pool will stay (and this means player can be manaclashed!), specially when a player wants to go antimagic but managed to get one of these wands before.
Example: Create an adventurer, learn 1 talent (an spell, or anything), unlearn it and the pool will stay.
Problem:
In actor.lua: http://git.develz.org/?p=tome.git;a=blo ... .lua#l3227
-- Check the various pools
3227 for key, num_refs in pairs(self.resource_pool_refs) do
3228 if num_refs == 0 then
3229 self:unlearnTalent(key)
3230 end
3231 end
It will remove the pool when num_refs is 0, but even unlearning the last talent that uses a resource "self_pool_refs" stays at 1.
This is not an important, except when an item grants a talent which uses a resource (wand of strike, volcano, void blast) is worn because after removing the equipment the pool will stay (and this means player can be manaclashed!), specially when a player wants to go antimagic but managed to get one of these wands before.