Commit fea618f945a9cd3e2a81e9331f222291b1a1b737

Authored by dg
1 parent d25940de

fix


git-svn-id: http://svn.net-core.org/repos/t-engine4@4724 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -458,7 +458,7 @@ function _M:getStatNewTalents(stat_id)
458 458 end
459 459
460 460 function _M:finish()
461   - local ok, dep_miss = self:checkDeps()
  461 + local ok, dep_miss = self:checkDeps(true)
462 462 if not ok then
463 463 self:simpleLongPopup("Impossible", "You cannot learn this talent(s): "..dep_miss, game.w * 0.4)
464 464 return nil
... ... @@ -641,7 +641,7 @@ function _M:learn(v)
641 641 end
642 642 end
643 643
644   -function _M:checkDeps()
  644 +function _M:checkDeps(simple)
645 645 local talents = ""
646 646 local stats_ok = true
647 647
... ... @@ -659,7 +659,7 @@ function _M:checkDeps()
659 659 end
660 660
661 661 local dlist = self.talents_deps[t_id]
662   - if dlist then for dtid, _ in pairs(dlist) do check(dtid) end end
  662 + if dlist and not simple then for dtid, _ in pairs(dlist) do check(dtid) end end
663 663 end
664 664
665 665 for t_id, _ in pairs(self.talents_changed) do check(t_id) end
... ...