Hallo all
system : [Only registered and activated users can see links. Click Here To Register...]
c++ :
open EterPythonLib/PythonSlotWindow.cpp
now open
EterPythonLib/PythonSlotWindow.h
now open :
/EterPythonLib/PythonWindowManagerModule.cpp
now open:
/UserInterface/PythonNetworkStreamPhaseGame.cpp
now python part
open :root/ui.py
open : root/uiinventory.py
ok that's it , have a nice day :)
system : [Only registered and activated users can see links. Click Here To Register...]
c++ :
open EterPythonLib/PythonSlotWindow.cpp
PHP Code:
find
void CSlotWindow::DisableSlot(DWORD dwIndex)
after this function add :
void CSlotWindow::SetUnusableSlot(DWORD dwIndex)
{
TSlot * pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
return;
SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
//pSlot->dwState |= SLOT_STATE_UNUSABLE;
}
void CSlotWindow::SetUsableSlot(DWORD dwIndex)
{
TSlot * pSlot;
if (!GetSlotPointer(dwIndex, &pSlot))
return;
REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
//pSlot->dwState ^= SLOT_STATE_UNUSABLE;
}
now find :
if (rSlot.pFinishCoolTimeEffect)
after this block add ( this part by [COLOR="Red"]xP3NG3Rx [/COLOR]):
if (IS_SET(rSlot.dwState, SLOT_STATE_UNUSABLE))
{
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.3f);
CPythonGraphic::Instance().RenderBar2d(m_rect.left + rSlot.ixPosition,
m_rect.top + rSlot.iyPosition,
m_rect.left + rSlot.ixPosition + rSlot.byxPlacedItemSize * ITEM_WIDTH,
m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize * ITEM_HEIGHT);
}
EterPythonLib/PythonSlotWindow.h
PHP Code:
find : SLOT_STATE_ALWAYS_RENDER_COVER = (1 << 3)
add after it :
SLOT_STATE_UNUSABLE = (1 << 4),
now find : BOOL IsEnableSlot(DWORD dwIndex);
add after it :
void SetUnusableSlot(DWORD dwIndex);
void SetUsableSlot(DWORD dwIndex);
/EterPythonLib/PythonWindowManagerModule.cpp
PHP Code:
find :
PyObject * wndMgrDisableSlot(PyObject * poSelf, PyObject * poArgs)
after this function add :
PyObject * wndMgrSetUnusableSlot(PyObject * poSelf, PyObject * poArgs)
{
UI::CWindow * pWin;
if (!PyTuple_GetWindow(poArgs, 0, &pWin))
return Py_BuildException();
int iSlotIndex;
if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
return Py_BuildException();
if (!pWin->IsType(UI::CSlotWindow::Type()))
return Py_BuildException();
UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
pSlotWin->SetUnusableSlot(iSlotIndex);
return Py_BuildNone();
}
PyObject * wndMgrSetUsableSlot(PyObject * poSelf, PyObject * poArgs)
{
UI::CWindow * pWin;
if (!PyTuple_GetWindow(poArgs, 0, &pWin))
return Py_BuildException();
int iSlotIndex;
if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
return Py_BuildException();
if (!pWin->IsType(UI::CSlotWindow::Type()))
return Py_BuildException();
UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
pSlotWin->SetUsableSlot(iSlotIndex);
return Py_BuildNone();
}
now find :
{ "DisableSlot", wndMgrDisableSlot, METH_VARARGS },
add :
{ "SetUnusableSlot", wndMgrSetUnusableSlot, METH_VARARGS },
{ "SetUsableSlot", wndMgrSetUsableSlot, METH_VARARGS },
/UserInterface/PythonNetworkStreamPhaseGame.cpp
PHP Code:
( thx to [COLOR="red"]martysama0134 [/COLOR])
find : PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "StartExchange", Py_BuildValue("()"));
add after it :
__RefreshInventoryWindow();
open :root/ui.py
PHP Code:
find : def EnableSlot(self, slotIndex):
after this def add :
def SetUnusableSlot(self, slotIndex):
wndMgr.SetUnusableSlot(self.hWnd, slotIndex)
def SetUsableSlot(self, slotIndex):
wndMgr.SetUsableSlot(self.hWnd, slotIndex)
PHP Code:
add
import exchange
find : self.wndCostume = None
add : self.listUnusableSlot = []
find : setItemVNum(i, itemVnum, itemCount)
add :
if exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE):
self.wndItem.SetUnusableSlot(i)
self.listUnusableSlot.append(i)
elif not exchange.isTrading() and item.IsAntiFlag(item.ANTIFLAG_GIVE) and slotNumber in self.listUnusableSlot:
self.wndItem.SetUsableSlot(i)
self.listUnusableSlot.remove(i)
ok that's it , have a nice day :)