Jump to content

Efeito de icone +0 até +9


WLN
 Share

Recommended Posts

abrir eterPythonLib/PythonSlotWindow.h e procurar por

 

CGraphicImageInstance * pInstance;

adicionar abaixo

CGraphicImageInstance * pInstanceLevel;

procurar por 

void Destroy();

adicionar abaixo

void SetSlotLevelImage(DWORD dwIndex, CGraphicImage * levelImage);

abrir eterPythonLib/PythonSlotWindow.cpp e procurar por

Slot.pFinishCoolTimeEffect = NULL;

adicionar abaixo 

Slot.pInstanceLevel = NULL;

procurar por

void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)

adicionar antes:

void CSlotWindow::SetSlotLevelImage(DWORD dwIndex, CGraphicImage * levelImage)
{
   TSlot * pSlot;
   if (!GetSlotPointer(dwIndex, &pSlot) || !levelImage)
      return;
   assert(NULL == pSlot->pInstanceLevel);
   pSlot->pInstanceLevel = CGraphicImageInstance::New();
   pSlot->pInstanceLevel->SetDiffuseColor(1.0, 1.0, 1.0, 1.0);
   pSlot->pInstanceLevel->SetImagePointer(levelImage);

}

procurar por:

pSlot->dwCenterSlotNumber = 0xffffffff;

adicionar abaixo

if (pSlot->pInstanceLevel)
{
   CGraphicImageInstance::Delete(pSlot->pInstanceLevel);
   pSlot->pInstanceLevel = NULL;
}

procurar por

if (rSlot.bActive)

adicionar antes

if (rSlot.pInstanceLevel)
{
   rSlot.pInstanceLevel->SetPosition(m_rect.left + rSlot.ixPosition, (m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize*ITEM_HEIGHT) - 32);
   rSlot.pInstanceLevel->Render();
}

abrir eterPythonLib/PythonWindowManagerModule.cpp e procurar por

void initwndMgr()

adicionar antes

PyObject * wndMgrSetSlotImage(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();

   char * szImagePath;
   if (!PyTuple_GetString(poArgs, 2, &szImagePath))
      return Py_BuildException();

   if (!pWin->IsType(UI::CSlotWindow::Type()))
      return Py_BuildException();

   UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
   CGraphicImage * pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(szImagePath);
   if (!pImage)
      return Py_BuildException();
   pSlotWin->SetSlotLevelImage(iSlotIndex, pImage);
   return Py_BuildNone();

}

procurar por 

{ "ShowOverInWindowName",        wndMgrShowOverInWindowName,            METH_VARARGS },

adicionar abaixo

{ "SetSlotLevelImage",            wndMgrSetSlotImage,                    METH_VARARGS },

abra root/ui.py e procure por

wndMgr.SetSlotCount(self.hWnd, renderingSlotNumber, ItemCount)

adicione 

####Item level text/icon ###
      itemName=item.GetItemName().strip()
      itemNameP=item.GetItemName().rfind('+')
      if itemNameP>0 and len(itemName)>itemNameP+1:
         level=itemName[itemNameP+1:]
         if level.isdigit():
            wndMgr.SetSlotLevelImage(self.hWnd, renderingSlotNumber, ("icon/level/%d.tga"%int(level)))
####Item level text/icon END ###

na função, ficando assim

	def SetItemSlot(self, renderingSlotNumber, ItemIndex, ItemCount = 0, diffuseColor = (1.0, 1.0, 1.0, 1.0)):
		if 0 == ItemIndex or None == ItemIndex:
			wndMgr.ClearSlot(self.hWnd, renderingSlotNumber)
			return

		item.SelectItem(ItemIndex)
		itemIcon = item.GetIconImage()

		item.SelectItem(ItemIndex)
		(width, height) = item.GetItemSize()

		wndMgr.SetSlot(self.hWnd, renderingSlotNumber, ItemIndex, width, height, itemIcon, diffuseColor)
		wndMgr.SetSlotCount(self.hWnd, renderingSlotNumber, ItemCount)
####Item level text/icon ###
		itemName=item.GetItemName().strip()
		itemNameP=item.GetItemName().rfind('+')
		if itemNameP>0 and len(itemName)>itemNameP+1:
			level=itemName[itemNameP+1:]
			if level.isdigit():
				wndMgr.SetSlotLevelImage(self.hWnd, renderingSlotNumber, ("icon/level/%d.tga"%int(level)))
####Item level text/icon END ###

 

icon +0 and +9.7z

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...