Skip to content

Commit

Permalink
HS-1334: support shield as an attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
baughj committed Apr 28, 2024
1 parent 42318d8 commit 9c38975
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Extensions/StatModifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public string BonusString
defaultDesc += FormatBonusPct(BonusExtraItemFind, "Items");
defaultDesc += FormatBonusPct(BonusLifeSteal, "Life Steal");
defaultDesc += FormatBonusPct(BonusManaSteal, "Mana Steal");
defaultDesc += FormatBonusNum(Shield, "Shield");
return defaultDesc;
}
}
Expand Down Expand Up @@ -175,6 +176,7 @@ public static string Combine(string sm1, string sm2)
sm1.BonusManaSteal = Combine(sm1.BonusManaSteal, sm2.BonusManaSteal);
sm1.BaseInboundDamageToMp = Combine(sm1.BaseInboundDamageToMp, sm2.BaseInboundDamageToMp);
sm1.BonusInboundDamageToMp = Combine(sm1.BonusInboundDamageToMp, sm2.BonusInboundDamageToMp);
sm1.Shield = Combine(sm1.Shield, sm2.Shield);
return sm1;
}
}
14 changes: 14 additions & 0 deletions src/Objects/StatModifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public partial class StatModifiers : HybrasylEntity<StatModifiers>
private string _bonusManaSteal;
private string _bonusInboundDamageToMp;
private string _bonusExtraFaith;
private string _shield;
#endregion

public StatModifiers()
Expand Down Expand Up @@ -1006,6 +1007,19 @@ public string BonusExtraFaith
_bonusExtraFaith = value;
}
}

[XmlAttribute]
public string Shield
{
get
{
return _shield;
}
set
{
_shield = value;
}
}
}
}
#pragma warning restore
1 change: 1 addition & 0 deletions src/XSD/Common.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<xs:attribute name="BonusManaSteal" type="xs:string" />
<xs:attribute name="BonusInboundDamageToMp" type="xs:string" />
<xs:attribute name="BonusExtraFaith" type="xs:string" />
<xs:attribute name="Shield" type="xs:string"/>
</xs:complexType>

<!-- Damage flags type -->
Expand Down

0 comments on commit 9c38975

Please sign in to comment.