Jump to content

psycho93

Inactive Member
  • Posts

    3
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by psycho93

  1. rename in uichestdrop should go

    On 12/7/2019 at 7:30 PM, Mali said:

    thanks for topic here is auto adaptable codes and some improvings..

    #ifdef ENABLE_SHOW_CHEST_DROP
    #include "../../libgame/include/grid.h"
    void ITEM_MANAGER::GetChestItemList(DWORD dwChestVnum, std::vector<TChestDropInfoTable>& vec_item, int& sizee)
    {
    	const auto pGroup = GetSpecialItemGroup(dwChestVnum);
    	if (!pGroup)
    		return;
    	std::vector<std::unique_ptr<CGrid>> pGrids;
    	pGrids.emplace_back(std::make_unique<CGrid>(15, 5));
    	
    	for (int i = 0; i < pGroup->GetGroupSize(); i++) {
    		const auto itemTable = GetTable(pGroup->GetVnum(i));
    		//pass if exp, yang or duplicate item
    		if (!itemTable || !itemTable->dwVnum || itemTable->dwVnum < 3 || std::find_if(vec_item.begin(), vec_item.end(), [&pGroup, &i](const TChestDropInfoTable& data) -> bool { return static_cast<DWORD>(pGroup->GetVnum(i)) == data.dwItemVnum; }) != vec_item.end())
    			continue;
    		bool PushNewGrid = true;
    		for (size_t iPage = 0; iPage < pGrids.size(); iPage++) {
    			const auto iPos = pGrids.at(iPage)->FindBlank(1, static_cast<int>(itemTable->bSize));
    			if (iPos >= 0) {
    				pGrids.at(iPage)->Put(iPos, 1, static_cast<int>(itemTable->bSize));
    				vec_item.push_back({ static_cast<BYTE>(iPage+1), static_cast<BYTE>(iPos), static_cast<DWORD>(pGroup->GetVnum(i)), static_cast<BYTE>(pGroup->GetCount(i)) });
    				PushNewGrid = false;
    				break;
    			}
    		}
    		if (PushNewGrid) {
    			pGrids.emplace_back(std::make_unique<CGrid>(15, 5));
    			i--;//again
    		}
    	}
    }
    #endif

     

    does it work with c ++ 11?

  2. On 7/21/2019 at 5:29 PM, nonnorulez said:

    Ty man, ho seguito il tuo consiglio e i syserrs ora dicono:

    image.thumb.png.530c372b4ab3c2421c99d7315b2e5e36.png

    Ho provato a scrivere "import uiToolTip" su uiinventory.py

    Ma ho questo errore:

    image.png.52dc24d67f7a2c033bdf0d7bc4b4f657.png

     

    Come posso risolvere? Grazie a tutti per consigli e disponibilità.

    you have resolved???

×
×
  • 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.