forked from teamnwah/openmw-tes3coop
c27351c19e
AddItem, RemoveItem, GetItemName, GetItemCount, GetItemHealth, GetInventorySize SendInventory Example: ```lua tes3mp.AddItem(pid, "glass dagger", 1, 50) tes3mp.AddItem(pid, "glass dagger", 1, -1) tes3mp.SendInventory(pid) tes3mp.RemoveItem(pid, "glass dagger", 1) tes3mp.SendInventory(pid) local invSize = tes3mp.GetInventorySize(pid) - 1 for i = 0, invSize do print(("%s %d %d"):format(tes3mp.GetItemName(pid, i), tes3mp.GetItemCount(pid, i), tes3mp.GetItemHealth(pid, i))) end ```
22 lines
438 B
C++
22 lines
438 B
C++
//
|
|
// Created by koncord on 22.10.16.
|
|
//
|
|
|
|
#ifndef OPENMW_PACKETINVENTORY_HPP
|
|
#define OPENMW_PACKETINVENTORY_HPP
|
|
|
|
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
|
|
|
namespace mwmp
|
|
{
|
|
class PacketInventory : public BasePacket
|
|
{
|
|
public:
|
|
PacketInventory(RakNet::RakPeerInterface *peer);
|
|
|
|
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
|
};
|
|
}
|
|
|
|
|
|
#endif //OPENMW_PACKETINVENTORY_HPP
|