This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
new:inventory [2018/02/15 17:19] – removed korshun | new:inventory [2018/02/18 18:08] – created korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Inventory functions ====== | ||
+ | |||
+ | ===== SetInventory ===== | ||
+ | |||
+ | * void SetInventory(str itemname, int count) | ||
+ | * void SetActorInventory(int tid, str itemname, int count) | ||
+ | |||
+ | Sets the number of items in actor' | ||
+ | |||
+ | This function is optimized to minimize bandwidth use. It computes the difference between the current item count and the requested count, and gives or takes the needed number of items. If the actor already has the exact number of items, this function does nothing. | ||
+ | |||