diff --git a/src/otclient/const.h b/src/otclient/const.h index a13b8a4d..5a621634 100644 --- a/src/otclient/const.h +++ b/src/otclient/const.h @@ -24,7 +24,6 @@ #define OTCLIENT_CONST_H #include -//#define POKE namespace Otc { @@ -43,24 +42,16 @@ namespace Otc "6207862794310902180176810615217550567108238764764442605581471797" "07119674283982419152118103759076030616683978566631413"; -#ifdef POKE - static const int ClientVersion = 810; - static const int PicSignature = 0x4D407EF6; - static const char* Host = "pxg01.loginto.me"; - static const int HostPort = 7171; -#else static const int ClientVersion = 862; static const int PicSignature = 0x4E119CBF; static const char* Host = "sv3.radbr.com"; static const int HostPort = 7171; -#endif enum OsTypes { OsWindow = 1, OsLinux = 2, OsMac = 3, - OsBrowser = 4, - OsPoke = 9 + OsBrowser = 4 }; enum DatOpts { @@ -72,9 +63,6 @@ namespace Otc DatStackable, DatForceUse, DatMultiUse, -#ifdef POKE - DatRunes, -#endif DatWritable, DatWritableOnce, DatFluidContainer, diff --git a/src/otclient/core/item.cpp b/src/otclient/core/item.cpp index abc0fc77..9bbe903b 100644 --- a/src/otclient/core/item.cpp +++ b/src/otclient/core/item.cpp @@ -36,7 +36,8 @@ void Item::draw(int x, int y) { const ThingType& type = g_thingsType.getItemType(m_id); - m_animation = (g_platform.getTicks() % (500 * type.animationPhases)) / 500; + if(type.animationPhases > 1) + m_animation = (g_platform.getTicks() % (TICKS_PER_FRAME * type.animationPhases)) / TICKS_PER_FRAME; /*if(type.group == Otc::ThingSplashGroup || type.group == Otc::ThingFluidGroup) { //xPattern = m_count % type.xPattern; diff --git a/src/otclient/core/item.h b/src/otclient/core/item.h index 8885fa8c..c27e8cda 100644 --- a/src/otclient/core/item.h +++ b/src/otclient/core/item.h @@ -31,6 +31,10 @@ class Item : public Thing public: Item(); + enum { + TICKS_PER_FRAME = 500 + }; + void draw(int x, int y); void setCount(int count); diff --git a/src/otclient/core/thingstype.cpp b/src/otclient/core/thingstype.cpp index 8f8c3569..7f39781a 100644 --- a/src/otclient/core/thingstype.cpp +++ b/src/otclient/core/thingstype.cpp @@ -104,10 +104,6 @@ void ThingsType::parseThingType(std::stringstream& fin, ThingType& thingType) case Otc::DatMultiUse: // Usable items thingType.isMultiUse = true; break; -#ifdef POKE - case Otc::DatRunes: - break; -#endif case Otc::DatWritable: // Writable thingType.isWritable = true; thingType.maxTextLength = Fw::getU16(fin); diff --git a/src/otclient/net/protocolgamesend.cpp b/src/otclient/net/protocolgamesend.cpp index 23974a09..d18663af 100644 --- a/src/otclient/net/protocolgamesend.cpp +++ b/src/otclient/net/protocolgamesend.cpp @@ -28,7 +28,7 @@ void ProtocolGame::sendLoginPacket(uint32 timestamp, uint8 unknown) OutputMessage oMsg; oMsg.addU8(Otc::ClientEnterGame); - oMsg.addU16(Otc::OsPoke); + oMsg.addU16(Otc::OsLinux); oMsg.addU16(Otc::ClientVersion); oMsg.addU8(0); // first RSA byte must be 0 diff --git a/src/otclient/net/protocollogin.cpp b/src/otclient/net/protocollogin.cpp index 0306f5c1..ed2a02cb 100644 --- a/src/otclient/net/protocollogin.cpp +++ b/src/otclient/net/protocollogin.cpp @@ -30,9 +30,7 @@ ProtocolLogin::ProtocolLogin() { -#ifndef POKE enableChecksum(); -#endif } void ProtocolLogin::login(const std::string& accountName, const std::string& accountPassword) @@ -84,30 +82,6 @@ void ProtocolLogin::sendLoginPacket() { OutputMessage oMsg; -#ifdef POKE - oMsg.addU8(Otc::ClientEnterAccount); - oMsg.addU16(Otc::OsPoke); - oMsg.addU16(Otc::ClientVersion); - - oMsg.addU32(g_thingsType.getSignature()); // data signature - oMsg.addU32(g_sprites.getSignature()); // sprite signature - oMsg.addU32(Otc::PicSignature); // pic signature - - oMsg.addU8(0); // first RSA byte must be 0 - - // xtea key - generateXteaKey(); - oMsg.addU32(m_xteaKey[0]); - oMsg.addU32(m_xteaKey[1]); - oMsg.addU32(m_xteaKey[2]); - oMsg.addU32(m_xteaKey[3]); - - oMsg.addU32(Fw::unsafeCast(m_accountName)); - oMsg.addString(m_accountPassword); - - // complete the 128 bytes for rsa encryption with zeros - oMsg.addPaddingBytes(128 - (23 + m_accountPassword.length())); -#else oMsg.addU8(Otc::ClientEnterAccount); oMsg.addU16(Otc::OsLinux); oMsg.addU16(Otc::ClientVersion); @@ -130,7 +104,6 @@ void ProtocolLogin::sendLoginPacket() // complete the 128 bytes for rsa encryption with zeros oMsg.addPaddingBytes(128 - (21 + m_accountName.length() + m_accountPassword.length())); -#endif if(!Rsa::encrypt((char*)oMsg.getBuffer() + InputMessage::DATA_POS + oMsg.getMessageSize() - 128, 128, Otc::OtservPublicRSA)) return;