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
Bvural41 1
Bvural41
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!

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
{
   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){
    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));

}
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{
   BYTE    header;
   DWORD    dwVID;
   TEquipmentItemSet equips[16];

} TPacketGCViewEquip;
UserInterfacePythonNetworkStreamPhaseGame.cpp aratın:
PHP:
bool CPythonNetworkStream::RecvViewEquipPacket()
Değiştirin;
PHP:
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;
}

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):
    net.SendChatPacket("/observer_exit")
Altına ekleyin;
PHP:
def __OnViewEquipment(self):
    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
    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 fixliyor
root/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):
            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
Son olarak verdiğim dosyaları gerekli yerlere atın
Kanıt:
x0ME54e.jpg



Indexe ekleyin
Kod:
*ekipman
*



teşekkürler
 
Teşekkürler paylaşım için
 
Paylaşım için teşekkürler
 
iyide herkes yapmış zaten kod sıkıntısı kimse çekmemiş o mis gibi sitelere tekrar kodları kopyalayamam :D

ha buraya kopyaladın ha oraya bi fark yok (buraya kopyalayınca tab ayarları bozuluyor.). hem konu görünümü açısından hem kolaylık açısından diyorum.
 
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