Jump to content
  • 0

Owsap Alignment Affect


danhakhavro
Go to solution Solved by Owsap,

Question

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 danhakhavro
Link to post

3 answers to this question

Recommended Posts

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

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



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