mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Improved the implementation of HOOK_INVENWIELD (#266)
* it now runs for the player and NPCs when removing equipped items. * added an additional argument. Fixed drop_obj script function not removing the equipped armor properly for the player and party members. Fixed incorrect PIDs for RP new party members in npcarmor.ini.
This commit is contained in:
@@ -72,7 +72,7 @@ Combat=16777350
|
||||
|
||||
; Cat Jules
|
||||
[5]
|
||||
PID=16777734
|
||||
PID=16777720
|
||||
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
Default=16777353
|
||||
Leather=16777347
|
||||
@@ -82,7 +82,7 @@ Combat=16777226
|
||||
|
||||
; Kitsune
|
||||
[6]
|
||||
PID=16777724
|
||||
PID=16777718
|
||||
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
Default=16777222
|
||||
Leather=16777221
|
||||
|
||||
@@ -431,7 +431,7 @@ int ret1 - Override setting (-1 - use engine handler, any other value - prev
|
||||
|
||||
HOOK_INVENWIELD (hs_invenwield.int)
|
||||
|
||||
Runs before wielding or unwielding an armor or a weapon by a critter (except when using inventory by PC).
|
||||
Runs before causing a critter or the player to wield/unwield an armor or a weapon (except when using the inventory by PC).
|
||||
An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations.
|
||||
NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed.
|
||||
If you need to rely on this, try checking if armor/weapon is already equipped when wielding hook is executed.
|
||||
@@ -440,6 +440,7 @@ Critter arg1 - critter
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor)
|
||||
int arg3 - slot (INVEN_TYPE_*)
|
||||
int arg4 - 1 when wielding, 0 when unwielding
|
||||
int arg5 - 1 when removing an equipped item from inventory, 0 otherwise
|
||||
|
||||
int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user