Jump to content
  • 0




4 answers to this question

Recommended Posts

  • 0

Gotta check on char_affect.cpp for IS_NO_CLEAR_ON_DEATH_AFFECT, and add the buffs you want to stay after the character's death. Be aware that in this case, the buffs will stay on even in PvP. If you wanna avoid that, on the top of my head, you could do this:

go on char_battle.cpp and search for ClearAffect(true); in void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) and edit the line like this:

if (pkKiller && IsPC())
	ClearAffect(true, true);
	ClearAffect(true, false);

then edit void CHARACTER::ClearAffect(bool bSave) in char_affect.cpp into:

void CHARACTER::ClearAffect(bool bSave, bool bIsPC)

then in the function check for while (it != m_list_pkAffect.end()) and edit like this:

	while (it != m_list_pkAffect.end())
		CAffect * pkAff = *it;

		if (bSave)
				if ( IS_NO_CLEAR_ON_DEATH_AFFECT_PC(pkAff->dwType) || 
				IS_NO_SAVE_AFFECT(pkAff->dwType)) //add the others that you might previously have had
			else if(!bIsPC)
				if ( IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || 
				IS_NO_SAVE_AFFECT(pkAff->dwType)) //add the others that you might previously have had
			if (IsPC())
				SendAffectRemovePacket(GetDesc(), GetPlayerID(), pkAff->dwType, pkAff->bApplyOn, pkAff->dwFlag);
		ComputeAffect(pkAff, false);

		it = m_list_pkAffect.erase(it);

	if (afOld != m_afAffectFlag ||
			wMovSpd != GetPoint(POINT_MOV_SPEED) ||
			wAttSpd != GetPoint(POINT_ATT_SPEED))


	if (m_list_pkAffect.empty())

Copy IS_NO_CLEAR_ON_DEATH_AFFECT into a new line and edit the name into IS_NO_CLEAR_ON_DEATH_AFFECT_PC where you remove the buffs that you want to remove in PvP.

And finally, edit the function in char.h:

void			ClearAffect(bool bSave=false, bool bIsPC = false);



might also wanna check where ClearAffect is used and edit as you see fit

Edited by xXIntelXx
Link to post
  • 0

I've edited the ClearAffect function the way you said. (it was already did btw, but tried with your solution) and the problem is the same, when i die it disappears from the corner, but if i get up and unequip my armor i get it back. so on ChangeArmor it gets back.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Activity

    1. 0

      Compile Server

    2. 0

      QC error message for special characters next to apostrophes

    3. 135

      Render Target Remastered

    4. 0

      Mount not attacking

    5. 2

      Rodnia2 | PVM | International | 3k+ players | Multiple-Languages | 2nd server opening: 13.02.2021

    6. 218

      WorldEditor ReMIX

    7. 54

      Quiver System

    8. 72

      Party Flag

  • Recently Browsing

    No registered users viewing this page.



Chatroom Rules


Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules


  • 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.