Tested and fixed #155

* Also fixed a typo in the game_tibiafiles module.
master
BeniS 11 years ago
parent fcdf2286b6
commit 8cdab5c814

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

@ -1054,7 +1054,7 @@ void Game::buyItem(const ItemPtr& item, int amount, bool ignoreCapacity, bool bu
{ {
if(!canPerformGameAction() || !item) if(!canPerformGameAction() || !item)
return; 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) void Game::sellItem(const ItemPtr& item, int amount, bool ignoreEquipped)

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

Loading…
Cancel
Save