Merge pull request #490 from conde2/master
Support for newer versions and light draw fix
This commit is contained in:
commit
d64a682e74
|
@ -54,7 +54,7 @@ function g_game.getSupportedClients()
|
|||
940, 944, 953, 954, 960, 961, 963,
|
||||
970, 980, 981, 982, 983, 984, 985,
|
||||
986, 1001, 1002, 1010, 1020, 1021,
|
||||
1022, 1031
|
||||
1022, 1031, 1034, 1035
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -376,6 +376,7 @@ namespace Otc
|
|||
GamePVPMode = 50,
|
||||
GameWritableDate = 51,
|
||||
GameAdditionalVipInfo = 52,
|
||||
GameBaseSkillU16 = 53,
|
||||
|
||||
LastGameFeature = 101
|
||||
};
|
||||
|
|
|
@ -1562,6 +1562,10 @@ void Game::setProtocolVersion(int version)
|
|||
enableFeature(Otc::GamePVPMode);
|
||||
}
|
||||
|
||||
if (version >= 1035) {
|
||||
enableFeature(Otc::GameDoubleSkills);
|
||||
enableFeature(Otc::GameBaseSkillU16);
|
||||
}
|
||||
m_protocolVersion = version;
|
||||
|
||||
Proto::buildMessageModesMap(version);
|
||||
|
|
|
@ -139,6 +139,9 @@ void MapView::draw(const Rect& rect)
|
|||
else
|
||||
++it;
|
||||
|
||||
if (g_map.isCovered(tilePos, m_cachedFirstVisibleFloor))
|
||||
tile->draw(transformPositionTo2D(tilePos, cameraPosition), scaleFactor, drawFlags);
|
||||
else
|
||||
tile->draw(transformPositionTo2D(tilePos, cameraPosition), scaleFactor, drawFlags, m_lightView.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -1125,6 +1125,9 @@ void ProtocolGame::parsePlayerSkills(const InputMessagePtr& msg)
|
|||
|
||||
int baseLevel;
|
||||
if(g_game.getFeature(Otc::GameSkillsBase))
|
||||
if (g_game.getFeature(Otc::GameBaseSkillU16))
|
||||
baseLevel = msg->getU16();
|
||||
else
|
||||
baseLevel = msg->getU8();
|
||||
else
|
||||
baseLevel = level;
|
||||
|
|
Loading…
Reference in New Issue