Jump to content

Resist0

Inactive Member
  • Posts

    60
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Resist0

  1. 14 hours ago, Mali61 said:
    Spoiler
    
    
    std::sort(vec_item.begin(), vec_item.end()); // vnum1 < vnum2
    	std::sort(vec_item.begin(), vec_item.end(), [](const std::pair<int, int>& f, const std::pair<int, int>& s) { return ITEM_MANAGER::instance().IsItemMetin(f.first) > ITEM_MANAGER::instance().IsItemMetin(s.first); });

     

    Where adding this ? i tried before 

     

    return vec_item.size();

     

    in CreateDropItemVector func

  2. 0125 20:23:47103 :: 
    uiInventory.py(line:743) __LoadWindow
    ui.py(line:4249) GetChild
    
    InventoryWindow.LoadWindow.BindObject - <type 'exceptions.KeyError'>:'Money_Icon'
    
    0125 20:23:47103 :: ============================================================================================================
    0125 20:23:47103 :: Abort!!!!

    Have this error

  3. PythonSlotWindow.cpp
    
    #ifdef WJ_ENABLE_TRADABLE_ICON
    void CSlotWindow::SetCanMouseEventSlot(DWORD dwIndex)
    {
    	TSlot* pSlot;
    	if (!GetSlotPointer(dwIndex, &pSlot))
    		return;
    
    	REMOVE_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
    	//pSlot->dwState |= SLOT_STATE_CANT_MOUSE_EVENT;
    }
    
    void CSlotWindow::SetCantMouseEventSlot(DWORD dwIndex)
    {
    	TSlot* pSlot;
    	if (!GetSlotPointer(dwIndex, &pSlot))
    		return;
    
    	SET_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
    	//pSlot->dwState ^= SLOT_STATE_CANT_MOUSE_EVENT;
    }
    
    void CSlotWindow::SetUsableSlotOnTopWnd(DWORD dwIndex)
    {
    	TSlot* pSlot;
    	if (!GetSlotPointer(dwIndex, &pSlot))
    		return;
    
    	REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
    	//pSlot->dwState |= SLOT_STATE_UNUSABLE;
    }
    
    void CSlotWindow::SetUnusableSlotOnTopWnd(DWORD dwIndex)
    {
    	TSlot* pSlot;
    	if (!GetSlotPointer(dwIndex, &pSlot))
    		return;
    
    	SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
    	//pSlot->dwState ^= SLOT_STATE_UNUSABLE;
    }
    #endif

    Forgot this. i´m dumb.

     

    But for those who are dumb too ;)

     

    kind regards

  4. 90e2070665b570847700025fdb3b1ff6.png

    PythonSlotWindow.h
    
    #ifdef WJ_ENABLE_TRADABLE_ICON
    	void SetCanMouseEventSlot(DWORD dwIndex);
    	void SetCantMouseEventSlot(DWORD dwIndex);
    	void SetUsableSlotOnTopWnd(DWORD dwIndex);
    	void SetUnusableSlotOnTopWnd(DWORD dwIndex);
    #endif
    
    
    PythonWindowManagerModule.cpp
      
      #ifdef WJ_ENABLE_TRADABLE_ICON
    PyObject* wndMgrSetCanMouseEventSlot(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWnd;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
    		return Py_BuildException();
    
    	int iSlotIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
    		return Py_BuildException();
    
    	if (!pWnd->IsType(UI::CSlotWindow::Type()))
    		return Py_BuildException();
    
    	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
    	pSlotWnd->SetCanMouseEventSlot(iSlotIndex);
    	return Py_BuildNone();
    }
    
    PyObject* wndMgrSetCantMouseEventSlot(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWnd;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
    		return Py_BuildException();
    
    	int iSlotIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
    		return Py_BuildException();
    
    	if (!pWnd->IsType(UI::CSlotWindow::Type()))
    		return Py_BuildException();
    
    	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
    	pSlotWnd->SetCantMouseEventSlot(iSlotIndex);
    	return Py_BuildNone();
    }
    
    PyObject* wndMgrSetUsableSlotOnTopWnd(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWnd;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
    		return Py_BuildException();
    
    	int iSlotIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
    		return Py_BuildException();
    
    	if (!pWnd->IsType(UI::CSlotWindow::Type()))
    		return Py_BuildException();
    
    	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
    	pSlotWnd->SetUsableSlotOnTopWnd(iSlotIndex);
    	return Py_BuildNone();
    }
    
    PyObject* wndMgrSetUnusableSlotOnTopWnd(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow* pWnd;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
    		return Py_BuildException();
    
    	int iSlotIndex;
    	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
    		return Py_BuildException();
    
    	if (!pWnd->IsType(UI::CSlotWindow::Type()))
    		return Py_BuildException();
    
    	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
    	pSlotWnd->SetUnusableSlotOnTopWnd(iSlotIndex);
    	return Py_BuildNone();
    }
    #endif

    Hello i dont know this error. i try to fix it for about 2 hours but it wont go away. please help

     

    kind regards

     

  5. Am 2.2.2019 um 14:14 schrieb Pablo Escopăr:

    I have a problem, everything is added withotu syserr, perfect compiled but when i click "Destroy" nothing happends...

    Search:

    itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))

    itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))

    paste:

    itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))

    under it.

     

    Because this is 2x existing :

     

    if player.SLOT_TYPE_INVENTORY == attachedType:
    				dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
    
    				item.SelectItem(dropItemIndex)
    				dropItemName = item.GetItemName()
    
    				## Question Text
    				questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
    
    				## Dialog
    				itemDropQuestionDialog = uiCommon.QuestionDialogItem()
    				itemDropQuestionDialog.SetText(questionText)
    				itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
    				itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
    				itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
    				itemDropQuestionDialog.Open()
    				itemDropQuestionDialog.dropType = attachedType
    				itemDropQuestionDialog.dropNumber = attachedItemSlotPos
    				itemDropQuestionDialog.dropCount = attachedItemCount
    				self.itemDropQuestionDialog = itemDropQuestionDialog
    
    				constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
    			elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
    				dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
    
    				item.SelectItem(dropItemIndex)
    				dropItemName = item.GetItemName()
    
    				## Question Text
    				questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
    
    				## Dialog
    				itemDropQuestionDialog = uiCommon.QuestionDialogItem()
    				itemDropQuestionDialog.SetText(questionText)
    				itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
    				itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
    				itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
    				itemDropQuestionDialog.Open()
    				itemDropQuestionDialog.dropType = attachedType
    				itemDropQuestionDialog.dropNumber = attachedItemSlotPos
    				itemDropQuestionDialog.dropCount = attachedItemCount
    				self.itemDropQuestionDialog = itemDropQuestionDialog
    
    				constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

     

     

    kind regards.

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