Started updating to 9.8+ features, not yet finished (unsafe version).

Need to finish:
* Pending login state
* New creature speed changes
* Vip state displays

Fixed:
* Creature light
* Missing lua constants

If someone can finish this off that would be good,
I will be busy for a while :)
This commit is contained in:
BeniS
2012-12-27 02:56:06 +13:00
parent a86449dea9
commit 619285069c
13 changed files with 103 additions and 29 deletions

View File

@@ -86,6 +86,13 @@ std::string InputMessage::getString()
return std::string(v, stringLength);
}
double InputMessage::getDouble()
{
uint8 precision = getU8();
uint32 v = getU32();
return (v / std::pow((float)10, precision));
}
bool InputMessage::decryptRsa(int size)
{
checkRead(size);

View File

@@ -46,6 +46,7 @@ public:
uint32 getU32();
uint64 getU64();
std::string getString();
double getDouble();
uint8 peekU8() { uint8 v = getU8(); m_readPos-=1; return v; }
uint16 peekU16() { uint16 v = getU16(); m_readPos-=2; return v; }