Accessory Percent Fix

  • Konuyu açan Konuyu açan TheAdmin33
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 10
  • Gösterim Gösterim 744

TheAdmin33

Ah, bu şarkıların gözü kör olsun
Geliştirici
Yardımsever Üye
Usta Üye
Editör
Mesaj
1.491
Çözümler
84
Beğeni
6.709
Puan
2.859
Ticaret Puanı
0
metin2 de iç itemlerinize eklediğin cevherlerin vermiş olduğu özellikler constants.cpp dosyasındaki aiAccessorySocketEffectivePct kısmındaki oranlara göre hesaplanır.

constants.cpp:
Genişlet Daralt Kopyala
const int aiAccessorySocketEffectivePct[ITEM_ACCESSORY_SOCKET_MAX_NUM + 1] =
{
    0, 10, 20, 40
};

tabi teoride öyle ama pratikte pekte öyle çalışmıyor. Bu fix bu durumu düzeltmenize yarar.

Fixden Önce



Fixten Sonra



Fix;
Burayı görüntülemek için üye girişi yapmalı veya kayıt olmalısınız.


Vt;
 
Son düzenleme:
Paylaşım için teşekkürler ellerine sağlık.
 
En son bir moderatör tarafından düzenlenmiş:
bu fonksiyon orjinal ymir yazımı mı yoksa martysama yazımı mı;


Python:
Genişlet Daralt Kopyala
    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):
        ACCESSORY_SOCKET_MAX_SIZE = 3

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

        affectType1, affectValue1 = item.GetAffect(0)
        affectList1 = [0, max(1, affectValue1 * 10 / 100), max(2, affectValue1 * 20 / 100), max(3, affectValue1 * 40 / 100)]

        affectType2, affectValue2 = item.GetAffect(1)
        affectList2 = [0, max(1, affectValue2 * 10 / 100), max(2, affectValue2 * 20 / 100), max(3, affectValue2 * 40 / 100)]

        affectType3, affectValue3 = item.GetAffect(2)
        affectList3 = [0, max(1, affectValue3 * 10 / 100), max(2, affectValue3 * 20 / 100), max(3, affectValue3 * 40 / 100)]

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

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

            leftTime = 0
            if cur == mtrlPos + 1:
                leftTime = metinSlot[2]

            self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, affectString3, leftTime)
            mtrlPos += 1
 
bu fonksiyon orjinal ymir yazımı mı yoksa martysama yazımı mı;


Python:
Genişlet Daralt Kopyala
    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):
        ACCESSORY_SOCKET_MAX_SIZE = 3

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

        affectType1, affectValue1 = item.GetAffect(0)
        affectList1 = [0, max(1, affectValue1 * 10 / 100), max(2, affectValue1 * 20 / 100), max(3, affectValue1 * 40 / 100)]

        affectType2, affectValue2 = item.GetAffect(1)
        affectList2 = [0, max(1, affectValue2 * 10 / 100), max(2, affectValue2 * 20 / 100), max(3, affectValue2 * 40 / 100)]

        affectType3, affectValue3 = item.GetAffect(2)
        affectList3 = [0, max(1, affectValue3 * 10 / 100), max(2, affectValue3 * 20 / 100), max(3, affectValue3 * 40 / 100)]

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

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

            leftTime = 0
            if cur == mtrlPos + 1:
                leftTime = metinSlot[2]

            self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, affectString3, leftTime)
            mtrlPos += 1
Konu içindeki hali orjinal ymir kodu, marty itemde 3 temel efsun olacak ve cevherlerde 2 değil 3 tane efekt alacak şekilde güncellemiş olabilir.
 
Güncelleme;

Artık itemde 2 değilde 3 temel efsun varsa cevher kısmında hepsi gözükecek. Dosyayı tekrar indirin.
Ekran Alıntısı.webp
 
10lu taş için py düzeltmesi ve diğer itemlerin(giyilebilir şebnem gibi) apply_point saymama olayının düzeltmesi.

bende pointlerde kayma var metin hasarı karakter karşı savunmada görünüyor, bu apply_point düzeltilmiş hali.




bu dediğim satırın ekli olmadığı durumda giyilebilir itemlerdeki apply_pointleri saymama durumu.





uitooltip.py:
Genişlet Daralt Kopyala
    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):#10lu yatay
        # ACCESSORY_SOCKET_MAX_SIZE = 3

        # 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)

        # percentList = [0, 10, 20, 40]

        # affectList1=[0]
        # affectList2=[0]
        # affectList3=[0]

        # for pct in percentList[1:]:
            # affectList1.append(max(1, affectValue1 * pct / 100))
            # affectList2.append(max(1, affectValue2 * pct / 100))
            # affectList3.append(max(1, affectValue3 * pct / 100))

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

        # 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])

            # leftTime = 0

            # if cur == mtrlPos+1:
                # leftTime=metinSlot[2]

            # self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, affectString3, leftTime)
            # mtrlPos+=1

        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)

        percentList = [0, 10, 20, 30, 30, 30, 30, 30, 30, 30, 30]

        affectList1=[0]
        affectList2=[0]
        affectList3=[0]

        for pct in percentList[1:]:
            affectList1.append(max(1, affectValue1 * pct / 100))
            affectList2.append(max(1, affectValue2 * pct / 100))
            affectList3.append(max(1, affectValue3 * pct / 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()

item.cpp:
Genişlet Daralt Kopyala
    for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    {
        const auto& apply = m_pProto->aApplies[i];

        if (apply.bType == APPLY_NONE)
            continue;
#ifdef ENABLE_MOUNT_COSTUME_SYSTEM
        if(IsMountItem())
            continue;
#endif

        long value = apply.lValue;

        if (apply.bType == APPLY_SKILL)
        {
            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : value ^ 0x00800000);
        }
        else
        {
            if (accessoryGrade > 0)
            {
                long totalBonus = 0;

                for (int j = 0; j < accessoryGrade; ++j)
                {
                    totalBonus += MAX(1, value * aiAccessorySocketEffectivePct[j + 1] / 100);
                }
                value += totalBonus;
                m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
            }
            else//diger itemler icin apply_point saymamasinin duzeltmesi
                m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
        }
    }

    // for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    // {
        // if (m_pProto->aApplies[i].bType == APPLY_NONE)
            // continue;
// #ifdef ENABLE_MOUNT_COSTUME_SYSTEM
        // if(IsMountItem())
            // continue;
// #endif

        // BYTE bType = m_pProto->aApplies[i].bType;
        // long value = m_pProto->aApplies[i].lValue;

        // if (bType != APPLY_SKILL)
        // {
            // if (accessoryGrade != 0)
                // value += MAX(accessoryGrade, value * aiAccessorySocketEffectivePct[accessoryGrade] / 100);

            // m_pOwner->ApplyPoint(bType, bAdd ? value : -value);
        // }
        // else
            // m_pOwner->ApplyPoint(bType, bAdd ? value : value ^ 0x00800000);
    // }
 
Son düzenleme:
10lu taş için py düzeltmesi ve diğer itemlerin(giyilebilir şebnem gibi) apply_point saymama olayının düzeltmesi.

bende pointlerde kayma var metin hasarı karakter karşı savunmada görünüyor, bu apply_point düzeltilmiş hali.

23243 eklentisini görüntüle


bu dediğim satırın ekli olmadığı durumda giyilebilir itemlerdeki apply_pointleri saymama durumu.

23244 eklentisini görüntüle



uitooltip.py:
Genişlet Daralt Kopyala
    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):#10lu yatay
        # ACCESSORY_SOCKET_MAX_SIZE = 3

        # 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)

        # percentList = [0, 10, 20, 40]

        # affectList1=[0]
        # affectList2=[0]
        # affectList3=[0]

        # for pct in percentList[1:]:
            # affectList1.append(max(1, affectValue1 * pct / 100))
            # affectList2.append(max(1, affectValue2 * pct / 100))
            # affectList3.append(max(1, affectValue3 * pct / 100))

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

        # 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])

            # leftTime = 0

            # if cur == mtrlPos+1:
                # leftTime=metinSlot[2]

            # self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, affectString3, leftTime)
            # mtrlPos+=1

        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)

        percentList = [0, 10, 20, 30, 30, 30, 30, 30, 30, 30, 30]

        affectList1=[0]
        affectList2=[0]
        affectList3=[0]

        for pct in percentList[1:]:
            affectList1.append(max(1, affectValue1 * pct / 100))
            affectList2.append(max(1, affectValue2 * pct / 100))
            affectList3.append(max(1, affectValue3 * pct / 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()

item.cpp:
Genişlet Daralt Kopyala
    for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    {
        const auto& apply = m_pProto->aApplies[i];

        if (apply.bType == APPLY_NONE)
            continue;
#ifdef ENABLE_MOUNT_COSTUME_SYSTEM
        if(IsMountItem())
            continue;
#endif

        long value = apply.lValue;

        if (apply.bType == APPLY_SKILL)
        {
            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : value ^ 0x00800000);
        }
        else
        {
            if (accessoryGrade > 0)
            {
                long totalBonus = 0;

                for (int j = 0; j < accessoryGrade; ++j)
                {
                    totalBonus += MAX(1, value * aiAccessorySocketEffectivePct[j + 1] / 100);
                }
                value += totalBonus;
                m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
            }
            else//diger itemler icin apply_point saymamasinin duzeltmesi
                m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
        }
    }

    // for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    // {
        // if (m_pProto->aApplies[i].bType == APPLY_NONE)
            // continue;
// #ifdef ENABLE_MOUNT_COSTUME_SYSTEM
        // if(IsMountItem())
            // continue;
// #endif

        // BYTE bType = m_pProto->aApplies[i].bType;
        // long value = m_pProto->aApplies[i].lValue;

        // if (bType != APPLY_SKILL)
        // {
            // if (accessoryGrade != 0)
                // value += MAX(accessoryGrade, value * aiAccessorySocketEffectivePct[accessoryGrade] / 100);

            // m_pOwner->ApplyPoint(bType, bAdd ? value : -value);
        // }
        // else
            // m_pOwner->ApplyPoint(bType, bAdd ? value : value ^ 0x00800000);
    // }
hata yapmışıyım haklısın, giyilen itemlerde cevher ekli değilse pointlerini saymıyor. Kodu bu şekilde düzenlemek yeterli olur;

item.cpp:
Genişlet Daralt Kopyala
    for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    {
        const auto& apply = m_pProto->aApplies[i];

        if (apply.bType == APPLY_NONE)
            continue;

        long value = apply.lValue;

        if (apply.bType == APPLY_SKILL)
        {
            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : value ^ 0x00800000);
        }
        else
        {
            if (accessoryGrade > 0)
            {
                long totalBonus = 0;

                for (int j = 0; j < accessoryGrade; ++j)
                {
                    totalBonus += MAX(1, value * aiAccessorySocketEffectivePct[j + 1] / 100);
                }
                value += totalBonus;
            }

            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
        }
    }

10lu cevherin py dosyasında ne sorun var onu anlamadım. @nyami (İç İtem Socket Sayısını Arttırma)
 
hata yapmışıyım haklısın, giyilen itemlerde cevher ekli değilse pointlerini saymıyor. Kodu bu şekilde düzenlemek yeterli olur;

item.cpp:
Genişlet Daralt Kopyala
    for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
    {
        const auto& apply = m_pProto->aApplies[i];

        if (apply.bType == APPLY_NONE)
            continue;

        long value = apply.lValue;

        if (apply.bType == APPLY_SKILL)
        {
            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : value ^ 0x00800000);
        }
        else
        {
            if (accessoryGrade > 0)
            {
                long totalBonus = 0;

                for (int j = 0; j < accessoryGrade; ++j)
                {
                    totalBonus += MAX(1, value * aiAccessorySocketEffectivePct[j + 1] / 100);
                }
                value += totalBonus;
            }

            m_pOwner->ApplyPoint(apply.bType, bAdd ? value : -value);
        }
    }

10lu cevherin py dosyasında ne sorun var onu anlamadım. @nyami (İç İtem Socket Sayısını Arttırma)
10 lu da sorun var demek istemedim, direk kopyala yapıştır yaparsalar 10 lu yu düzgün göstermez diye onuda ekledim.
 
Uyarı: Bu konu açıldığından bu yana baya zaman geçmiş.
Muhtemelen daha fazla tartışma gerekli değildir ki bu durumda yeni bir konu başlatmayı öneririz. Eğer yine de cevabınızın gerekli olduğunu düşünüyorsanız buna rağmen cevap verebilirsiniz.
Geri
Üst