예제 #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (Which == "" || !SkillProfileHelper.Profiles.ContainsKey(Which))
                {
                    SkillSettings.DoTell("SPH does not contain, or key is blank. Key: " + Which);
                    IEnumerator ie = SkillProfileHelper.Profiles.GetEnumerator();
                    while (ie.MoveNext())
                    {
                        SkillSettings.DoTell("Value: " + ((KeyValuePair <string, SkillProfile>)ie.Current).Key);
                    }
                    return;
                }

                if (targeted is BaseTMSkillItem)
                {
                    BaseTMSkillItem item = (BaseTMSkillItem)targeted;

                    if (Super)
                    {
                        SkillSettings.DoTell("Profile being set."); item.Profile = SkillProfileHelper.Supers[Which]; SkillSettings.DoTell("Profile set.");
                    }
                    else
                    {
                        from.SendMessage("Non-Super Profile profiles are not yet implemented.");
                    }
                }
                else
                {
                    from.SendMessage("Profile cannot be set on that item.");
                }
            }
예제 #2
0
		public TMSkillSession(Mobile m, BaseTMSkillItem item)
		{
			int points = 0;
			try
			{
				string name = item.Profile.ProfileName;				
				if (SkillProfileHelper.Profiles.ContainsKey(name))
				{
					points = SkillProfileHelper.Profiles[name].SkillPoints;
					SkillSettings.DoTell("Profile Direct Query - Points: "+points+" for " +name );
				}
				else
					SkillSettings.DoTell("Name "+name+" not present in Profiles.");
			}
			catch (Exception e ){ 
				SkillSettings.DoTell("Exception while getting profile by item's profile name. "+e);
			}
			if (item.Profile == null)
			{ SkillSettings.DoTell("Invalid Profile value. It will be reset to the default."); }
			if (item.Skin == null)
			{ SkillSettings.DoTell("Invalid Skin value. It will be reset to the default."); }

			m_Item = item;
			m_Mobile = m;

			if (item.Profile == null && SkillProfileHelper.Supers[SkillSettings.CCProfileName] != null)
				Profile = SkillProfileHelper.Supers[SkillSettings.CCProfileName];
			else if (SkillProfileHelper.Supers[SkillSettings.CCProfileName] == null)
			{ SkillSettings.DoTell("Invalid Profile cannot be remedied." ); invalidated = true; return; }
			else
				Profile = (SuperSkillProfile)item.Profile;

			if (m_Item.Points > 0)
				totalAllowedPoints = m_Item.Points;
			else
			{
				SkillSettings.DoTell("Item's points are <= 0, Profile " + Profile.ProfileName + "'s SkillPoints value: " + points + " will be used."); 
				totalAllowedPoints = points; }
			if (totalAllowedPoints <= 0)
			{ SkillSettings.DoTell("Invalid Points value. Cannot continue session."); invalidated = true; }

			if (item.Skin == "" || item.Skin == null)
				Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
			else
			{
				try
				{
					Skin = (TMSS4Skin)SkinHelper.getSkin(item.Skin);
				}
				catch
				{
					Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
				}
			}

		}
예제 #3
0
        internal static TMSkillSession SessionGenerate(CommandEventArgs e)
        {
            BaseTMSkillItem item = new BaseTMSkillItem(1001);

            item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile(SkillSettings.CCProfileName);
            item.Skin    = CCSkinName;
            TMSkillSession Session = new TMSkillSession(e.Mobile, item);

            return(Session);
        }
예제 #4
0
 public static void SessionTest_OnCommand(CommandEventArgs e)
 {
     if (QueryPageHelper.PluginExists("TMMaster"))
     {
         BaseTMSkillItem item = new BaseTMSkillItem(1001);
         item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile(SkillSettings.CCProfileName);
         item.Skin    = CCSkinName;
         TMSkillSession Session = new TMSkillSession(e.Mobile, item);
     }
 }
예제 #5
0
        public static void SkillSession_OnCommand(CommandEventArgs e)
        {
            BaseTMSkillItem item = new BaseTMSkillItem(0xedd);

            item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile("defaultInternal");
            item.Skin    = CCSkinName;
            TMSkillSession session = new TMSkillSession(e.Mobile, item);

            session.Start();
        }
예제 #6
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (Which == "" || !SkinHelper.skList.ContainsKey(Which))
                {
                    SkillSettings.DoTell("SH does not contain, or key is blank. Key: " + Which);
                    IEnumerator ie = SkinHelper.skList.GetEnumerator();
                    while (ie.MoveNext())
                    {
                        SkillSettings.DoTell("Value: " + ((KeyValuePair <string, BaseSkin>)ie.Current).Key);
                    }
                    return;
                }

                if (targeted is BaseTMSkillItem)
                {
                    BaseTMSkillItem item = (BaseTMSkillItem)targeted;
                    SkillSettings.DoTell("Skin being set."); item.Skin = Which; SkillSettings.DoTell("Skin set.");
                }
                else
                {
                    from.SendMessage("Skin cannot be set on that item via this method. If the item uses skins, please use the method provided by the author of that item.");
                }
            }
예제 #7
0
        public TMSkillSession(Mobile m, BaseTMSkillItem item)
        {
            int points = 0;

            try
            {
                string name = item.Profile.ProfileName;
                if (SkillProfileHelper.Profiles.ContainsKey(name))
                {
                    points = SkillProfileHelper.Profiles[name].SkillPoints;
                    SkillSettings.DoTell("Profile Direct Query - Points: " + points + " for " + name);
                }
                else
                {
                    SkillSettings.DoTell("Name " + name + " not present in Profiles.");
                }
            }
            catch (Exception e) {
                SkillSettings.DoTell("Exception while getting profile by item's profile name. " + e);
            }
            if (item.Profile == null)
            {
                SkillSettings.DoTell("Invalid Profile value. It will be reset to the default.");
            }
            if (item.Skin == null)
            {
                SkillSettings.DoTell("Invalid Skin value. It will be reset to the default.");
            }

            m_Item   = item;
            m_Mobile = m;

            if (item.Profile == null && SkillProfileHelper.Supers[SkillSettings.CCProfileName] != null)
            {
                Profile = SkillProfileHelper.Supers[SkillSettings.CCProfileName];
            }
            else if (SkillProfileHelper.Supers[SkillSettings.CCProfileName] == null)
            {
                SkillSettings.DoTell("Invalid Profile cannot be remedied."); invalidated = true; return;
            }
            else
            {
                Profile = (SuperSkillProfile)item.Profile;
            }

            if (m_Item.Points > 0)
            {
                totalAllowedPoints = m_Item.Points;
            }
            else
            {
                SkillSettings.DoTell("Item's points are <= 0, Profile " + Profile.ProfileName + "'s SkillPoints value: " + points + " will be used.");
                totalAllowedPoints = points;
            }
            if (totalAllowedPoints <= 0)
            {
                SkillSettings.DoTell("Invalid Points value. Cannot continue session."); invalidated = true;
            }

            if (item.Skin == "" || item.Skin == null)
            {
                Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
            }
            else
            {
                try
                {
                    Skin = (TMSS4Skin)SkinHelper.getSkin(item.Skin);
                }
                catch
                {
                    Skin = (TMSS4Skin)SkinHelper.getSkin(SkillSettings.CCSkinName);
                }
            }
        }
예제 #8
0
		public CenterStoneEntry2(Mobile from, BaseTMSkillItem stone)
			: base(0134, 1)
		{
			m_From = from;
			m_Stone = stone;
		}
예제 #9
0
		public ProfileEntry(Mobile from, BaseTMSkillItem stone)
			: base(179, 1)
		{
			m_From = from;
			m_Stone = stone;
		}
예제 #10
0
 public virtual void NormalTicket(BaseTMSkillItem item, Mobile from)
 {
 }
		public virtual void NormalTicket( BaseTMSkillItem item, Mobile from )
		{
		}
예제 #12
0
		internal static TMSkillSession SessionGenerate(CommandEventArgs e)
		{
			BaseTMSkillItem item = new BaseTMSkillItem(1001);
			item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile(SkillSettings.CCProfileName);
			item.Skin = CCSkinName;
			TMSkillSession Session = new TMSkillSession(e.Mobile, item);
			return Session;
		}
예제 #13
0
		public static void SessionTest_OnCommand(CommandEventArgs e)
		{
			if (QueryPageHelper.PluginExists("TMMaster"))
			{
				BaseTMSkillItem item = new BaseTMSkillItem( 1001 );
				item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile(SkillSettings.CCProfileName);
				item.Skin = CCSkinName;
				TMSkillSession Session = new TMSkillSession( e.Mobile, item );
			}
		}
예제 #14
0
		public static void SkillSession_OnCommand(CommandEventArgs e)
		{
			BaseTMSkillItem item = new BaseTMSkillItem( 0xedd );
			item.Profile = (SuperSkillProfile)SkillProfileHelper.getProfile("defaultInternal");
			item.Skin = CCSkinName;
			TMSkillSession session = new TMSkillSession( e.Mobile, item );
			session.Start();
		}