Some fixes to [heal_unit]animate=yes

- Play the healed animation
- Pass the heal amount to both animations
This commit is contained in:
Celtic Minstrel 2017-03-27 01:07:33 -04:00 committed by GitHub
parent 2417cf31c3
commit 0c4b05ee2a

View file

@ -688,12 +688,12 @@ function wml_actions.heal_unit(cfg)
end
if cfg.animate then
local animator = wesnoth.create_animator()
animator:add(u, 'healed', 'hits', {value = heal_amount})
if #healers > 0 then
local animator = wesnoth.create_animator()
-- Need dummy 3rd argument here...
animator:add(healers[1], 'healing', 'hits')
animator:run()
animator:add(healers[1], 'healing', 'hits', {value = heal_amount})
end
animator:run()
end
end
end