SHOW_CHEST_DROP_SYSTEM

enes turan

MT Üye
MT Üye
Mesaj
236
Çözümler
9
Beğeni
82
Puan
464
Ticaret Puanı
0
Merhabalar Sistemi Filesten Söküp Biraz Değiştirdim Paylaşmak İstedim Hayırlı Olsun. :)

Not: Açılmayan Sandıkların uiinventorydeki sandık kodları gibi ekleme yapın.


Anlatım Dosyada Mevcut.
Linkleri görebilmek için giriş yap veya kayıt ol.


Linkleri görebilmek için giriş yap veya kayıt ol.



Kanıt:


K Envanter Kullananlar için uyarlama​

uiinventory.py:
#aratılır
if app.WJ_SPLIT_INVENTORY_SYSTEM:
    class ExtendedInventoryWindow(ui.ScriptWindow):
#altında Bulunur

                constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

#Altına eklenir
            elif app.IsPressed(app.DIK_LSHIFT):
                if player.GetItemTypeBySlot(slotIndex) == item.ITEM_TYPE_GIFTBOX and\
                    ItemVNum != 31374 and ItemVNum != 50255 and\
                    ItemVNum != 50187 and ItemVNum != 50197 and\
                    ItemVNum != 50188 and ItemVNum != 50189 and\
                    ItemVNum != 50190 and ItemVNum != 50191 and\
                    ItemVNum != 50192 and ItemVNum != 50193 and\
                    ItemVNum != 50194 and ItemVNum != 50195:
                    if app.ENABLE_SHOW_CHEST_DROP_SYSTEM:
                        if self.interface:
                            if self.interface.dlgChestDrop:
                                if not self.interface.dlgChestDrop.IsShow():
                                    self.interface.dlgChestDrop.Open(slotIndex)
                                    net.SendChestDropInfo(slotIndex)

gamesrc input_main.cpp:
//kod bloğu değiştirilir

#ifdef ENABLE_SHOW_CHEST_DROP_SYSTEM
void CInputMain::ChestDropInfo(LPCHARACTER ch, const char* c_pData)
{
    TPacketCGChestDropInfo* p = (TPacketCGChestDropInfo*)c_pData;
    if (!ch)
        return;
    if (p->wInventoryCell >= INVENTORY_AND_EQUIP_SLOT_MAX)
        return;
    LPITEM pkItem = ch->GetBoxInventoryItem(p->wInventoryCell);
    if (!pkItem)
        return;
    std::vector<TChestDropInfoTable> vec_ItemList;
    ITEM_MANAGER::instance().GetChestItemList(pkItem->GetVnum(), vec_ItemList);
    if (vec_ItemList.size() == 0)
        return;
    TPacketGCChestDropInfo packet;
    packet.bHeader = HEADER_GC_CHEST_DROP_INFO;
    packet.wSize = sizeof(packet) + sizeof(TChestDropInfoTable) * vec_ItemList.size();
    packet.dwChestVnum = pkItem->GetVnum();
    ch->GetDesc()->BufferedPacket(&packet, sizeof(packet));
    ch->GetDesc()->Packet(&vec_ItemList[0], sizeof(TChestDropInfoTable) * vec_ItemList.size());
}
#endif

#############################################################################################################
bk, gözlem bandı toltip gözükmeme sorunu çözüm​
root/uitooltip.py:
#arat

class ItemToolTip(ToolTip):
    
#altına ekle

    isStone = False
    isBook = False
    isBook2 = False
    
#arat
    def AddItemData(self
                    ...
                    ...
        elif 70055 == itemVnum:
            if 0 != metinSlot:
                self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILL_FORGET_BOOK_NAME, 0)
                self.AppendDescription(item.GetItemDescription(), 26)
                self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
                self.ShowToolTip()
            return
###########################################################
                    
#buraya kadar değiştir
    def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, flags = 0, unbindTime = 0, window_type = player.INVENTORY, slotIndex = -1, preview = 1, transmutation = -1):
        self.itemVnum = itemVnum
        item.SelectItem(itemVnum)
        itemType = item.GetItemType()
        itemSubType = item.GetItemSubType()

        if 50026 == itemVnum:
            if 0 != metinSlot:
                name = item.GetItemName()
                if metinSlot[0] > 0:
                    name += " "
                    name += localeInfo.NumberToMoneyString(metinSlot[0])
                self.SetTitle(name)
                self.__AppendSealInformation(window_type, slotIndex) ## cyh itemseal 2013 11 11
                self.ShowToolTip()
            return

        ### Skill Book ###
        elif 50300 == itemVnum:
            if 0 != metinSlot and not self.isBook:
                self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILLBOOK_NAME, 1)
                self.ShowToolTip()
            elif self.isBook:
                self.SetTitle(item.GetItemName())
                self.AppendDescription(item.GetItemDescription(), 26)
                self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
                self.ShowToolTip()
            return
        elif 70037 == itemVnum:
            if 0 != metinSlot and not self.isBook2:
                self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILL_FORGET_BOOK_NAME, 0)
                self.AppendDescription(item.GetItemDescription(), 26)
                self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
                self.ShowToolTip()
            elif self.isBook2:
                self.SetTitle(item.GetItemName())
                self.AppendDescription(item.GetItemDescription(), 26)
                self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
                self.ShowToolTip()
            return
        elif 70055 == itemVnum:
            if 0 != metinSlot:
                self.__SetSkillBookToolTip(metinSlot[0], localeInfo.TOOLTIP_SKILL_FORGET_BOOK_NAME, 0)
                self.AppendDescription(item.GetItemDescription(), 26)
                self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
                self.ShowToolTip()
            return

root/uichestdrop.py:
#aratılır
    def OverInItem(self, slotIndex):
#kod bloğunu değiştir
    def OverInItem(self, slotIndex):
        if mouseModule.mouseController.isAttached():
            return

        if not self.chestDrop.has_key(self.currentChest):
            return

        if not self.chestDrop[self.currentChest].has_key(self.currentPage):
            return

        if 0 != self.tooltipItem:
            item.SelectItem(self.chestDrop[self.currentChest][self.currentPage][slotIndex][0])
            if item.GetItemType() == item.ITEM_TYPE_METIN:
                self.tooltipItem.isStone = True
                self.tooltipItem.isBook = False
                self.tooltipItem.isBook2 = False
            else:
                self.tooltipItem.isStone = False
                self.tooltipItem.isBook = True
                self.tooltipItem.isBook2 = True
            self.tooltipItem.SetItemToolTip(self.chestDrop[self.currentChest][self.currentPage][slotIndex][0])
            
            
#arat

    def OverOutItem(self):

        
#kod bloğunu değiştir

    def OverOutItem(self):
        if 0 != self.tooltipItem:
            self.tooltipItem.isStone = False
            self.tooltipItem.isBook = False
            self.tooltipItem.isBook2 = False
            self.tooltipItem.HideToolTip()
 
Son düzenleme:
Merhabalar Sistemi Filesten Söküp Biraz Değiştirdim Paylaşmak İstedim Hayırlı Olsun. :)

Not: Açılmayan Sandıkların item_proto.txt den type'ını ITEM_TYPE_GIFTBOX yapın.


Anlatım Dosyada Mevcut.
Linkleri görebilmek için giriş yap veya kayıt ol.


Linkleri görebilmek için giriş yap veya kayıt ol.



Kanıt:


K Envanter Kullananlar için uyarlama​

uiinventory.py:
#aratılır
if app.WJ_SPLIT_INVENTORY_SYSTEM:
    class ExtendedInventoryWindow(ui.ScriptWindow):
#altında Bulunur

                constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

#Altına eklenir
            elif app.IsPressed(app.DIK_LSHIFT):
                if player.GetItemTypeBySlot(slotIndex) == item.ITEM_TYPE_GIFTBOX and\
                    ItemVNum != 31374 and ItemVNum != 50255 and\
                    ItemVNum != 50187 and ItemVNum != 50197 and\
                    ItemVNum != 50188 and ItemVNum != 50189 and\
                    ItemVNum != 50190 and ItemVNum != 50191 and\
                    ItemVNum != 50192 and ItemVNum != 50193 and\
                    ItemVNum != 50194 and ItemVNum != 50195:
                    if app.ENABLE_SHOW_CHEST_DROP_SYSTEM:
                        if self.interface:
                            if self.interface.dlgChestDrop:
                                if not self.interface.dlgChestDrop.IsShow():
                                    self.interface.dlgChestDrop.Open(slotIndex)
                                    net.SendChestDropInfo(slotIndex)

gamesrc input_main.cpp:
//kod bloğu değiştirilir

#ifdef ENABLE_SHOW_CHEST_DROP_SYSTEM
void CInputMain::ChestDropInfo(LPCHARACTER ch, const char* c_pData)
{
    TPacketCGChestDropInfo* p = (TPacketCGChestDropInfo*)c_pData;
    if (!ch)
        return;
    if (p->wInventoryCell >= INVENTORY_AND_EQUIP_SLOT_MAX)
        return;
    LPITEM pkItem = ch->GetBoxInventoryItem(p->wInventoryCell);
    if (!pkItem)
        return;
    std::vector<TChestDropInfoTable> vec_ItemList;
    ITEM_MANAGER::instance().GetChestItemList(pkItem->GetVnum(), vec_ItemList);
    if (vec_ItemList.size() == 0)
        return;
    TPacketGCChestDropInfo packet;
    packet.bHeader = HEADER_GC_CHEST_DROP_INFO;
    packet.wSize = sizeof(packet) + sizeof(TChestDropInfoTable) * vec_ItemList.size();
    packet.dwChestVnum = pkItem->GetVnum();
    ch->GetDesc()->BufferedPacket(&packet, sizeof(packet));
    ch->GetDesc()->Packet(&vec_ItemList[0], sizeof(TChestDropInfoTable) * vec_ItemList.size());
}
#endif

protoda item_type_giftbox olursa çalışmaz. item_giftbox olmayacak mı? yoksa sistem yeni type mi ekletiyor?
 
protoda item_type_giftbox olursa çalışmaz. item_giftbox olmayacak mı? yoksa sistem yeni type mi ekletiyor?
Yeni type ekliyor

Denemedim ama deneyen olup hata alan olursa kontrol ederim şuan PC de değilim

O zaman 50011 kodlu sandıkta denemek sonuç verecektir.
 

Dosya Eklentileri

  • Screenshot_20240413_130038.jpg
    Screenshot_20240413_130038.jpg
    90 KB · Gösterim: 14
Yeni type ekliyor

Denemedim ama deneyen olup hata alan olursa kontrol ederim şuan PC de değilim

O zaman 50011 kodlu sandıkta denemek sonuç verecektir.
bu client için game değil. yani protoda item type giftbox yaparlarsa çalışmaz. item giftbox olarak kalsın.
 
Test edip döneceğim.
pythonitemmoduleye item type giftbox ekleme sebebin normalde öyle bir type olmaması. yani gamelibte var ama item.item_type_giftbox olarak okutamazsın pythonda. o yüzden o ekleme yapılmış. item protoda değişmez yani. sandıklar zaten protoya giftbox olarak kayıtlı.
 
pythonitemmoduleye item type giftbox ekleme sebebin normalde öyle bir type olmaması. yani gamelibte var ama item.item_type_giftbox olarak okutamazsın pythonda. o yüzden o ekleme yapılmış. item protoda değişmez yani. sandıklar zaten protoya giftbox olarak kayıtlı.
Teşekkürler. O zaman konuyu güncelleyebilir misiniz rica etsem 🙏
 
Geri
Üst