Server.Items.TreasureMap.Decode C# (CSharp) Méthode

Decode() public méthode

public Decode ( Server.Mobile from ) : void
from Server.Mobile
Résultat void
		public void Decode( Mobile from )
		{
			if ( m_Completed || m_Decoder != null )
				return;

			double minSkill = GetMinSkillLevel();

			if ( from.Skills[SkillName.Cartography].Value < minSkill )
				from.SendLocalizedMessage( 503013 ); // The map is too difficult to attempt to decode.

			double maxSkill = minSkill + 60.0;

			if ( !from.CheckSkill( SkillName.Cartography, minSkill, maxSkill ) )
			{
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503018 ); // You fail to make anything of the map.
				return;
			}

			from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503019 ); // You successfully decode a treasure map!
			Decoder = from;

			DisplayTo( from );
		}

Usage Example

Exemple #1
0
 public override void OnClick()
 {
     if (!m_Map.Deleted)
     {
         m_Map.Decode(Owner.From);
     }
 }