Fortera Global
Intermediate OT User
- Joined
- Nov 20, 2015
- Messages
- 1,181
- Solutions
- 2
- Reaction score
- 117
I have this function on my protocolgame.cpp
I got debbug when try open History Store
tfs 1.2 protocol 10.99+
protocolgame.cpp
I got debbug when try open History Store
tfs 1.2 protocol 10.99+
protocolgame.cpp
C++:
void ProtocolGame::parsePacket(NetworkMessage& msg)
{
switch (recvbyte) {
case 0xEF: parseTransferCoins(msg); break;
case 0xFA: parseStoreOpen(); break;
case 0xFD: parseStoreOpenHistory(msg); break;
case 0xFE: parseStoreRequestHistory(msg); break;
default:
// std::cout << "Player: " << player->getName() << " sent an unknown packet header: 0x" << std::hex << static_cast<uint16_t>(recvbyte) << std::dec << "!" << std::endl;
break;
}
if (msg.isOverrun()) {
disconnect();
}
}
void ProtocolGame::parseStoreOpenHistory(NetworkMessage& msg)
{
storeHistoryEntriesPerPage = msg.getByte();
g_dispatcher.addTask(createTask(std::bind(&ProtocolGame::sendStoreHistory, getThis(), 0, storeHistoryEntriesPerPage)));
}
void ProtocolGame::parseStoreRequestHistory(NetworkMessage& msg)
{
uint16_t page = msg.get<uint16_t>();
g_dispatcher.addTask(createTask(std::bind(&ProtocolGame::sendStoreHistory, getThis(), page, storeHistoryEntriesPerPage)));
}
Last edited by a moderator: