Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/19 in all areas

  1. M2 Download Center Download Here ( Internal ) Hi devs! The original equipment viewer is not updated for the new equipments I am thinking of costumes + rings + belt Here is the extended version. Here are my modified files to root and uiscript package, the .py files: uiEquipDialog.py Pastebin ~ MEGA UIScriptEquipmentDialog.py Pastebin ~ MEGA UIScriptCostumeEquipmentDialog.py Pastebin ~ MEGA Ehm yeah this was the easiest part of this, now comin' the serverside and binary parts. Server: 1.) Open gamepacket.h than search for: "typedef struct pakcet_view_equip" and replace all structure with this: typedef struct pakcet_view_equip { BYTE header; DWORD vid; struct { DWORD vnum; BYTE count; long alSockets[ITEM_SOCKET_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM]; } equips[16]; } TPacketViewEquip; PS: lel "pakcet" xD nevermind Save&Close 2.) Open char.cpp and search for this: "void CHARACTER::SendEquipment(LPCHARACTER ch)" and replace the event with this(Thanks ATAG): void CHARACTER::SendEquipment(LPCHARACTER ch) { TPacketViewEquip p; p.header = HEADER_GC_VIEW_EQUIP; p.vid = GetVID(); int pos[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 20, 21, 22, 23 }; for (int i = 0; i < 16; i++) { LPITEM item = GetWear(pos[i]); if (item) { p.equips[i].vnum = item->GetVnum(); p.equips[i].count = item->GetCount(); thecore_memcpy(p.equips[i].alSockets, item->GetSockets(), sizeof(p.equips[i].alSockets)); thecore_memcpy(p.equips[i].aAttr, item->GetAttributes(), sizeof(p.equips[i].aAttr)); } else { p.equips[i].vnum = 0; } } ch->GetDesc()->Packet(&p, sizeof(p)); } Serverside done! - Build! Binary: 1.) Open UserInterfacePacket.h than search for this: "typedef struct pakcet_view_equip" and replace with this: typedef struct pakcet_view_equip { BYTE header; DWORD dwVID; TEquipmentItemSet equips[16]; } TPacketGCViewEquip; PS: we met again with pakcet xD, Save&Close. 2.) Open UserInterfacePythonNetworkStreamPhaseGame.cpp than search for this: "bool CPythonNetworkStream::RecvViewEquipPacket()" and replace with this: bool CPythonNetworkStream::RecvViewEquipPacket() { TPacketGCViewEquip kViewEquipPacket; if (!Recv(sizeof(kViewEquipPacket), &kViewEquipPacket)) return false; PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OpenEquipmentDialog", Py_BuildValue("(i)", kViewEquipPacket.dwVID)); for (int i = 0; i < 16; ++i) { TEquipmentItemSet & rItemSet = kViewEquipPacket.equips[i]; PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogItem", Py_BuildValue("(iiii)", kViewEquipPacket.dwVID, i, rItemSet.vnum, rItemSet.count)); for (int j = 0; j < ITEM_SOCKET_SLOT_MAX_NUM; ++j) PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogSocket", Py_BuildValue("(iiii)", kViewEquipPacket.dwVID, i, j, rItemSet.alSockets[j])); for (int k = 0; k < ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++k) PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetEquipmentDialogAttr", Py_BuildValue("(iiiii)", kViewEquipPacket.dwVID, i, k, rItemSet.aAttr[k].bType, rItemSet.aAttr[k].sValue)); } return true; } Binaryside done! - Build! ---Edit---- Multiple opening bugfix: Open interFaceModule.py and search for this: "def OpenEquipmentDialog(self, vid):" if you found it replace that function with this: def OpenEquipmentDialog(self, vid): if self.equipmentDialogDict.has_key(vid): self.equipmentDialogDict[vid].Destroy() self.CloseEquipmentDialog(vid) dlg = uiEquipmentDialog.EquipmentDialog() dlg.SetItemToolTip(self.tooltipItem) dlg.SetCloseEvent(ui.__mem_func__(self.CloseEquipmentDialog)) dlg.Open(vid) self.equipmentDialogDict[vid] = dlg Show the "View equip" button on the targetbar: Open uitarget.py and check this diff to fix it for yourself: [Hidden Content] ( ----EndEdit---- Ohh I almost forgot, here are the bgs ^^-> ui.7z - MEGA All done, press escape to exit... :')
    1 point
  2. Hello. I have a problem. I added the trading glass system to my server files. But this system only shows the market in which the items are. There are 3 glass. I use a 60006 vnum object (Trading glass+) There is no response when I click on the "Buy" button. I can't buy the items! I'm waiting for your help. Sorry for my bad english. Thanks. Note: I've added system codes by comparing them from a server file.
    1 point
  3. I actualy have this "bug" but the damage is 0 without arrows. Is just one horse skill that use arrows (140) and you can use client check for arrows to fix it. // PythonPlayerSkill.cpp // Search: if (!pSkillData->IsHorseSkill()) { if (__CheckShortArrow(rkSkillInst, *pSkillData)) return false; if (pSkillData->IsNeedBow()) { if (!__HasEnoughArrow()) return false; } } // Replace with: if (!pSkillData->IsHorseSkill() || pSkillData->dwSkillIndex == 140) { if (__CheckShortArrow(rkSkillInst, *pSkillData)) return false; if (pSkillData->IsNeedBow()) { if (!__HasEnoughArrow()) return false; } }
    1 point
  4. cmd_general.cpp ACMD(do_view_equip) { //if (ch->GetGMLevel() <= GM_PLAYER) //return; char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (*arg1) { DWORD vid = 0; str_to_number(vid, arg1); LPCHARACTER tch = CHARACTER_MANAGER::instance().Find(vid); if (!tch) return; if (!tch->IsPC()) return; /* int iSPCost = ch->GetMaxSP() / 3; if (ch->GetSP() < iSPCost) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("정신력이 부족하여 다른 사람의 장비를 볼 수 없습니다.")); return; } ch->PointChange(POINT_SP, -iSPCost); */ tch->SendEquipment(ch); } }
    1 point
  5. Here is a diff to fix it for your problem(uitarget.py). [Hidden Content]
    1 point
×
×
  • 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.