Jump to content

Fix bug in sash system (it doesn't apply base bonuses from the absorbed item)


Recommended Posts

Some files have this problem: if you absorb an item on the sash, base bonuses of that item will not be applied.

The fix is quite simple.

 

Open item.cpp and look for

 

long value = m_pProto->aApplies[i].lValue;

 

replace it with

 

BYTE bType = m_pProto->aApplies[i].bType;
long value = m_pProto->aApplies[i].lValue;

 

inside the #ifdef below, find

 

				if (pkItemAbsorbed->aApplies[i].bType == APPLY_NONE)
					continue;

				value = pkItemAbsorbed->aApplies[i].lValue;
				if (value < 0)
					continue;

 

and relpace with

 

				if (pkItemAbsorbed->aApplies[i].bType == APPLY_NONE)
					continue;

				value = pkItemAbsorbed->aApplies[i].lValue;
				bType = pkItemAbsorbed->aApplies[i].bType;

				if (value < 0)
					continue;

 

under find 

 

			if (0 != accessoryGrade)
				value += MAX(accessoryGrade, value * aiAccessorySocketEffectivePct[accessoryGrade] / 100);

			m_pOwner->ApplyPoint(m_pProto->aApplies[i].bType, bAdd ? value : -value);

 

and replace with

 

			if (0 != accessoryGrade)
				value += MAX(accessoryGrade, value * aiAccessorySocketEffectivePct[accessoryGrade] / 100);

			m_pOwner->ApplyPoint(bType, bAdd ? value : -value);

 

 

done :)

Edited by Cappuccino
typo fix
Link to post
  • Cappuccino changed the title to Fix bug in sash system (it doesn't apply base bonuses from the absorbed item)
  • 3 weeks later...

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
Reply to this topic...

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