[harm_unit]: added fire_event keys to wml_actions.unstore_unit tables
Fix for bug #20836
This commit is contained in:
parent
6c4f81edba
commit
664c7e6859
1 changed files with 8 additions and 2 deletions
|
@ -934,14 +934,20 @@ function wml_actions.harm_unit(cfg)
|
|||
-- this blocks handles the harmed units advancing
|
||||
if experience ~= false and harmer and unit_to_harm.valid and unit_to_harm.experience >= unit_to_harm.max_experience then
|
||||
wml_actions.store_unit { { "filter", { id = unit_to_harm.id } }, variable = "Lua_store_unit", kill = true }
|
||||
wml_actions.unstore_unit { variable = "Lua_store_unit", find_vacant = false, advance = true }
|
||||
wml_actions.unstore_unit { variable = "Lua_store_unit",
|
||||
find_vacant = false,
|
||||
advance = true,
|
||||
fire_event = fire_event }
|
||||
wesnoth.set_variable ( "Lua_store_unit", nil )
|
||||
end
|
||||
|
||||
-- this block handles the harmer advancing
|
||||
if experience ~= false and harmer and harmer.valid and harmer.experience >= harmer.max_experience then
|
||||
wml_actions.store_unit { { "filter", { id = harmer.id } }, variable = "Lua_store_unit", kill = true }
|
||||
wml_actions.unstore_unit { variable = "Lua_store_unit", find_vacant = false, advance = true }
|
||||
wml_actions.unstore_unit { variable = "Lua_store_unit",
|
||||
find_vacant = false,
|
||||
advance = true,
|
||||
fire_event = fire_event }
|
||||
wesnoth.set_variable ( "Lua_store_unit", nil )
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue