Browse Source

Tested and fixed #155

* Also fixed a typo in the game_tibiafiles module.
BeniS 8 years ago
parent
commit
8cdab5c814
3 changed files with 5 additions and 5 deletions
  1. 1
    1
      modules/game_tibiafiles/tibiafiles.lua
  2. 1
    1
      src/otclient/game.cpp
  3. 3
    3
      src/otclient/item.cpp

+ 1
- 1
modules/game_tibiafiles/tibiafiles.lua View File

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

+ 1
- 1
src/otclient/game.cpp View File

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

+ 3
- 3
src/otclient/item.cpp View File

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

Loading…
Cancel
Save