Jump to content

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


Cappuccino

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 comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.