Skip to content

Commit fb36fa7

Browse files
committed
ItemMsg world functionality
1 parent d8f5672 commit fb36fa7

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/Net/msg/ItemMsg.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "Net/msg/ItemMsg.h"
2+
#include "Cmn/ItemMgr.h"
3+
4+
#include <libkiwi.h>
5+
6+
namespace AP {
7+
namespace Net {
8+
9+
/**
10+
* @brief Constructor
11+
*
12+
* @param rStrm Stream to packet content
13+
*/
14+
ItemMsg::ItemMsg(kiwi::MemStream& rStrm) {
15+
u16 itemId = rStrm.Read_u16();
16+
17+
Cmn::ItemMgr::GetInstance().SetItemState((ItemID)itemId, true);
18+
}
19+
}
20+
}

src/Net/msg/ItemMsg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ItemMsg : public IMessage {
1919
*
2020
* @param rStrm Stream to packet content
2121
*/
22-
ItemMsg(kiwi::MemStream& /* rStrm */) {}
22+
ItemMsg(kiwi::MemStream& rStrm);
2323

2424
/**
2525
* @brief Gets the type of this command

0 commit comments

Comments
 (0)