Hello all!
Just trying to do players cannot hurt other players with levelable weapons,tryed this in BaseWeapon.cs :
Getting this issue:
Any advice?Thank you!
Just trying to do players cannot hurt other players with levelable weapons,tryed this in BaseWeapon.cs :
C#:
public virtual void OnHit(Mobile attacker, IDamageable damageable, double damageBonus)
{
if (EndDualWield)
{
ProcessingMultipleHits = false;
EndDualWield = false;
}
Mobile defender = damageable as Mobile;
Clone clone = null;
//
if (defender is PlayerMobile && (XmlLevelItem)XmlAttach.FindAttachment(this, typeof(XmlLevelItem)))
{
attacker.SendMessage( "Cannot hurt players with levelable weapons!" );
return;
}
C#:
Errors:
+ Items/Equipment/Weapons/BaseWeapon.cs:
CS0019: Line 2234: Operator '&&' cannot be applied to operands of type 'bool' and 'XmlLevelItem'
Scripts: One or more scripts failed to compile or no script files were found.
Any advice?Thank you!