Jump to content

Keep Buffs and Support Skills After Die in PvM


Recommended Posts

Hello community,

I needed to create this little function so that players don't lose buffs and support skills when they die in PvM and I decided to share it.

This is the hidden content, please

  • Metin2 Dev 108
  • kekw 1
  • Eyes 1
  • Lmao 1
  • Good 24
  • Love 3
  • Love 32
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 months later...
  • Premium

Yeah but this will not work as it will keep the flags in uiaffectshower after one player will kill you, in PVM works fine.

How to reproduce:

 

Buff yourself, enable some skills, die from another player's hand, you will see the affectshower still in the left corner of the window but if you rewarp, they disappear. But the bonus isn't there anymore, its removed.

On the pvm side it works as a charm.

12 hours ago, Pisti95 said:

uiaffectshower.py

Search for:

def __AppendAffect(self, affect):


Change:

image.SetSkillAffectFlag(TRUE)


With it:

if skillIndex >= 94 and skillIndex <= 96 or skillIndex == 110 or skillIndex == 111: image.SetSkillAffectFlag(FALSE) else: image.SetSkillAffectFlag(TRUE)

 

 

Link to comment
Share on other sites

4 hours ago, Dr3Ame3r said:

Yeah but this will not work as it will keep the flags in uiaffectshower after one player will kill you, in PVM works fine.

Yes, you are right.

 

Solution:
 

InstanceBase.h

Search for:

class CInstanceBase
{

 

Add to:

	public:
		int						BuffAffect;

 

InstanceBaseBattle.cpp

Search for:
 

void CInstanceBase::Die()

 

In this function search for it:
 

__ClearAffects();

 

Change for it:

	////////////////////////////////////////
    std::vector<int> BuffAffectList = {
									AFFECT_JEONGWI, AFFECT_GEOMGYEONG, AFFECT_CHEONGEUN,
									AFFECT_GYEONGGONG, AFFECT_EUNHYEONG, AFFECT_GWIGEOM,
									AFFECT_GONGPO, AFFECT_JUMAGAP, AFFECT_HOSIN, AFFECT_BOHO,
									AFFECT_GICHEON, AFFECT_KWAESOK, AFFECT_HEUKSIN, AFFECT_MUYEONG,
									AFFECT_JEUNGRYEOK, AFFECT_PABEOP
#ifdef ENABLE_WOLFMAN_CHARACTER
									, AFFECT_RED_POSSESSION, AFFECT_BLUE_POSSESSION
#endif
									};
    if (std::find(BuffAffectList.begin(), BuffAffectList.end(), BuffAffect) != BuffAffectList.end())
        __ClearAffects();
	////////////////////////////////////////

 

This solution for buffs. The affect left top of corner don't disappear.

Edited by Pisti95
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.