Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/gamePacket/_gamePacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "tile_activate.hpp"
#include "item_activate.hpp"
#include "item_activate_object.hpp"
#include "set_icon_state.hpp"
#include "ping_reply.hpp"
#include "disconnect.hpp"

Expand All @@ -16,6 +17,7 @@ std::unordered_map<u_char, std::function<void(ENetEvent&, ::gamePacket)>> gamePa
{0x07, std::bind(&tile_activate, std::placeholders::_1, std::placeholders::_2)},
{0x0a, std::bind(&item_activate, std::placeholders::_1, std::placeholders::_2)},
{0x0b, std::bind(&item_activate_object, std::placeholders::_1, std::placeholders::_2)},
{0x12, std::bind(&set_icon_state, std::placeholders::_1, std::placeholders::_2)},
{0x15, std::bind(&ping_reply, std::placeholders::_1, std::placeholders::_2)},
{0x1a, std::bind(&disconnect, std::placeholders::_1, std::placeholders::_2)}
};
12 changes: 12 additions & 0 deletions include/gamePacket/set_icon_state.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "pch.hpp"
#include "set_icon_state.hpp"

/* @note the "..." bubble while typing */
void set_icon_state(ENetEvent& event, ::gamePacket gamePacket)
{
::peer *pPeer = static_cast<::peer*>(event.peer->data);
if (pPeer->netid == 0) return; // @note not in a world

gamePacket.netid = pPeer->netid;
state_visuals(*event.peer, std::move(gamePacket));
}
3 changes: 3 additions & 0 deletions include/gamePacket/set_icon_state.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

extern void set_icon_state(ENetEvent& event, ::gamePacket gamePacket);
Loading