Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I. Client Binary:
- 1.0 EterPythonLib/PythonSlotWindow.cpp
- //Pesquisar por:
- if (!m_pSlotActiveEffect)
- //Substitua por:
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- if (!m_apSlotActiveEffect[0] || !m_apSlotActiveEffect[1] || !m_apSlotActiveEffect[2])
- #else
- if (!m_pSlotActiveEffect)
- #endif
- //Pesquisar por:
- if (m_pSlotActiveEffect)
- m_pSlotActiveEffect->Update();
- //Substitua por:
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- for (int i = 0; i < 3; ++i)
- {
- if (m_apSlotActiveEffect[i])
- m_apSlotActiveEffect[i]->Update();
- }
- #else
- if (m_pSlotActiveEffect)
- m_pSlotActiveEffect->Update();
- #endif
- //Pesquisar por:
- if (rSlot.bActive)
- {
- int ix = m_rect.left + rSlot.ixPosition;
- int iy = m_rect.top + rSlot.iyPosition;
- if (m_pSlotActiveEffect)
- {
- m_pSlotActiveEffect->SetPosition(ix, iy);
- m_pSlotActiveEffect->Render();
- }
- }
- //Substitua por:
- if (rSlot.bActive)
- {
- int ix = m_rect.left + rSlot.ixPosition;
- int iy = m_rect.top + rSlot.iyPosition;
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- int highlight = rSlot.byyPlacedItemSize;
- if (highlight == 1)
- {
- m_apSlotActiveEffect[0]->Show();
- m_apSlotActiveEffect[0]->SetPosition(ix, iy);
- m_apSlotActiveEffect[0]->Render();
- }
- if (highlight == 2)
- {
- m_apSlotActiveEffect[1]->Show();
- m_apSlotActiveEffect[1]->SetPosition(ix, iy);
- m_apSlotActiveEffect[1]->Render();
- }
- if (highlight == 3)
- {
- m_apSlotActiveEffect[2]->Show();
- m_apSlotActiveEffect[2]->SetPosition(ix, iy);
- m_apSlotActiveEffect[2]->Render();
- }
- #else
- if (m_pSlotActiveEffect)
- {
- m_pSlotActiveEffect->SetPosition(ix, iy);
- m_pSlotActiveEffect->Render();
- }
- #endif
- }
- //Pesquisar por:
- void CSlotWindow::__CreateSlotEnableEffect()
- //Substitui a função por isso:
- void CSlotWindow::__CreateSlotEnableEffect()
- {
- __DestroySlotEnableEffect();
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- for (int i = 0; i < 3; ++i)
- {
- CAniImageBox* pEff = new CAniImageBox(NULL);
- for (int j = 0; j <= 12; ++j)
- {
- char buf[64+1];
- sprintf_s(buf, "d:/ymir work/ui/public/slotactiveeffect/slot%d/%02d.sub", (i+1), j);
- pEff->AppendImage(buf);
- }
- pEff->SetRenderingMode(CGraphicExpandedImageInstance::RENDERING_MODE_SCREEN);
- m_apSlotActiveEffect[i] = pEff;
- }
- #else
- m_pSlotActiveEffect = new CAniImageBox(NULL);
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/00.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/01.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/02.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/03.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/04.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/05.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/06.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/07.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/08.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/09.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/10.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/11.sub");
- m_pSlotActiveEffect->AppendImage("d:/ymir work/ui/public/slotactiveeffect/12.sub");
- m_pSlotActiveEffect->SetRenderingMode(CGraphicExpandedImageInstance::RENDERING_MODE_SCREEN);
- m_pSlotActiveEffect->Show();
- #endif
- }
- //Pesquisar por:
- void CSlotWindow::__DestroySlotEnableEffect()
- //Substitui a função por isso:
- void CSlotWindow::__DestroySlotEnableEffect()
- {
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- for (int i = 0; i < 3; ++i)
- {
- if (m_apSlotActiveEffect[i])
- {
- delete m_apSlotActiveEffect[i];
- m_apSlotActiveEffect[i] = NULL;
- }
- }
- #else
- if (m_pSlotActiveEffect)
- {
- delete m_pSlotActiveEffect;
- m_pSlotActiveEffect = NULL;
- }
- #endif
- }
- //Pesquisar por:
- m_pSlotActiveEffect = NULL;
- //Substitua por:
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- for (int i = 0; i < 3; ++i)
- {
- m_apSlotActiveEffect[i] = NULL;
- }
- #else
- m_pSlotActiveEffect = NULL;
- #endif
- 1.1 EterPythonLib/PythonSlotWindow.h
- //Pesquisar por:
- #include "PythonWindow.h"
- //Adiciona antes:
- #include "../UserInterface/Locale_inc.h"
- //Pesquisar por:
- CAniImageBox * m_pSlotActiveEffect;
- //Substitua por:
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- CAniImageBox * m_apSlotActiveEffect[3];
- #else
- CAniImageBox * m_pSlotActiveEffect;
- #endif
- 2.o UserInterface/PythonNetworkStreamPhaseGameItem.cpp
- //Pesquisar por:
- bool CPythonNetworkStream::RecvItemSetPacket2()
- //Substitui a função por isso:
- bool CPythonNetworkStream::RecvItemSetPacket2()
- {
- TPacketGCItemSet2 packet_item_set;
- if (!Recv(sizeof(TPacketGCItemSet2), &packet_item_set))
- return false;
- TItemData kItemData;
- kItemData.vnum = packet_item_set.vnum;
- kItemData.count = packet_item_set.count;
- #ifdef ENABLE_SOULBIND_SYSTEM
- kItemData.bind = packet_item_set.bind;
- #endif
- kItemData.flags = packet_item_set.flags;
- kItemData.anti_flags = packet_item_set.anti_flags;
- for (int i=0; i<ITEM_SOCKET_SLOT_MAX_NUM; ++i)
- kItemData.alSockets[i]=packet_item_set.alSockets[i];
- for (int j=0; j<ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++j)
- kItemData.aAttr[j]=packet_item_set.aAttr[j];
- IAbstractPlayer& rkPlayer=IAbstractPlayer::GetSingleton();
- rkPlayer.SetItemData(packet_item_set.Cell, kItemData);
- if (packet_item_set.highlight)
- PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Highlight_Item", Py_BuildValue("(ii)", packet_item_set.Cell.window_type, packet_item_set.Cell.cell));
- __RefreshInventoryWindow();
- return true;
- }
- 2.1 UserInterface/PythonApplicationModule.cpp
- //Pesquisar por:
- #ifdef ENABLE_COSTUME_SYSTEM
- //adicione abaixo:
- #ifdef ENABLE_HIGHLIGHT_SYSTEM
- PyModule_AddIntConstant(poModule, "ENABLE_HIGHLIGHT_SYSTEM", 1);
- #else
- PyModule_AddIntConstant(poModule, "ENABLE_HIGHLIGHT_SYSTEM", 0);
- #endif
- 2.2 UserInterface/Locale_inc.h
- //Adicionar:
- #define ENABLE_HIGHLIGHT_SYSTEM
- II. Src game
- 1.0 Common/service.h
- //Adicionar:
- #define __HIGHLIGHT_SYSTEM__
- 2.0 Game/Src/item.h
- //Pesquisar por:
- bool AddToCharacter(LPCHARACTER ch, TItemPos Cell);
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- bool AddToCharacter(LPCHARACTER ch, TItemPos Cell, bool isHighLight = true);
- #else
- bool AddToCharacter(LPCHARACTER ch, TItemPos Cell);
- #endif
- 2.1 Game/Src/item.cpp
- //Pesquisar por:
- bool CItem::AddToCharacter(LPCHARACTER ch, TItemPos Cell)
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- bool CItem::AddToCharacter(LPCHARACTER ch, TItemPos Cell, bool isHighLight)
- #else
- bool CItem::AddToCharacter(LPCHARACTER ch, TItemPos Cell)
- #endif
- //Pesquisar por:
- ch->SetItem(TItemPos(window_type, pos), this);
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- ch->SetItem(TItemPos(window_type, pos), this, isHighLight);
- #else
- ch->SetItem(TItemPos(window_type, pos), this);
- #endif
- 2.2 Game/Src/char_item.cpp
- //Pesquisar por:
- void CHARACTER::SetItem(TItemPos Cell, LPITEM pItem)
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- void CHARACTER::SetItem(TItemPos Cell, LPITEM pItem, bool isHighLight)
- #else
- void CHARACTER::SetItem(TItemPos Cell, LPITEM pItem)
- #endif
- //Pesquisar por:
- pack.highlight = (Cell.window_type == DRAGON_SOUL_INVENTORY);
- //Substitua por:
- if (isHighLight)
- pack.highlight = true;
- else
- pack.highlight = (Cell.window_type == DRAGON_SOUL_INVENTORY);
- #else
- pack.highlight = (Cell.window_type == DRAGON_SOUL_INVENTORY);
- #endif
- //Pesquisar por:
- SetItem(TItemPos (INVENTORY, INVENTORY_MAX_NUM + bCell), item);
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- SetItem(TItemPos (INVENTORY, INVENTORY_MAX_NUM + bCell), item, false);
- #else
- SetItem(TItemPos (INVENTORY, INVENTORY_MAX_NUM + bCell), item);
- #endif
- //Pesquisar por:
- item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell), false);
- #else
- item2->AddToCharacter(this, TItemPos(INVENTORY, bInvenCell));
- #endif
- //Pesquisar por:
- item1->AddToCharacter(this, TItemPos(INVENTORY, bCell2));
- item2->AddToCharacter(this, TItemPos(INVENTORY, bCell1));
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- item1->AddToCharacter(this, TItemPos(INVENTORY, bCell2), false);
- item2->AddToCharacter(this, TItemPos(INVENTORY, bCell1), false);
- #else
- item1->AddToCharacter(this, TItemPos(INVENTORY, bCell2));
- item2->AddToCharacter(this, TItemPos(INVENTORY, bCell1));
- #endif
- //Pesquisar por:
- item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, pos));
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, pos), false);
- #else
- item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, pos));
- #endif
- //Pesquisar por:
- item->AddToCharacter(this, TItemPos(INVENTORY, pos));
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- item->AddToCharacter(this, TItemPos(INVENTORY, pos), false);
- #else
- item->AddToCharacter(this, TItemPos(INVENTORY, pos));
- #endif
- 2.3 Game/Src/char.h
- //Pesquisar por:
- void SetItem(TItemPos Cell, LPITEM item);
- //Substitua por:
- #ifdef __HIGHLIGHT_SYSTEM__
- void SetItem(TItemPos Cell, LPITEM item, bool isHighLight = false);
- #else
- void SetItem(TItemPos Cell, LPITEM item);
- #endif
- III. Client Root
- 1.0 Root/uiinventory.py
- //Pesquisar por:
- self.wndCostume = None
- //Mai jos Adicionar:
- if app.ENABLE_HIGHLIGHT_SYSTEM:
- self.listHighlightedSlot = []
- //Pesquisar por:
- def Close(self):
- //Mai jos Adicionar:
- if app.ENABLE_HIGHLIGHT_SYSTEM:
- def HighlightSlot(self, slot):
- if not slot in self.listHighlightedSlot:
- self.listHighlightedSlot.append(slot)
- //Pesquisar por:
- self.wndItem.DeactivateSlot(i)
- //Mai jos Adicionar:
- elif app.ENABLE_HIGHLIGHT_SYSTEM:
- if slotNumber in self.listHighlightedSlot:
- self.wndItem.ActivateSlot(i)
- //Pesquisar por:
- def OverInItem(self, overSlotPos):
- //După:
- overSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
- //adicione abaixo:
- if app.ENABLE_HIGHLIGHT_SYSTEM:
- stat = 0
- slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
- itemVnum = player.GetItemIndex(slotNumber)
- if constInfo.IS_AUTO_POTION(itemVnum):
- metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
- if slotNumber >= player.INVENTORY_PAGE_SIZE:
- slotNumber -= player.INVENTORY_PAGE_SIZE
- isActivated = 0 != metinSocket[0]
- if isActivated:
- stat = 1
- elif constInfo.IS_ACCE_ITEM(itemVnum, 1) == TRUE:
- metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
- isActivated = metinSocket[0]
- if isActivated == 1:
- stat = 1
- if not stat:
- self.wndItem.DeactivateSlot(overSlotPos)
- try:
- self.listHighlightedSlot.remove(slotNumber)
- except:
- pass
- 1.1 Root/interfacemodule.py
- //Pesquisar por:
- def Highligt_Item(self, inven_type, inven_pos):
- //Substitui a função por isso:
- def Highligt_Item(self, inven_type, inven_pos):
- if not app.ENABLE_HIGHLIGHT_SYSTEM:
- if player.DRAGON_SOUL_INVENTORY == inven_type:
- if app.ENABLE_DRAGON_SOUL_SYSTEM:
- self.wndDragonSoul.HighlightSlot(inven_pos)
- else:
- if inven_type == player.INVENTORY:
- self.wndInventory.HighlightSlot(inven_pos)
- elif inven_type == player.DRAGON_SOUL_INVENTORY:
- if app.ENABLE_DRAGON_SOUL_SYSTEM:
- self.wndDragonSoul.HighlightSlot(inven_pos)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement