Metin2 [C++] Champion Level Expansion (Changing Exp Method)

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Blaze

Elite
Elite
VIP
Joined
Jan 28, 2019
Messages
507
Credits
635
When we press the Guild Donation Button in Python, the offerDialog opens. (Original: A Class in uiCommon)

In this window, we write the amount we will donate (Exp Number to be Given) and we say OK.

After Saying OK, You'll See

That Self.offerDialog.SetAcceptEvent(ui.__mem_func__(self.OnOffer)) Actually

Works.
Code:
Expand Collapse Copy
When we press the Guild Donation Button in Python, the offerDialog opens. (Original: A Class in uiCommon)

In this window, we write the amount we will donate (Exp Number to be Given) and we say OK.

After Saying OK, You'll See

That Self.offerDialog.SetAcceptEvent(ui.__mem_func__(self.OnOffer)) Actually

Works.
As You Can See It Sends Us To ClientSource. and sends it to GameSource with the Exp Value we entered from there. But one bHeader and one bSubHeader.
Here Let's Come.

In input_main.cpp Let's Get to SubHeader Name

case GUILD_SUBHEADER_CG_OFFER:

if (pGuild->OfferExp(ch, offer))

Says OfferExp to Run. 2 A Character Class As Arguments And The Exp We Wrote To OfferDialog With Our Number.

Let's Open Guild.cpp and Search:

bool CGuild::OfferExp(LPCHARACTER ch, int amount)

When we get to the bottom a little bit, it constantly questions a definition called GetExp from the Character Class.
Code:
Expand Collapse Copy
As You Can See It Sends Us To ClientSource. and sends it to GameSource with the Exp Value we entered from there. But one bHeader and one bSubHeader.
Here Let's Come.

In input_main.cpp Let's Get to SubHeader Name

case GUILD_SUBHEADER_CG_OFFER:

if (pGuild->OfferExp(ch, offer))

Says OfferExp to Run. 2 A Character Class As Arguments And The Exp We Wrote To OfferDialog With Our Number.

Let's Open Guild.cpp and Search:

bool CGuild::OfferExp(LPCHARACTER ch, int amount)

When we get to the bottom a little bit, it constantly questions a definition called GetExp from the Character Class.

Here We Are Changing.
Code:
Expand Collapse Copy
 const auto CharacterExp = ch->GetConquerorExp() ? ch->GetConquerorExp() : ch->GetExp();

    if (CharacterExp < (DWORD)amount)
    {
        ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<±æµå> Á¦°øÇϰíÀÚ ÇÏ´Â °æÇèÄ¡°¡ ³²Àº °æÇèÄ¡º¸´Ù ¸¹½À´Ï´Ù."));
        return false;
    }

    if (CharacterExp - (DWORD)amount > CharacterExp)
    {
        sys_err("Wrong guild offer amount %d by %s[%u]", amount, ch->GetName(), ch->GetPlayerID());
        return false;
    }
Then, let's come to the deletion process of the exp's after the queries are finished. Go A Little Down And You'll See This.

ch->PointChange(POINT_EXP, -amount);

Let's change:
Code:
Expand Collapse Copy
  if (ch->GetConquerorLevel() >= 1)
        ch->PointChange(POINT_CONQUEROR_EXP, -amount);
    else
        ch->PointChange(POINT_EXP, -amount);

Let's Go A Little Down And You'll See This:

GuildPointChange(POINT_EXP, amount / 100, true);

Let's change:
Code:
Expand Collapse Copy
    if (ch->GetConquerorLevel() >= 1)
        ch->GuildPointChange(POINT_CONQUEROR_EXP, amount / 100, true);
    else
        ch->GuildPointChange(POINT_EXP, amount / 100, true);

Let's Search Again in Guild.cpp:

void CGuild::GuildPointChange(BYTE type, int amount, bool save)

Underneath you will see the case parts in the switch (type) structure and there is POINT_EXP Let's Add Just Above:

case POINT_CONQUEROR_EXP:
 
Back
Top