private void WriteArtifact(BinaryWriter w, ArtifactObject o) { WriteMessageAndGuards(w, o); if (o.Artifact != null) { w.Write(o.Artifact.Value); } }
public static float Postfix(float __result, BC __instance, AmountApp amtApp, SpellObject spellObj, ArtifactObject artObj, PactObject pactObj) { if (amtApp.type != AmountType.Damage || amtApp.type != AmountType.ParentDamage) { return(__result); } // Implement our own damage formula ItemObject itemObject = (ItemObject)spellObj ?? artObj ?? pactObj; float baseAmount = amtApp.type == AmountType.Damage ? __instance.GetAmount(spellObj.damageType, spellObj.damage, spellObj) : __instance.GetAmount(spellObj.parentSpell.damageType, spellObj.parentSpell.damage, spellObj); float amount1 = baseAmount; if ((bool)itemObject.being.player) { amount1 += CalcDamage(baseAmount, itemObject.being.player.spellPower); } var num1 = amount1 + CalcDamage(amount1, itemObject.being.GetAmount(Status.SpellPower)); if (amtApp.type == AmountType.Damage) { num1 += spellObj.tempDamage + spellObj.permDamage; } return(num1 * amtApp.multiplier + amtApp.initial); }