Jump to content

specks97

Inactive Member
  • Posts

    1
  • Joined

  • Last visited

  • Feedback

    0%

About specks97

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

specks97's Achievements

Contributor

Contributor (5/16)

  • One Year In
  • Conversation Starter
  • One Month Later
  • Dedicated
  • Week One Done

Recent Badges

0

Reputation

  1. using this [Hidden Content] marty 5.8, if i try to use faststack to stack a item in belt inventory it causes the core to crash. how i include the beltinventory? #ifdef FAST_ITEM_AUTOSTACK bool CHARACTER::FastStack(TItemPos originPos) { if (!IsValidItemPosition(originPos)) return false; if (!CanHandleItem()) return false; LPITEM item = GetItem(originPos); if (item == nullptr) return false; if (item->GetCount() >= ITEM_MAX_COUNT) { ChatPacket(CHAT_TYPE_INFO, "ITEM MAX"); return false; } int currentPos = originPos.cell + 1; while (item->GetCount() < ITEM_MAX_COUNT && (originPos.cell != currentPos)) { LPITEM item2 = GetInventoryItem(currentPos); if (item2) { if (item2->GetVnum() == item->GetVnum()) { if (item2->GetCount() < ITEM_MAX_COUNT) { int itemCount = item->GetCount(); int item2Count = item2->GetCount(); if (itemCount + item2Count > ITEM_MAX_COUNT) { int requiredCountToMax = (ITEM_MAX_COUNT - itemCount); MoveItem(TItemPos(INVENTORY, item2->GetCell()), originPos, requiredCountToMax); } else { MoveItem(TItemPos(INVENTORY, item2->GetCell()), originPos, item2->GetCount()); } } } } currentPos++; if (currentPos >= ITEM_MAX_COUNT) { currentPos = 0; } } return true; } #endif
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.