mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
Fix login with 9.83-10.10
This only adds protocol compatibility, the features aren't actually implemented yet
This commit is contained in:
@@ -67,6 +67,17 @@ void ThingType::unserialize(uint16 clientId, ThingCategory category, const FileS
|
||||
attr -= 1;
|
||||
}
|
||||
|
||||
if(g_game.getProtocolVersion() >= 1010) {
|
||||
/* In 10.10 all attributes from 16 and up were
|
||||
* incremented by 1 to make space for 16 as
|
||||
* "No Movement Animation" flag.
|
||||
*/
|
||||
if(attr == 16)
|
||||
attr = ThingAttrNoMoveAnimation;
|
||||
else if(attr > 16)
|
||||
attr -= 1;
|
||||
}
|
||||
|
||||
switch(attr) {
|
||||
case ThingAttrDisplacement: {
|
||||
m_displacement.x = fin->getU16();
|
||||
@@ -126,8 +137,8 @@ void ThingType::unserialize(uint16 clientId, ThingCategory category, const FileS
|
||||
|
||||
int totalSprites = m_size.area() * m_layers * m_numPatternX * m_numPatternY * m_numPatternZ * m_animationPhases;
|
||||
|
||||
if(totalSprites == 0)
|
||||
stdext::throw_exception("a thing type has no sprites");
|
||||
// if(totalSprites == 0)
|
||||
// stdext::throw_exception("a thing type has no sprites");
|
||||
if(totalSprites > 4096)
|
||||
stdext::throw_exception("a thing type has more than 4096 sprites");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user