Template:LuaCallin: Difference between revisions
From Spring
Jump to navigationJump to search
m derp |
tweak to new API named params |
||
| (17 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{API| | <includeonly>{{API | ||
|prefix = addon. | |||
|name = {{{name}}} | |||
|args = {{{args|}}} | |||
|return = {{{return|}}} | |||
|info = {{{info}}}}}</includeonly><noinclude>==Lua Callin usage example== | |||
< | <pre> | ||
{{LuaCallin | |||
|name = AllowUnitTransfer | |||
|args = unitID, unitDefID, oldTeam, newTeam, capture | |||
|return = {{type|bool}} allow | |||
|info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted. | |||
}}</pre> | |||
Called just before unit is | |||
< | |||
{{LuaCallin | {{LuaCallin | ||
|name = AllowUnitTransfer | |||
|name = | |args = unitID, unitDefID, oldTeam, newTeam, capture | ||
| | |return = {{type|bool}} allow | ||
|info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted. | |||
}}</noinclude> | |||
|return = bool allow | |||
| | |||
</noinclude> | |||
Latest revision as of 14:42, 18 June 2016
Lua Callin usage example
{{LuaCallin
|name = AllowUnitTransfer
|args = unitID, unitDefID, oldTeam, newTeam, capture
|return = {{type|bool}} allow
|info = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.
}}
addon.AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture)
return: bool allow
- Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.