Difference between revisions of "Osiris/API/ExecuteDeal"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
 
Line 2: Line 2:
 
* call '''ExecuteDeal'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Deal''', ''(INTEGER)'''''_AttitudeDiff''')
 
* call '''ExecuteDeal'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Deal''', ''(INTEGER)'''''_AttitudeDiff''')
 
===== Description =====
 
===== Description =====
This API must only be called in response to a [[Osiris/API/HappyWithDeal|HappyWithDeal]] event, with the '''_Character''' parameter from that event as '''_Character''' parameter here. If '''_Deal''' is '''1''', the proposed trade goes through, otherwise it is rejected. '''_AttitudeDiff''' is used for showing how the trade offer affected the NPCs attitude in the interface; it does '''''not''''' update the attitude of the NPC (use [[Osiris/API/CharacterAddAttitudeTowardsPlayer|CharacterAddAttitudeTowardsPlayer]] for that).
+
This API must only be called in response to a [[Osiris/API/HappyWithDeal|HappyWithDeal]] event, with the '''_Character''' parameter from that event as '''_Character''' parameter here. If '''_Deal''' is '''1''', the proposed trade goes through, otherwise it is rejected. '''_AttitudeDiff''' is used for showing how the trade offer affected the NPC's attitude in the interface. However, it does '''''not''''' update the attitude of the NPC (use [[Osiris/API/CharacterAddAttitudeTowardsPlayer|CharacterAddAttitudeTowardsPlayer]] for that).
 
===== Notes =====
 
===== Notes =====
 
* If '''_Character''' is not a player-controlled character or not currently involved in a trade, this call will do nothing.
 
* If '''_Character''' is not a player-controlled character or not currently involved in a trade, this call will do nothing.

Latest revision as of 09:09, 20 August 2018

Full Definition(s)
  • call ExecuteDeal((CHARACTERGUID)_Character, (INTEGER)_Deal, (INTEGER)_AttitudeDiff)
Description

This API must only be called in response to a HappyWithDeal event, with the _Character parameter from that event as _Character parameter here. If _Deal is 1, the proposed trade goes through, otherwise it is rejected. _AttitudeDiff is used for showing how the trade offer affected the NPC's attitude in the interface. However, it does not update the attitude of the NPC (use CharacterAddAttitudeTowardsPlayer for that).

Notes
  • If _Character is not a player-controlled character or not currently involved in a trade, this call will do nothing.
  • See also HappyWithDeal.
See Also