Tested and fixed #155

* Also fixed a typo in the game_tibiafiles module.
This commit is contained in:
BeniS 2012-12-31 00:32:09 +13:00
parent fcdf2286b6
commit 8cdab5c814
3 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ function load()
addEvent(function() messageBox:raise() messageBox:focus() end)
disconnect(g_game, { onProtocolVersionChange = load })
g_game.setprotocolVersion(0)
g_game.setProtocolVersion(0)
connect(g_game, { onProtocolVersionChange = load })
end
end

View File

@ -1054,7 +1054,7 @@ void Game::buyItem(const ItemPtr& item, int amount, bool ignoreCapacity, bool bu
{
if(!canPerformGameAction() || !item)
return;
m_protocolGame->sendBuyItem(item->getId(), item->getSubType(), amount, ignoreCapacity, buyWithBackpack);
m_protocolGame->sendBuyItem(item->getId(), item->getCountOrSubType(), amount, ignoreCapacity, buyWithBackpack);
}
void Game::sellItem(const ItemPtr& item, int amount, bool ignoreEquipped)

View File

@ -216,9 +216,9 @@ int Item::getSubType()
{
if(isSplash() || isFluidContainer())
return m_countOrSubType;
if(m_countOrSubType > 0 && g_game.getProtocolVersion() >= 870)
return 1;
return 0;
if(g_game.getProtocolVersion() >= 900)
return 0;
return 1;
}
int Item::getCount()