Difference between revisions of "Script/LogicCallbacks"

From SF3
Jump to: navigation, search
(Callback Function Signatures)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===Callback Function Signatures===
 
===Callback Function Signatures===
Below is a list of function signatures used to register event callbacks.
+
Below is a list of function signatures used to register event callbacks. All callback functions must return ''true'' if they want to be unregistered and ''false'' if they wish to be called again the next time the respective event occurs.
  
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
Line 8: Line 8:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnInventoryEvent''' (const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'')
+
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnInventoryEvent''' (const [[../BasicDataTypes|uint8]] ''_uPlayerFaction'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'')
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnCreatureInventoryEvent''' ([[../Creature|Creature]]&in ''_Creature'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'')
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
Line 17: Line 20:
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnUIEvent''' ()
+
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnBuildingExtendedEvent''' ([[../Building|Building]]&in ''_Building'', [[../string|string[]]]&in ''_sParams'')
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnBuildingCreatureEvent''' ([[../Building|Building]]&in ''_Building'', [[../Creature|Creature[]]]&in ''_Creatures'')
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnUIEntityEvent''' ([[../Entity|Entity]]&in ''_Entity'')
+
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnLogicObjectEvent''' ([[../LogicObject|LogicObject]]&in ''_Object'', [[../BasicDataTypes|uint8]] ''_uFaction'')
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnSectorEvent''' ([[../Sector|Sector@]] ''_Sector'', const [[../BasicDataTypes|uint8]] ''_uPreviousOwnerFaction'', const [[../BasicDataTypes|uint8]] ''_uNewOwnerFaction'')
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnUIEvent''' (const [[../BasicDataTypes|uint8]] ''_uPlayerFaction'')
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnUIEntityEvent''' (const [[../BasicDataTypes|uint8]] ''_uPlayerFaction'', [[../Entity|Entity]]&in ''_Entity'')
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]  
 
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnTimerEvent''' ()
 
| style='color: black; width: 90%; line-height: 0.8;' | '''TOnTimerEvent''' ()
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''TOnTimerUserDataEvent''' (const [[../BasicDataTypes|string]]&in ''_sUserData'')
 +
|-
 
|}
 
|}

Latest revision as of 11:23, 7 September 2017

Callback Function Signatures

Below is a list of function signatures used to register event callbacks. All callback functions must return true if they want to be unregistered and false if they wish to be called again the next time the respective event occurs.

bool TOnHeroPartyEvent (Creature&in _Creature)
bool TOnInventoryEvent (const uint8 _uPlayerFaction, const string&in _sItemName, const uint _uAmount)
bool TOnCreatureInventoryEvent (Creature&in _Creature, const string&in _sItemName, const uint _uAmount)
bool TOnCreatureEvent (Creature&in _Creature)
bool TOnBuildingEvent (Building&in _Building)
bool TOnBuildingExtendedEvent (Building&in _Building, string[]&in _sParams)
bool TOnBuildingCreatureEvent (Building&in _Building, Creature[]&in _Creatures)
bool TOnLogicObjectEvent (LogicObject&in _Object, uint8 _uFaction)
bool TOnSectorEvent (Sector@ _Sector, const uint8 _uPreviousOwnerFaction, const uint8 _uNewOwnerFaction)
bool TOnUIEvent (const uint8 _uPlayerFaction)
bool TOnUIEntityEvent (const uint8 _uPlayerFaction, Entity&in _Entity)
bool TOnTimerEvent ()
bool TOnTimerUserDataEvent (const string&in _sUserData)

Callback Function Signatures

Below is a list of function signatures used to register event callbacks.

bool TOnHeroPartyEvent (Creature&in _Creature)
bool TOnInventoryEvent (const string&in _sItemName, const uint _uAmount)
bool TOnCreatureEvent (Creature&in _Creature)
bool TOnBuildingEvent (Building&in _Building)
bool TOnUIEvent ()
bool TOnUIEntityEvent (Entity&in _Entity)
bool TOnTimerEvent ()