nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
129 stars 92 forks source link

Added NWNX_Item_MoveTo() #1611

Closed Cjreek closed 1 year ago

Cjreek commented 1 year ago

Moves items from anywhere (including the ground) into the inventory of any placeable, creature, store or container. Moving an item from a container into the inventory containing the container and the other way around won't trigger any feedback messages about having lost/acquired an item. There's also a general option to disable feedback messages for acquiring/losing items during that function.

/// @brief Move oItem to oTarget
/// @remark Moving items from a container to the inventory of the container's owner (or the other way around) is always "silent" and won't trigger feedback messages
/// @param oItem The item object.
/// @param oTarget The target bag/creature/placeable or store object to move oItem to.
/// @param bHideAllFeedback Hides all feedback messages generated by losing/acquiring items
/// @return TRUE if the item was successfully moved to the target, otherwise FALSE
int NWNX_Item_MoveTo(object oItem, object oTarget, int bHideAllFeedback = FALSE);

closing #1453