diff --git a/basic.cpp b/basic.cpp index 3d6d576..8f3dbb2 100644 --- a/basic.cpp +++ b/basic.cpp @@ -1,17 +1,22 @@ -void ProtocolGame::sendBasicData() +void ProtocolGameBase::sendBasicData() { - NetworkMessage msg; - msg.addByte(0x9F); - msg.addByte(player->isPremium() ? 0x01 : 0x00); - msg.add(player->isPremium() ? time(nullptr) + (player->premiumDays * 86400) : time(nullptr) + (player->premiumDays * 86400)); - msg.addByte(player->getVocation()->getClientId()); - // Prey System - if (player->getVocation()->getId() == 0) { + NetworkMessage msg; + msg.addByte(0x9F); + if (player->isPremium()) { + msg.addByte(1); + msg.add(time(nullptr) + (player->premiumDays * 86400)); + } else { msg.addByte(0); + msg.add(0); } - else { - msg.addByte(1); // has reached Main (allow player to open Prey window) - } + msg.addByte(player->getVocation()->getClientId()); + + // Prey System + if (player->getVocation()->getId() == 0) + msg.addByte(0); + else + msg.addByte(1); + msg.add(0xFF); // number of known spells for (uint8_t spellId = 0x00; spellId < 0xFF; spellId++) { msg.addByte(spellId);