Jump to content

Owsap Alignment Affect


Go to solution Solved by Owsap,

Recommended Posts

Hi,
Today I installed the Owsap Align Bonus Affect feature. 

The installation was simple and everything was very well explained but I found a bug, when we die the bonus disappears and no longer appears.

For those who do not know this "feature" give life points with the Karma. Like this: Preview

 

And here the bug: Bug Preview

 

Does anyone know where and how to solve this problem?
The only code that can be relative is this one:

char_battle.cpp

 

#if defined(__ALIGNMENT_AFFECT__)
void CHARACTER::AlignmentBonus()
{
	if (IsPC() && (!GetDesc() || !GetDesc()->GetCharacter()))
		return;

	int iRealAlignment = m_iRealAlignment / 10;

	int iAlignmentBonus[MAX_ALIGNMENT_LEVEL][3] = {
		{ ALIGNMENT_LEVEL1 /* 12000 */, POINT_MAX_HP, 2000 },
		{ ALIGNMENT_LEVEL2 /* 8000 */, POINT_MAX_HP, 1500 },
		{ ALIGNMENT_LEVEL3 /* 4000 */, POINT_MAX_HP, 1000 },
		{ ALIGNMENT_LEVEL4 /* 1000 */, POINT_MAX_HP, 500 },
	};

	for (int i = 0; i < MAX_ALIGNMENT_LEVEL; ++i)
	{
		if (iRealAlignment >= iAlignmentBonus[i][0])
		{
			AddAffect(AFFECT_ALIGNMENT, iAlignmentBonus[i][1], iAlignmentBonus[i][2], AFF_NONE, INFINITE_AFFECT_DURATION, 0, true, true);
			return;
		}
	}

	RemoveAffect(AFFECT_ALIGNMENT);
}
#endif

 

Thanks

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Honorable Member
  • Solution
/// 1. @ game/char_affect.cpp
// Search @ void CHARACTER::ClearAffect
			if (IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || IS_NO_SAVE_AFFECT(pkAff->dwType))
			{
				++it;
				continue;
			}

// Add below
#if defined(__ALIGNMENT_AFFECT__)
			if (pkAff->dwType >= AFFECT_ALIGNMENT)
			{
				++it;
				continue;
			}
#endif

 

  • Good 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.