Server.Mobiles.BaseCreature.GetContextMenuEntries C# (CSharp) Method

GetContextMenuEntries() public method

public GetContextMenuEntries ( Mobile from, List list ) : void
from Mobile
list List
return void
        public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
        {
            base.GetContextMenuEntries( from, list );

            if ( m_AI != null && Commandable )
                m_AI.GetContextMenuEntries( from, list );

            if ( m_bTamable && !m_bControlled && from.Alive )
                list.Add( new TameEntry( from, this ) );

            AddCustomContextEntries( from, list );

            if ( CanTeach && from.Alive )
            {
                Skills ourSkills = this.Skills;
                Skills theirSkills = from.Skills;

                for ( int i = 0; i < ourSkills.Length && i < theirSkills.Length; ++i )
                {
                    Skill skill = ourSkills[i];
                    Skill theirSkill = theirSkills[i];

                    if ( skill != null && theirSkill != null && skill.Base >= 60.0 && CheckTeach( skill.SkillName, from ) )
                    {
                        double toTeach = skill.Base / 3.0;

                        if ( toTeach > 42.0 )
                            toTeach = 42.0;

                        list.Add( new TeachEntry( (SkillName)i, this, from, ( toTeach > theirSkill.Base ) ) );
                    }
                }
            }
        }
BaseCreature