ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 60 00 00 00 60 08 06 00 00 00 e2 98 77 | .PNG........IHDR...`...`.......w |
0020 | 38 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 | 8....sRGB.........bKGD.......... |
0040 | 00 00 00 09 70 48 59 73 00 00 0d d7 00 00 0d d7 01 42 28 9b 78 00 00 00 07 74 49 4d 45 07 de 01 | ....pHYs.........B(.x....tIME... |
0060 | 04 16 3b 39 2d fe d1 ea 00 00 1d 3a 49 44 41 54 78 da ed 9d 79 60 55 d5 b9 f6 7f 7b 38 fb 8c c9 | ..;9-......:IDATx...y`U....{8... |
0080 | c9 48 42 06 4c 42 98 03 49 80 00 61 56 9c 67 bd 5a ad 5a c1 b6 d6 ea 75 ec 64 bf db f6 d6 db c1 | .HB.LB..I..aV.g.Z.Z....u.d...... |
00a0 | af bd b6 bd b5 a3 d6 db 7e d6 6a 5b c5 6a ad 80 38 80 80 08 04 c2 14 08 63 02 09 09 24 81 4c e7 | ........~.j[.j..8.......c...$.L. |
00c0 | e4 e4 8c 7b ef f5 fd b1 49 10 0d 90 84 04 b0 cd f3 97 1e ce 5e 67 af f5 ec f5 ac f7 7d d6 bb 76 | ...{....I...........^g......}..v |
00e0 | 60 08 43 18 c2 10 86 30 84 21 0c 61 08 83 8c 31 9f 27 6e 68 14 4e 86 74 2e 7e a4 f4 56 9c 61 b7 | `.C....0.!.a...1.'nh.N.t.~..V.a. |
0100 | fa 35 e0 71 60 1d 92 fc e8 d6 ff 17 dd 35 34 fc e7 80 80 e2 7b 94 5b 10 3c 05 52 4e f7 87 02 1d | .5.q`........54.....{.[.<.RN.... |
0120 | 99 df e8 11 fd 89 1d 7f a6 6d 88 80 41 c0 e4 bb b5 49 42 36 9f 06 e6 03 a8 0e 88 cf 96 88 b4 41 | .........m..A....IB6...........A |
0140 | 67 8b 00 01 08 9a 25 59 fa f6 c8 40 ec 7f 17 2f c6 18 22 60 00 50 b2 88 74 1d db 7f 83 b8 0b 90 | g.....%Y...@.../.."`.P..t....... |
0160 | 64 1b 24 64 cb b8 d3 4f 7c 27 1a 80 f6 1a 93 88 bf fb a3 7d 02 f1 d8 b6 e7 8d 65 43 04 f4 13 f3 | d.$d...O|'.........}......eC.... |
0180 | 17 e1 f0 a3 7e 53 c0 d7 00 b7 24 81 27 43 22 3e 53 42 56 7b be 26 d4 2a 68 af 11 e8 e1 e3 ca 24 | ....~S....$.'C">SBV{.&.*h......$ |
01a0 | 58 a2 a0 3c ba f9 8f 91 ea 21 02 fa 80 a2 45 ca ad 92 e0 49 24 29 1f c0 99 28 e1 cd 91 b0 39 cf | X..<.....!....E....I$)...(....9. |
01c0 | 7c ad 30 21 d0 20 f0 d7 0b 4c 4b 84 62 48 fc 56 8b ea d
class ServerInventoryManager : public InventoryManager
{
public:
ServerInventoryManager();
virtual ~ServerInventoryManager();
void setEnv(ServerEnvironment *env)
{
assert(!m_env);
m_env = env;
}
Inventory *getInventory(const InventoryLocation &loc);
void setInventoryModified(const InventoryLocation &loc);
// Creates or resets inventory
Inventory *createDetachedInventory(const std::string &name, IItemDefManager *idef,
const std::string &player = "");
bool removeDetachedInventory(const std::string &name);
bool checkDetachedInventoryAccess(const InventoryLocation &loc, const std::string &player) const;
void sendDetachedInventories(const std::string &peer_name, bool incremental,
std::function<void(const std::string &, Inventory *)> apply_cb);
private:
struct DetachedInventory
{
Inventory *inventory;
std::string owner;
};
ServerEnvironment *m_env = nullptr;
std::unordered_map<std::string, DetachedInventory> m_detached_inventories;
};
|