Hikayeler

Reklam vermek için turkmmo@gmail.com

MaviAyGames | [C ++] Yang Birikintisi Fix

Metin2 EP, Valorant VP dahil tüm oyun ürünlerini en uygun fiyatlarla bulabilir, Item ve Karakterlerinizi hızlıca satabilirsiniz. HEMEN TIKLA!

"Yang bombasını" nasıl kapatacağınızı göstereceğim.



"Yang Bombası" ne iş? Mesele şu ki, kalabalığı öldürdükten sonra yere yangları "serpiyor" ve bu da gecikmeye ve daha büyük benekli bir çöp kutusuna neden oluyor.




Kod:
1. char_battle.cpp giriyoruz ve şunu arıyoruz:

else if (1 == number(1, iGold10DropPct))

    {

        //

        // µ· ĆřĹş˝Ä µĺ·Ó

        //

        for (int i = 0; i < 10; ++i)

        {

            int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);

            iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;

            iGold *= iGoldMultipler;



            if (iGold == 0)

            {

                continue;

            }



            // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ˝

            if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))

            {

                pos.x = GetX() + (number(-7, 7) * 20);

                pos.y = GetY() + (number(-7, 7) * 20);



                item->AddToGround(GetMapIndex(), pos);

                item->StartDestroyEvent();



                iTotalGold += iGold; // Total gold

            }

        }

    }

2. Kodu bulduğumuzda yukarıda verilen her şeyi siliyoruz.



3. Dosyayı kaydedip build ediyoruz.



#Ek olarak, Boss'lardanda iptal etmek isterseniz aşağıdaki düzenlemeyi yapınız.
Kod:
service.h

Ekle:



#define DISABLE_YANG_BOMB



char_battle.cpp

Arat:



    if (GetMobRank() >= MOB_RANK_BOSS && !IsStone() && GetMobTable().dwGoldMax != 0)

    {

        if (1 == number(1, iGold10DropPct))

            iGoldMultipler *= 10; // 1% 확률로 돈 10배



        int iSplitCount = number(25, 35);



        for (int i = 0; i < iSplitCount; ++i)

        {

            int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax) / iSplitCount;

            if (test_server)

                sys_log(0, "iGold %d", iGold);

            iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;

            iGold *= iGoldMultipler;



            if (iGold == 0)

            {

                continue ;

            }



            if (test_server)

            {

                sys_log(0, "Drop Moeny MobGoldAmountRate %d %d", CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker), iGoldMultipler);

                sys_log(0, "Drop Money gold %d GoldMin %d GoldMax %d", iGold, GetMobTable().dwGoldMax, GetMobTable().dwGoldMax);

            }



            // NOTE: 돈 폭탄은 제 3의 손 처리를 하지 않음

            if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))

            {

                pos.x = GetX() + ((number(-14, 14) + number(-14, 14)) * 23);

                pos.y = GetY() + ((number(-14, 14) + number(-14, 14)) * 23);



                item->AddToGround(GetMapIndex(), pos);

                item->StartDestroyEvent();



                iTotalGold += iGold; // Total gold

            }

        }

    }

Tüm kodu şu şekilde değiştiriyoruz:







    if (GetMobRank() >= MOB_RANK_BOSS && !IsStone() && GetMobTable().dwGoldMax != 0)

    {

        if (1 == number(1, iGold10DropPct))

            iGoldMultipler *= 10; // 1% Č®·ü·Î µ· 10ąč



        int iSplitCount = number(25, 35);



        for (int i = 0; i < iSplitCount; ++i)

        {

            int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax) / iSplitCount;

            if (test_server)

                sys_log(0, "iGold %d", iGold);

            iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;

            iGold *= iGoldMultipler;



            if (iGold == 0)

            {

                continue ;

            }



            if (test_server)

            {

                sys_log(0, "Drop Moeny MobGoldAmountRate %d %d", CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker), iGoldMultipler);

                sys_log(0, "Drop Money gold %d GoldMin %d GoldMax %d", iGold, GetMobTable().dwGoldMax, GetMobTable().dwGoldMax);

            }



            // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ

#ifdef DISABLE_YANG_BOMB

            pkAttacker->GiveGold(iGold / iSplitCount);

            iTotalGold += iGold;

#else

            if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))

            {

                pos.x = GetX() + ((number(-14, 14) + number(-14, 14)) * 23);

                pos.y = GetY() + ((number(-14, 14) + number(-14, 14)) * 23);



                item->AddToGround(GetMapIndex(), pos);

                item->StartDestroyEvent();



                iTotalGold += iGold; // Total gold

            }

#endif

        }

    }

    // 1% Č®·ü·Î µ·Ŕ» 10°ł ¶łľî ¶ß¸°´Ů. (10ąč µĺ·ÓŔÓ

#ifndef DISABLE_YANG_BOMB

    else if (1 == number(1, iGold10DropPct))

    {

        //

        // µ· ĆřĹş˝Ä µĺ·Ó

        //

        for (int i = 0; i < 10; ++i)

        {

            int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);

            iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;

            iGold *= iGoldMultipler;



            if (iGold == 0)

            {

                continue;

            }



            // NOTE: µ· ĆřĹşŔş Á¦ 3ŔÇ ĽŐ Ăł¸®¸¦ ÇĎÁö ľĘŔ˝

            if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))

            {

                pos.x = GetX() + (number(-7, 7) * 20);

                pos.y = GetY() + (number(-7, 7) * 20);



                item->AddToGround(GetMapIndex(), pos);

                item->StartDestroyEvent();



                iTotalGold += iGold; // Total gold

            }

        }

    }

#endif

    else

    {

        //

        // ŔĎąÝŔűŔÎ ąć˝ÄŔÇ µ· µĺ·Ó

        //

        int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);

        iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;

        iGold *= iGoldMultipler;



        int iSplitCount;



        if (iGold >= 3 && !LC_IsYMIR())

            iSplitCount = number(1, 3);

        else if (GetMobRank() >= MOB_RANK_BOSS)

        {

            iSplitCount = number(3, 10);



            if ((iGold / iSplitCount) == 0)

                iSplitCount = 1;

        }

        else

            iSplitCount = 1;



        if (iGold != 0)

        {

            iTotalGold += iGold; // Total gold



            for (int i = 0; i < iSplitCount; ++i)

            {

                if (isAutoLoot)

                {

                    pkAttacker->GiveGold(iGold / iSplitCount);

                }

                else if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold / iSplitCount)))

                {

                    pos.x = GetX() + (number(-7, 7) * 20);

                    pos.y = GetY() + (number(-7, 7) * 20);



                    item->AddToGround(GetMapIndex(), pos);

                    item->StartDestroyEvent();

                }

            }

        }

    }
Öncesi

Ekli dosyayı görüntüle 38759
Sonrası
Ekli dosyayı görüntüle 38832
Sadece yanklar kalkmamış otların koyuluğuda kalkmış açık renkli olmuşlar 😂😂😂 not : mizah amaçlıdır 😁
 
Paylaşım için teşekkürler
 
Elinize sağlık
 
hocam bana bir yardım edin allah rızası için kafayı yicem :D
 

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

Geri
Üst