Vectors 1 Posted December 10, 2014 Share Posted December 10, 2014 #solved Link to comment Share on other sites More sharing options...
TheDelphi 0 Posted December 10, 2014 Share Posted December 10, 2014 Hi guys, how to fix? not fix: http://metin2dev.org/board/index.php/topic/2785-belt-inventory-fix/ not fix: http://metin2dev.org/board/index.php/topic/2932-bug-with-belts/#entry19528 /// new bug fix. static bool IsExistItemInBeltInventory(LPCHARACTER pc) { for (WORD Deponun Gamede Ne Diye Geçtiğine Bakıyorum Çözücem Gibi English ; UP Link to comment Share on other sites More sharing options...
Vectors 1 Posted December 10, 2014 Author Share Posted December 10, 2014 Game build etmesi bekletmese uğraşırdımda zaman kaybı. Thanks, not fix Link to comment Share on other sites More sharing options...
Vectors 1 Posted December 11, 2014 Author Share Posted December 11, 2014 up Link to comment Share on other sites More sharing options...
Ken 904 Posted December 11, 2014 Share Posted December 11, 2014 Make like that ; bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, BYTE count) { LPITEM item = NULL; if (!IsValidItemPosition(Cell)) return false; if (!(item = GetItem(Cell))) return false; if (item->IsExchanging()) return false; if (item->GetCount() < count) return false; if (item->IsEquipped()) return false; if (INVENTORY == Cell.window_type && Cell.cell >= INVENTORY_MAX_NUM && IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE)) return false; if (true == item->isLocked()) return false; if (!IsValidItemPosition(DestCell)) { return false; } if (!CanHandleItem()) { if (NULL != DragonSoul_RefineWindow_GetOpener()) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("°ÈâÀ» ¿¬ »óÅ¿¡¼´Â ¾ÆÀÌÅÛÀ» ¿Å±æ ¼ö ¾ø½À´Ï´Ù.")); return false; } // ±âȹÀÚÀÇ ¿äûÀ¸·Î º§Æ® Àκ¥Å丮¿¡´Â ƯÁ¤ ŸÀÔÀÇ ¾ÆÀÌÅÛ¸¸ ³ÖÀ» ¼ö ÀÖ´Ù. if (DestCell.IsBeltInventoryPosition() && false == CBeltInventoryHelper::CanMoveIntoBeltInventory(item)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ ¾ÆÀÌÅÛÀº º§Æ® Àκ¥Å丮·Î ¿Å±æ ¼ö ¾ø½À´Ï´Ù.")); return false; } // ÀÌ¹Ì Âø¿ëÁßÀÎ ¾ÆÀÌÅÛÀ» ´Ù¸¥ °÷À¸·Î ¿Å±â´Â °æ¿ì, 'ÀåÃ¥ ÇØÁ¦' °¡´ÉÇÑ Áö È®ÀÎÇÏ°í ¿Å±è if (Cell.IsEquipPosition() && !CanUnequipNow(item)) return false; if (DestCell.IsEquipPosition()) { if (GetItem(DestCell)) // ÀåºñÀÏ °æ¿ì ÇÑ °÷¸¸ °Ë»çÇصµ µÈ´Ù. { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ¹Ì Àåºñ¸¦ Âø¿ëÇÏ°í ÀÖ½À´Ï´Ù.")); return false; } EquipItem(item, DestCell.cell - INVENTORY_MAX_NUM); } else { if (item->IsDragonSoul()) { if (item->IsEquipped()) { return DSManager::instance().PullOut(this, DestCell, item); } else { if (DestCell.window_type != DRAGON_SOUL_INVENTORY) { return false; } if (!DSManager::instance().IsValidCellForThisItem(item, DestCell)) return false; } } // ¿ëÈ¥¼®ÀÌ ¾Æ´Ñ ¾ÆÀÌÅÛÀº ¿ëÈ¥¼® Àκ¥¿¡ µé¾î°¥ ¼ö ¾ø´Ù. else if (DRAGON_SOUL_INVENTORY == DestCell.window_type) return false; LPITEM item2; if ((item2 = GetItem(DestCell)) && item != item2 && item2->IsStackable() && !IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_STACK) && item2->GetVnum() == item->GetVnum()) // ÇÕÄ¥ ¼ö ÀÖ´Â ¾ÆÀÌÅÛÀÇ °æ¿ì { for (int i = 0; i < ITEM_SOCKET_MAX_NUM; ++i) if (item2->GetSocket(i) != item->GetSocket(i)) return false; if (count == 0) count = item->GetCount(); sys_log(0, "%s: ITEM_STACK %s (window: %d, cell : %d) -> (window:%d, cell %d) count %d", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, count); count = MIN(200 - item2->GetCount(), count); item->SetCount(item->GetCount() - count); item2->SetCount(item2->GetCount() + count); return true; } if (!IsEmptyItemGrid(DestCell, item->GetSize(), Cell.cell)) return false; if (count == 0 || count >= item->GetCount() || !item->IsStackable() || IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK)) { sys_log(0, "%s: ITEM_MOVE %s (window: %d, cell : %d) -> (window:%d, cell %d) count %d", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, count); item->RemoveFromCharacter(); SetItem(DestCell, item); if (INVENTORY == Cell.window_type && INVENTORY == DestCell.window_type) SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, DestCell.cell); } else if (count < item->GetCount()) { //check non-split items //if (LC_IsNewCIBN()) //{ // if (item->GetVnum() == 71095 || item->GetVnum() == 71050 || item->GetVnum() == 70038) // { // return false; // } //} sys_log(0, "%s: ITEM_SPLIT %s (window: %d, cell : %d) -> (window:%d, cell %d) count %d", GetName(), item->GetName(), Cell.window_type, Cell.cell, DestCell.window_type, DestCell.cell, count); item->SetCount(item->GetCount() - count); LPITEM item2 = ITEM_MANAGER::instance().CreateItem(item->GetVnum(), count); // copy socket -- by mhh FN_copy_item_socket(item2, item); item2->AddToCharacter(this, DestCell); char szBuf[51+1]; snprintf(szBuf, sizeof(szBuf), "%u %u %u %u ", item2->GetID(), item2->GetCount(), item->GetCount(), item->GetCount() + item2->GetCount()); LogManager::instance().ItemLog(this, item, "ITEM_SPLIT", szBuf); } } return true; } Best Regards Zerelth Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Vectors 1 Posted December 18, 2014 Author Share Posted December 18, 2014 not fix up Link to comment Share on other sites More sharing options...
Erryas 2 Posted January 2, 2015 Share Posted January 2, 2015 Vectors? can you explain the fixx? Link to comment Share on other sites More sharing options...
sankixd 52 Posted January 7, 2015 Share Posted January 7, 2015 Fixed, add: if (true == pkItem->IsEquipped() && true == CBeltInventoryHelper::IsExistItemInBeltInventory(ch)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Belt> You can't do this.")); return; } under: LPITEM pkItem = ch->GetItem(p->ItemPos); in (input_main.cpp): void CInputMain::SafeboxCheckin(LPCHARACTER ch, const char * c_pData) can anybody test it? Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted January 7, 2015 Former Staff Share Posted January 7, 2015 Wold be nice if explain what you did to solve it. Link to comment Share on other sites More sharing options...
sankixd 52 Posted January 7, 2015 Share Posted January 7, 2015 That. I don't find solve for this bug anywhere, so i do it. Hi guys, how to fix? If You have wear belt, and open safebox, you can put equipped belt into safe box, when in belt inventory are items(potions). I fix it, and you can't only put into safe box belt, when something is in belt inventory.Bug you can see on video. Link to comment Share on other sites More sharing options...
nanoia 56 Posted March 9, 2015 Share Posted March 9, 2015 UP Link to comment Share on other sites More sharing options...
DisLoyalPro 2 Posted March 9, 2015 Share Posted March 9, 2015 Fixed, add: if (true == pkItem->IsEquipped() && true == CBeltInventoryHelper::IsExistItemInBeltInventory(ch)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Belt> You can't do this.")); return; } under: LPITEM pkItem = ch->GetItem(p->ItemPos); in (input_main.cpp): void CInputMain::SafeboxCheckin(LPCHARACTER ch, const char * c_pData) can anybody test it? input_main.cpp:2036: error: 'CBeltInventoryHelper' has not been declared gmake: *** [OBJDIR/input_main.o] Error 1 Wtf? Link to comment Share on other sites More sharing options...
nanoia 56 Posted March 9, 2015 Share Posted March 9, 2015 Fixed, add: if (true == pkItem->IsEquipped() && true == CBeltInventoryHelper::IsExistItemInBeltInventory(ch)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Belt> You can't do this.")); return; } under: LPITEM pkItem = ch->GetItem(p->ItemPos); in (input_main.cpp): void CInputMain::SafeboxCheckin(LPCHARACTER ch, const char * c_pData) can anybody test it? input_main.cpp:2036: error: 'CBeltInventoryHelper' has not been declared gmake: *** [OBJDIR/input_main.o] Error 1 Wtf? add #include "belt_inventory_helper.h" under #include "DragonSoul.h" 3 Link to comment Share on other sites More sharing options...
DisLoyalPro 2 Posted March 9, 2015 Share Posted March 9, 2015 Fixed, add: if (true == pkItem->IsEquipped() && true == CBeltInventoryHelper::IsExistItemInBeltInventory(ch)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Belt> You can't do this.")); return; } under: LPITEM pkItem = ch->GetItem(p->ItemPos); in (input_main.cpp): void CInputMain::SafeboxCheckin(LPCHARACTER ch, const char * c_pData) can anybody test it? input_main.cpp:2036: error: 'CBeltInventoryHelper' has not been declared gmake: *** [OBJDIR/input_main.o] Error 1 Wtf? add #include "belt_inventory_helper.h" under #include "DragonSoul.h" Thanks man... I'm not pay attention for this... Sry my eng! And thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now