mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a new hook: HOOK_ADJUSTPOISON
Added a fix to the poison handling in the engine when an NPC is under the player's control.
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#define HOOK_STDPROCEDURE_END (41)
|
||||
#define HOOK_TARGETOBJECT (42)
|
||||
#define HOOK_ENCOUNTER (43)
|
||||
#define HOOK_ADJUSTPOISON (44)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
|
||||
@@ -368,7 +368,7 @@ int ret0 - overrides the pressed key (a new key DX scancode or 0 for no over
|
||||
|
||||
HOOK_MOUSECLICK (hs_mouseclick.int)
|
||||
|
||||
Runs once every time when a mouse button was pressed or release.
|
||||
Runs once every time when a mouse button was pressed or released.
|
||||
|
||||
int arg0 - event type: 1 - pressed, 0 - released
|
||||
int arg1 - button number (0 - left, 1 - right, up to 7)
|
||||
@@ -693,3 +693,17 @@ int arg2 - 1 when the encounter occurs is a special encounter, 0 otherwise
|
||||
|
||||
int ret0 - overrides the map ID, or pass -1 for event type 0 to cancel the encounter and continue traveling
|
||||
int ret1 - pass 1 to cancel the encounter and load the specified map from the ret1 (only for event type 0)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_ADJUSTPOISON (hs_adjustpoison.int)
|
||||
|
||||
Runs when a critter's poison level is changed, or when the player takes damage from the poison.
|
||||
|
||||
Critter arg0 - the critter
|
||||
int arg1 - the amount of poison being added/removed
|
||||
int arg2 - the damage value at the time of applying the poison effect
|
||||
(damage from the poison effect is implemented only for the player character; for other critters, this value will always be 0)
|
||||
|
||||
int ret0 - the new amount of poison being added/removed
|
||||
int ret1 - the new damage value, only negative values are allowed (will only be valid at the time of taking damage from the poison)
|
||||
|
||||
Reference in New Issue
Block a user