[Bug] Monk object reference
The following code has a unchecked null. Lets not add empty catches here... Also i believe the calcs are off as well.
Code: https://github.com/blizzless/blizzless-diiis/blob/d7bce32efbf0a51ed8e56e235c20f9e9523efd52/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs#L1138
Also, I believe the code should look something like this:
Note: Not sure if we have a spirit rate atrribute yet ?
case 209812: //TheGuardiansPath
var weapon = Inventory.GetEquippedWeapon();
var offhand = Inventory.GetEquippedOffHand();
if (weapon != null && offhand != null)
{
Attributes[GameAttribute.Dodge_Chance_Bonus] += 0.35f;
// Attributes[GameAttribute.Spirit_Rate] += 0.15f;
World.BuffManager.RemoveBuffs(this, 209812);
World.BuffManager.AddBuff(this, this, new GuardiansPathBuff());
}
Can you share how to replicate?
I started a Monk and used the !level command to make me a higher level, and simply chose the Guardian's Path perk. Started crashing so went into debug and found that the line in question was outside of the null check condition :) Spent some more time looking into what the perk should do and made some adjustments to the code on my wide. Runs great.
Updated code sample, not sure if there is a way to increase the spirit rate but left that comment in.