Onforum.net - Web and gaming resource community

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members .

Metin2 Leveling petsystem (unsummon)

Capturre

Member
Credits
0
Hello users.

If you have the leveling (new petsystem) you know what about i speak.

When character die / teleport the pet unsummon.

Here how change this.

New_petsystem.cpp

Search : bool CNewPetActor::Update(DWORD deltaTime)

In Function :
if (
NULL == ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())
|| ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())->GetOwner() != this->GetOwner()
)

Next lines you can find some code whats seems like this :
this->Unsummon();

Comment like //this->Unsummon(); or delete the line.
If you do this the pet bonus after teleport or die does not appear. Have to resummon
To solve some error ( does not give bonus when get up )
Add new check.
if ( petbonuses <=0 && m_pkOwner->IsAlive() && IsSummoned() )
{
this->GiveBuff();
petbonuses ++;
return true;
}
Search : CNewPetActor::CNewPetActor(LPCHARACTER owner, DWORD vnum, DWORD options)
You have to add petbonuses = 0 like this.
petbonuses = 0;

If you die again the bonuses does not give again.
To fix make one new check
if ( petbonuses >= 1 && m_pkOwner->IsDead() )
{
petbonuses = 0;
return true;
}

Good luck for everyone.
Edmund.
 
Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!

Baba2

Baba2 Purchase

User upgrade! at

🔥 Upgrade Now

Escanor25 Purchase

User upgrade! at

🔥 Upgrade Now
Tigrex

Tigrex Purchase

User upgrade! at

🔥 Upgrade Now