fix(wands): Fixes codegenning BaseWand. (#718)
This commit is contained in:
parent
3b44ee0c6b
commit
b4566fe154
2 changed files with 13 additions and 7 deletions
|
|
@ -21,7 +21,7 @@ namespace Server.Items
|
||||||
ManaDraining
|
ManaDraining
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable(0, false)]
|
[Serializable(1, false)]
|
||||||
public abstract partial class BaseWand : BaseBashing
|
public abstract partial class BaseWand : BaseBashing
|
||||||
{
|
{
|
||||||
[InvalidateProperties]
|
[InvalidateProperties]
|
||||||
|
|
@ -44,8 +44,8 @@ namespace Server.Items
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Weight = 1.0;
|
Weight = 1.0;
|
||||||
WandEffect = effect;
|
_wandEffect = effect;
|
||||||
Charges = Utility.RandomMinMax(minCharges, maxCharges);
|
_charges = Utility.RandomMinMax(minCharges, maxCharges);
|
||||||
Attributes.SpellChanneling = 1;
|
Attributes.SpellChanneling = 1;
|
||||||
Attributes.CastSpeed = -1;
|
Attributes.CastSpeed = -1;
|
||||||
WeaponAttributes.MageWeapon = Utility.RandomMinMax(1, 10);
|
WeaponAttributes.MageWeapon = Utility.RandomMinMax(1, 10);
|
||||||
|
|
@ -74,7 +74,7 @@ namespace Server.Items
|
||||||
{
|
{
|
||||||
--Charges;
|
--Charges;
|
||||||
|
|
||||||
if (Charges == 0)
|
if (_charges == 0)
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1019073); // This item is out of charges.
|
from.SendLocalizedMessage(1019073); // This item is out of charges.
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ namespace Server.Items
|
||||||
|
|
||||||
if (Parent == from)
|
if (Parent == from)
|
||||||
{
|
{
|
||||||
if (Charges > 0)
|
if (_charges > 0)
|
||||||
{
|
{
|
||||||
OnWandUse(from);
|
OnWandUse(from);
|
||||||
}
|
}
|
||||||
|
|
@ -123,6 +123,12 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Deserialize(IGenericReader reader, int version)
|
||||||
|
{
|
||||||
|
_wandEffect = (WandEffect)reader.ReadInt();
|
||||||
|
_charges = reader.ReadInt();
|
||||||
|
}
|
||||||
|
|
||||||
public override void GetProperties(ObjectPropertyList list)
|
public override void GetProperties(ObjectPropertyList list)
|
||||||
{
|
{
|
||||||
base.GetProperties(list);
|
base.GetProperties(list);
|
||||||
|
|
@ -245,7 +251,7 @@ namespace Server.Items
|
||||||
|
|
||||||
public virtual void DoWandTarget(Mobile from, object o)
|
public virtual void DoWandTarget(Mobile from, object o)
|
||||||
{
|
{
|
||||||
if (Deleted || Charges <= 0 || Parent != from || o is StaticTarget || o is LandTarget)
|
if (Deleted || _charges <= 0 || Parent != from || o is StaticTarget || o is LandTarget)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": 0,
|
"version": 1,
|
||||||
"type": "Server.Items.BaseWand",
|
"type": "Server.Items.BaseWand",
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
Loading…
Add table
Add a link
Reference in a new issue