MG Yaşı
2 Ay 1 Gün
Katılım
2 Şub 2026
Konular
224
Mesajlar
363
Tepkime puanı
54
Puan
53
Konum
İstanbul
1770401145779.png



Ekli dosyayı görüntüle scocketarttırma.mp4



Game Source;

common;



Kod:
//Ekle;

#define ACCESSORY_SOCKET_10                            //İç item socketi 3 -> 10

game;

constants.cpp:


Kod:
//Arat;

const int aiAccessorySocketAddPct[ITEM_ACCESSORY_SOCKET_MAX_NUM] =
{
    50, 50, 50
};

const int aiAccessorySocketEffectivePct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 10, 20, 40
};

const int aiAccessorySocketDegradeTime[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 3600 * 24, 3600 * 12, 3600 * 6
};

const int aiAccessorySocketPutPct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    90, 80, 70, 0
};


//Değiştir;


#ifdef ACCESSORY_SOCKET_10
const int aiAccessorySocketAddPct[ITEM_ACCESSORY_SOCKET_MAX_NUM] =
{
    50, 50, 50, 50, 50, 50, 50, 50, 50, 50
};

const int aiAccessorySocketEffectivePct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 10, 20, 30, 30, 30, 30, 30, 30, 30, 30
};

const int aiAccessorySocketDegradeTime[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 3600 * 24, 3600 * 12, 3600 * 6, 3600 * 6, 3600 * 6, 3600 * 6, 3600 * 6, 3600 * 6, 3600 * 6, 3600 * 6
};

const int aiAccessorySocketPutPct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    90, 80, 70, 60, 50, 50, 50, 50, 50, 50, 0
};
#else
const int aiAccessorySocketAddPct[ITEM_ACCESSORY_SOCKET_MAX_NUM] =
{
    50, 50, 50
};

const int aiAccessorySocketEffectivePct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 10, 20, 40
};

const int aiAccessorySocketDegradeTime[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 3600 * 24, 3600 * 12, 3600 * 6
};

const int aiAccessorySocketPutPct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    90, 80, 70, 0
};
#endif


constants.h:



Kod:
//Arat;

    ITEM_ACCESSORY_SOCKET_MAX_NUM = 3


//Değiştir;

#ifdef ACCESSORY_SOCKET_10
    ITEM_ACCESSORY_SOCKET_MAX_NUM = 10
#else
    ITEM_ACCESSORY_SOCKET_MAX_NUM = 3
#endif



pack;

root;

uiinventory.py:


Kod:
#Arat;

        ACCESSORY_SOCKET_MAX_SIZE = 3


#Değiştir;

        ACCESSORY_SOCKET_MAX_SIZE = 10


uitooltip.py:



Kod:
#Arat;

    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):


#Komple Değiştir;

    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):
        ACCESSORY_SOCKET_MAX_SIZE = 10

        cur=min(metinSlot[0], ACCESSORY_SOCKET_MAX_SIZE)
        end=min(metinSlot[1], ACCESSORY_SOCKET_MAX_SIZE)

        affectType1, affectValue1 = item.GetAffect(0)
        affectType2, affectValue2 = item.GetAffect(1)
        affectType3, affectValue3 = item.GetAffect(2)

        affectList1=[0, max(1, affectValue1*10/100), max(1, affectValue1*20/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100), max(1, affectValue1*30/100)]
        affectList2=[0, max(1, affectValue2*10/100), max(1, affectValue2*20/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100), max(1, affectValue2*30/100)]
        affectList3=[0, max(1, affectValue3*10/100), max(1, affectValue3*20/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100), max(1, affectValue3*30/100)]

        mtrlPos=0
        mtrlList=[mtrlVnum]*cur+[player.METIN_SOCKET_TYPE_SILVER]*(end-cur)

        attr_total = [0,0,0]
        self.AppendSpace(5)
        if mtrlVnum > 0 and end > 0:
            item.SelectItem(mtrlVnum)
            self.AppendTextLine(str(item.GetItemName()),self.CONDITION_COLOR)
            self.AppendSpace(5)

        height = self.toolTipHeight

        for mtrl in mtrlList:
            affectString1 = self.__GetAffectString(affectType1, affectList1[mtrlPos+1])
            affectString2 = self.__GetAffectString(affectType2, affectList2[mtrlPos+1])
            affectString3 = self.__GetAffectString(affectType3, affectList3[mtrlPos+1])

            if mtrl > 1:
                if affectString1:
                    attr_total[0] += affectList1[mtrlPos+1]

                if affectString2:
                    attr_total[1] += affectList2[mtrlPos+1]

                if affectString3:
                    attr_total[2] += affectList3[mtrlPos+1]

            left_time = metinSlot[2]

            self.__AppendMetinSlotInfo_AppendMetinSocketData_New(mtrlPos, mtrl, height, end)

            mtrlPos+=1

        if end > 0:
            if end > 5:
                self.toolTipHeight += 70
            else:
                self.toolTipHeight += 35

            self.ResizeToolTip()

            affectString11 = self.__GetAffectString(affectType1, attr_total[0])
            affectString22 = self.__GetAffectString(affectType2, attr_total[1])
            affectString33 = self.__GetAffectString(affectType3, attr_total[2])

            if 0 != left_time:
                timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(left_time))
                self.AppendSpace(6)
                self.AppendTextLine(timeText, self.NEGATIVE_COLOR)

            if affectString11:
                self.AppendTextLine(affectString11, self.POSITIVE_COLOR)
            if affectString22:
                self.AppendTextLine(affectString22, self.POSITIVE_COLOR)
            if affectString33:
                self.AppendTextLine(affectString33, self.POSITIVE_COLOR)

        self.ResizeToolTip()


#Arat;

    def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0):


#Üstüne ekle;

    def __AppendMetinSlotInfo_AppendMetinSocketData_New(self, index, metinSlotData, height=0, end=0):

        slotType = self.GetMetinSocketType(metinSlotData)
        itemIndex = self.GetMetinItemIndex(metinSlotData)

        if 0 == slotType:
            return

        slotImage = ui.ImageBox()
        slotImage.SetParent(self)
        slotImage.Show()

        if player.METIN_SOCKET_TYPE_SILVER == slotType:
            slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub")
        elif player.METIN_SOCKET_TYPE_GOLD == slotType:
            slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub")

        self.childrenList.append(slotImage)

        if index > 4:
            height += 36
            index = index-5

        if end > 5:
            end = 5

        calc_x = (self.toolTipWidth/2) - (17.5*end)

        slotImage.SetPosition(calc_x+index*35, height)

        metinImage = ui.ImageBox()
        metinImage.SetParent(slotImage)
        metinImage.Show()
        self.childrenList.append(metinImage)

        if itemIndex:
            item.SelectItem(itemIndex)

            ## Image
            try:
                metinImage.LoadImage(item.GetIconImageFileName())
            except:
                dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" %
                    (itemIndex, item.GetIconImageFileName())
                )

            metinImage.SetPosition(1, 1)

 
Geri
Üst