Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iloligemov.cpp:
- bool CExchange::CheckSpace()
- {
- static CGrid s_grid1(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 1 9 Rows a 5 Columns
- static CGrid s_grid2(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 2 9 Rows a 5 Columns
- static CGrid s_grid3(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 3 9 Rows a 5 Columns
- static CGrid s_grid4(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 4 9 Rows a 5 Columns
- s_grid1.Clear();
- s_grid2.Clear();
- s_grid3.Clear();
- s_grid4.Clear();
- LPCHARACTER victim = GetCompany()->GetOwner();
- LPITEM item;
- int i;
- const int perPageSlotCount = INVENTORY_MAX_NUM / 4;
- for (i = 0; i < INVENTORY_MAX_NUM; ++i) {
- if (!(item = victim->GetInventoryItem(i)))
- continue;
- BYTE itemSize = item->GetSize();
- if (i < perPageSlotCount) //
- s_grid1.Put(i, 1, itemSize);
- else if (i < perPageSlotCount * 2)
- s_grid2.Put(i - perPageSlotCount, 1, itemSize);
- else if (i < perPageSlotCount * 3)
- s_grid3.Put(i - perPageSlotCount * 2, 1, itemSize);
- else
- s_grid4.Put(i - perPageSlotCount * 3, 1, itemSize);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement