Fethi Polat 1
Fethi Polat
ShadowFon 1
ShadowFon
bikral 1
bikral
-TuRKuaZ- 1
-TuRKuaZ-
SLyFeLLowTR 1
SLyFeLLowTR
TGamesZeus 1
TGamesZeus
Best Studio 1
Best Studio
berkmenoo 1
berkmenoo
InfernoShade 1
InfernoShade
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Agora Metin2 1
Agora Metin2
Hikaye Ekle

40K Envanter Görüntüleme Sistemi(Kostüm,Kemer Dahil)[C++,PYTHON]

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

kostüm silah sistemin uyumsuzluk var ait olduğu yere almak için güncel kod paylaşabilirmisin

qjQMOZ.jpg

font hatasiz vs ypmssn rica etsem alintilarmisn
 
teşekkürler
 
Gamesrc/packet.h açılır aratılır:
PHP:
typedef struct pakcet_view_equip
Kod bloğu değişilir;
PHP:
typedef struct pakcet_view_equip[/COLOR][/B][/FONT][/CENTER]
[FONT=Verdana][B][COLOR=#0000cd]
[CENTER]{
BYTE header;
DWORD vid;
struct {
DWORD vnum;
BYTE count;
long alSockets[ITEM_SOCKET_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
} equips[16];

} TPacketViewEquip;

Char.cpp aratılır:
PHP:
void CHARACTER::SendEquipment(LPCHARACTER ch)
Kod bloğu değiştirilir;
Kod:
void CHARACTER::SendEquipment(LPCHARACTER ch){
Kod:
[/COLOR][/B][/CENTER]
[B][COLOR=#0000cd]
[CENTER][FONT=Verdana]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();[/FONT]


[FONT=Verdana]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));[/FONT]

[FONT=Verdana]}[/FONT][/COLOR]

Gamesrc bitti
Clientsrc/Userınterface/packet.h aratılır:

PHP:
typedef struct pakcet_view_equip
Kod bloğu değiştirilir;
PHP:
typedef struct pakcet_view_equip{[/COLOR][/B][/FONT][/COLOR][/COLOR][/CENTER]
[COLOR=#0000cd][COLOR=#BB0000][FONT=Verdana][B][COLOR=#0000cd]
[CENTER]BYTE header;
DWORD dwVID;
TEquipmentItemSet equips[16];

} TPacketGCViewEquip;

UserInterfacePythonNetworkStreamPhaseGame.cpp aratın:
PHP:
bool CPythonNetworkStream::RecvViewEquipPacket()
Değiştirin;
PHP:
bool CPythonNetworkStream::RecvViewEquipPacket()[/FONT][/COLOR][/COLOR][/CENTER]
[COLOR=#0000cd][COLOR=#BB0000][FONT=Verdana]
[CENTER]{
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;
}

Clientsrcde bitti
root/uitarget.py aratın:
PHP:
self.buttonDict[localeInfo.TARGET_BUTTON_EXIT_OBSERVER].SAFE_SetEvent(self.__OnExitObserver)
Altına ekle:
PHP:
self.buttonDict[localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT].SAFE_SetEvent(self.__OnViewEquipment)
uitargetin ilk başındaki:
PHP:
BUTTON_NAME_LIST = (
Aralarına ekleyin;
PHP:
localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT,
Aratın:
PHP:
def __OnExitObserver(self):[/FONT][/COLOR][/B][/B][/COLOR][/COLOR][/CENTER]
[COLOR=#0000cd][COLOR=#BB0000][B][B][COLOR=#BB0000][FONT=Verdana]
[CENTER]net.SendChatPacket("/observer_exit")

Altına ekleyin;
PHP:
def __OnViewEquipment(self):[/FONT][/COLOR][/B][/B][/COLOR][/COLOR][/CENTER]
[COLOR=#0000cd][COLOR=#BB0000][B][B][COLOR=#BB0000][FONT=Verdana]
[CENTER]net.SendChatPacket("/view_equip " + str(self.vid))

Aratın:
PHP:
def ShowDefaultButton(self):
Kod bloğunu değiştirin;
PHP:
def ShowDefaultButton(self): self.isShowButton = TRUE[/FONT][/COLOR][/COLOR][/CENTER]
[COLOR=#0000cd][COLOR=#BB0000][FONT=Verdana]
[CENTER]self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_WHISPER])
self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_EXCHANGE])
self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_FIGHT])
self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT])
self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_EMOTION_ALLOW])
for button in self.showingButtonList:
button.Show()

Bir bug var onuda fixliyelim sürekli açabiliyorsunuz bu onu fixliyorroot/interfacemodule.py aratın:
Kod:
[COLOR=#000088][FONT=monospace]def[/FONT][/COLOR][COLOR=#660066][FONT=monospace]OpenEquipmentDialog[/FONT][/COLOR][COLOR=#666600][FONT=monospace]([/FONT][/COLOR][COLOR=#000088][FONT=monospace]self[/FONT][/COLOR][COLOR=#666600][FONT=monospace],[/FONT][/COLOR][COLOR=#000000][FONT=monospace] vid[/FONT][/COLOR][COLOR=#666600][FONT=monospace]):[/FONT][/COLOR]
Değiştirin;
Kod:
def OpenEquipmentDialog(self, vid): if self.equipmentDialogDict.has_key(vid):
Kod:
[/COLOR][/CENTER]
[COLOR=#0000cd]
[CENTER][COLOR=#BB0000][FONT=Verdana]self.equipmentDialogDict[vid].Destroy()
self.CloseEquipmentDialog(vid)[/FONT][/COLOR]


[COLOR=#BB0000][FONT=Verdana]dlg = uiEquipmentDialog.EquipmentDialog()
dlg.SetItemToolTip(self.tooltipItem)
dlg.SetCloseEvent(ui.__mem_func__(self.CloseEquipm entDialog))
dlg.Open(vid)[/FONT][/COLOR]



[COLOR=#BB0000][FONT=Verdana]self.equipmentDialogDict[vid] = dlg[/FONT][/COLOR]

Son olarak verdiğim dosyaları gerekli yerlere atın
Kanıt:
x0ME54e.jpg





Indexe ekleyin
Kod:
[COLOR=#BB0000][FONT=Verdana]*ekipman*[/FONT][/COLOR]


Sorunsuz Eklendi Fakat Kemer Hariç Herşey Sorunsuz Kemer gözükmüyor Neden ?
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst