@ -8,11 +8,12 @@
{ " GetInventoryChangesSize " , ItemFunctions : : GetInventoryChangesSize } , \
{ " GetInventoryChangesSize " , ItemFunctions : : GetInventoryChangesSize } , \
{ " GetInventoryChangesAction " , ItemFunctions : : GetInventoryChangesAction } , \
{ " GetInventoryChangesAction " , ItemFunctions : : GetInventoryChangesAction } , \
\
\
{ " SetInventoryChangesAction " , ItemFunctions : : SetInventoryChangesAction } , \
\
{ " EquipItem " , ItemFunctions : : EquipItem } , \
{ " EquipItem " , ItemFunctions : : EquipItem } , \
{ " UnequipItem " , ItemFunctions : : UnequipItem } , \
{ " UnequipItem " , ItemFunctions : : UnequipItem } , \
\
\
{ " AddItem " , ItemFunctions : : AddItem } , \
{ " AddItemChange " , ItemFunctions : : AddItemChange } , \
{ " RemoveItem " , ItemFunctions : : RemoveItem } , \
\
\
{ " HasItemEquipped " , ItemFunctions : : HasItemEquipped } , \
{ " HasItemEquipped " , ItemFunctions : : HasItemEquipped } , \
\
\
@ -35,7 +36,9 @@
\
\
{ " SendEquipment " , ItemFunctions : : SendEquipment } , \
{ " SendEquipment " , ItemFunctions : : SendEquipment } , \
{ " SendInventoryChanges " , ItemFunctions : : SendInventoryChanges } , \
{ " SendInventoryChanges " , ItemFunctions : : SendInventoryChanges } , \
{ " SendItemUse " , ItemFunctions : : SendItemUse }
{ " SendItemUse " , ItemFunctions : : SendItemUse } , \
\
{ " AddItem " , ItemFunctions : : AddItem }
class ItemFunctions
class ItemFunctions
{
{
@ -76,6 +79,15 @@ public:
*/
*/
static unsigned int GetInventoryChangesAction ( unsigned short pid ) noexcept ;
static unsigned int GetInventoryChangesAction ( unsigned short pid ) noexcept ;
/**
* \ brief Set the action type in a player ' s inventory changes .
*
* \ param pid The player ID whose inventory changes should be used .
* \ param action The action ( 0 for SET , 1 for ADD , 2 for REMOVE ) .
* \ return void
*/
static void SetInventoryChangesAction ( unsigned short pid , unsigned char action ) noexcept ;
/**
/**
* \ brief Equip an item in a certain slot of the equipment of a player .
* \ brief Equip an item in a certain slot of the equipment of a player .
*
*
@ -87,7 +99,8 @@ public:
* \ param enchantmentCharge The enchantment charge of the item .
* \ param enchantmentCharge The enchantment charge of the item .
* \ return void
* \ return void
*/
*/
static void EquipItem ( unsigned short pid , unsigned short slot , const char * refId , unsigned int count , int charge , double enchantmentCharge = - 1 ) noexcept ;
static void EquipItem ( unsigned short pid , unsigned short slot , const char * refId , unsigned int count , int charge ,
double enchantmentCharge = - 1 ) noexcept ;
/**
/**
* \ brief Unequip the item in a certain slot of the equipment of a player .
* \ brief Unequip the item in a certain slot of the equipment of a player .
@ -99,9 +112,7 @@ public:
static void UnequipItem ( unsigned short pid , unsigned short slot ) noexcept ;
static void UnequipItem ( unsigned short pid , unsigned short slot ) noexcept ;
/**
/**
* \ brief Add an item to a player ' s inventory .
* \ brief Add an item change to a player ' s inventory changes .
*
* Note : This will set the ADD action for all of the player ' s current inventory changes .
*
*
* \ param pid The player ID .
* \ param pid The player ID .
* \ param refId The refId of the item .
* \ param refId The refId of the item .
@ -111,21 +122,9 @@ public:
* \ param soul The soul of the item .
* \ param soul The soul of the item .
* \ return void
* \ return void
*/
*/
static void AddItem ( unsigned short pid , const char * refId , unsigned int count , int charge ,
static void AddItem Change ( unsigned short pid , const char * refId , unsigned int count , int charge ,
double enchantmentCharge , const char * soul ) noexcept ;
double enchantmentCharge , const char * soul ) noexcept ;
/**
* \ brief Remove an item from a player ' s inventory .
*
* Note : This will set the REMOVE action for all of the player ' s current inventory changes .
*
* \ param pid The player ID .
* \ param refId The refId of the item .
* \ param count The count of the item .
* \ return void
*/
static void RemoveItem ( unsigned short pid , const char * refId , unsigned short count ) noexcept ;
/**
/**
* \ brief Check whether a player has equipped an item with a certain refId in any slot .
* \ brief Check whether a player has equipped an item with a certain refId in any slot .
*
*
@ -292,6 +291,11 @@ public:
*/
*/
static void SendItemUse ( unsigned short pid ) noexcept ;
static void SendItemUse ( unsigned short pid ) noexcept ;
// All methods below are deprecated versions of methods from above
static void AddItem ( unsigned short pid , const char * refId , unsigned int count , int charge ,
double enchantmentCharge , const char * soul ) noexcept ;
private :
private :
} ;
} ;