public override void OnDoubleClick(Mobile from)
		{
			if (Owner != null && from != Owner)
			{ from.SendMessage( SkillSettings.NotYoursMessage ); return; }
			TMSkillSession session = new TMSkillSession(from, this);
			session.Start();
		}
Example #2
0
        public void GetGumpCode(TMQueryPage page)
        {
            object o = page.GetValueSet();

            Page          = page;
            this.Dragable = false;
            if (o is TMSkillSession)
            {
                Session = (TMSkillSession)o;
                prof    = Session.Profile;
            }
            Page.BaseSkinByType(this);
            if (prof == null)
            {
                SkillSettings.DoTell("Invalid profile to set up Master."); return;
            }
            TMSS4Skin sk = Session.Skin;

            Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderID, sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
            AddLabel(sk.PointsLabelX, sk.PointsLabelY, sk.Red, sk.PointsLabel + " " + Session.totalSelectedPoints + " / " + Session.totalAllowedPoints);
            AddPage(1);

            IEnumerator ie           = prof.getProfileList();
            int         count        = prof.subProfiles.Count;
            int         i            = 0;
            int         pageid       = 1;
            int         pagesubcount = 0;

            //Add button for stats.
            Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "Stats", GumpButtonType.Reply, i + 1, 0, this);
            i++;
            pagesubcount++;
            while (ie.MoveNext())
            {
                string blah = ((SkillProfile)((KeyValuePair <string, SkillProfile>)ie.Current).Value).ProfileName;
                SkillSettings.DoTell2("Master gump debug: " + blah);
                Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + blah, GumpButtonType.Reply, i + 1, 0, this);
                i++;
                pagesubcount++;
                if (pagesubcount == 5)
                {
                    pagesubcount = 0;
                }
                if (pagesubcount == 1)
                {
                    Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
                }
                if (pagesubcount == 0)
                {
                    pageid++;
                    AddPage(pageid);
                    Page.AddSuperButton(sk.NextButtonMX, sk.NextButtonMY, sk.NextButtonMH, sk.NextButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.NextTextM, GumpButtonType.Page, 0, pageid + 1, this);
                    if (pageid != 1)
                    {
                        Page.AddSuperButton(sk.PrevButtonMX, sk.PrevButtonMY, sk.PrevButtonMH, sk.PrevButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.PrevTextM, GumpButtonType.Page, 0, pageid - 1, this);
                    }
                }
            }
            Session.Mobile.SendGump(this);
        }
		public override void OnDoubleClick(Mobile from)
		{
			if (TicketRequired && !HasSkillTicket(from))
			{ from.SendMessage(SkillSettings.NoTicketMessage); return; }

			TMSkillSession session = new TMSkillSession(from, this);
			session.Start();			
		}
		public TMQueryPage(string argh, TMSkillSession session)
			: base(0, 0)
		{
			arg = argh;
			Mobile = session.Mobile;
			m_sk = session.Skin;
			Session = session;
			Activate();
		}
Example #5
0
 public static void MasterTest_OnCommand(CommandEventArgs e)
 {
     if (QueryPageHelper.PluginExists("TMMaster"))
     {
         TMSkillSession s    = SessionGenerate(e);
         TMQueryPage    page = new TMQueryPage("TMSS Session Master Gump", s);
         //e.Mobile.SendGump( page );
     }
 }
Example #6
0
 public TMQueryPage(string argh, TMSkillSession session)
     : base(0, 0)
 {
     arg     = argh;
     Mobile  = session.Mobile;
     m_sk    = session.Skin;
     Session = session;
     Activate();
 }
Example #7
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);
     }
 }
Example #8
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);
        }
Example #9
0
        public override void OnDoubleClick(Mobile from)
        {
            if (Owner != null && from != Owner)
            {
                from.SendMessage(SkillSettings.NotYoursMessage); return;
            }
            TMSkillSession session = new TMSkillSession(from, this);

            session.Start();
        }
Example #10
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();
        }
		public void GetGumpCode( TMQueryPage page )
		{
			object o = page.GetValueSet();
			Page = page;
			this.Dragable = false;
			if (o is TMSkillSession)
			{
				Session = (TMSkillSession)o;
				prof = Session.Profile;
			}
			Page.BaseSkinByType(this);
			if (prof == null)
			{ SkillSettings.DoTell("Invalid profile to set up Master."); return; }
			TMSS4Skin sk = Session.Skin;
			Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ButtonOverlay, sk.ButtonUnderID, sk.ButtonUnderID, sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
			AddLabel(sk.PointsLabelX, sk.PointsLabelY, sk.Red, sk.PointsLabel+" "+Session.totalSelectedPoints+" / "+Session.totalAllowedPoints);
			AddPage( 1 );

			IEnumerator ie = prof.getProfileList();
			int count = prof.subProfiles.Count;
			int i = 0;
			int pageid = 1;
			int pagesubcount = 0;
			//Add button for stats.
			Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "Stats", GumpButtonType.Reply, i + 1, 0, this);
			i++;
			pagesubcount++;
			while (ie.MoveNext() )
			{				
				string blah = ((SkillProfile)((KeyValuePair<string,SkillProfile>)ie.Current).Value).ProfileName;
				SkillSettings.DoTell2("Master gump debug: "+blah);
				Page.AddSuperButton(sk.ProfileX, sk.ProfileY + ((i % 6) * (sk.ProfileSpacer + sk.ProfileButtonH)), sk.ProfileButtonH, sk.ProfileButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + blah, GumpButtonType.Reply, i + 1, 0, this);
				i++;
				pagesubcount++;
				if( pagesubcount == 5 )
					pagesubcount = 0;
				if( pagesubcount == 1 )
					Page.AddSuperButton(sk.FinishButtonX, sk.FinishButtonY, sk.FinishButtonH, sk.FinishButtonW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.FinishLabel, GumpButtonType.Reply, 101, 0, this);
				if (pagesubcount == 0)
				{
					pageid++;
					AddPage(pageid);
					Page.AddSuperButton(sk.NextButtonMX, sk.NextButtonMY, sk.NextButtonMH, sk.NextButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.NextTextM, GumpButtonType.Page, 0, pageid + 1,this);
					if (pageid != 1)
						Page.AddSuperButton(sk.PrevButtonMX, sk.PrevButtonMY, sk.PrevButtonMH, sk.PrevButtonMW, sk.ProfileNormalID, sk.SelectUnderlay, sk.SelectUnderlay, "" + sk.PrevTextM, GumpButtonType.Page, 0, pageid - 1, this);
				}
			}	
			Session.Mobile.SendGump(this);
		}
Example #12
0
        public void GetGumpCode(TMQueryPage page)
        {
            Page = page;
            SkillSettings.DoTell("GetGumpCode, Skill Gump.");
            if (Profile == null)
            {
                try
                {
                    Dictionary <string, object> h = (Dictionary <string, object>)Page.GetValueSet();
                    Profile = (SkillProfile)h["Profile"];
                    Skin    = (TMSS4Skin)h["Skin"];
                    Session = (TMSkillSession)h["Session"];
                }
                catch (Exception e)
                {
                    SkillSettings.DoTell("Error when generating skill gump: " + e);
                    return;
                }
            }
            if (Profile == null)
            {
                SkillSettings.DoTell("Profile is still null. Cannot continue."); return;
            }
            if (!Profile.SkillEnable)
            {
                SkillSettings.DoTell("Skills not enabled on this profile.");
                return;
            }
            this.Dragable = false;
            Page.BaseSkinByType(this);
            Page.AddTitle("Skill Gump for " + Profile.ProfileName + ": ", "Control", this);
            if (Profile.IconID > 0)
            {
                SkillSettings.DoTell("Adding Icon: " + Profile.IconID);
                Page.AddIcon(Profile.IconID, "Control", this);
            }
            this.AddLabel(35, Skin.GetCoord("Control", "H") - 40, Skin.HighlightText, "Profile Maximum: " + Profile.SkillPoints + " pts");
            ButtonInfo inf2 = Skin.ButtonInfo["SessionAddButton"];

            SkillSettings.DoTell("Inf2: X: " + inf2.X + " Y: " + inf2.Y + " W: " + inf2.W + " H: " + inf2.H + " BG: " + inf2.bgID + " TX: " + inf2.text);
            Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Skin.ListUnderButtonN, Skin.ListUnderButtonP, Skin.AddLabel, GumpButtonType.Reply, 1, 0, this);
            IEnumerator ie = Profile.MasterHash.GetEnumerator();
            GumpList    l  = new GumpList(this, "details", this.Skin);

            l.numperpage = 8;
            l.AddColumn("Skill Name");
            l.AddColumn("Skill Value");
            l.AddColumn("Weight");
            l.AddColumn("Select");
            l.SetColumnCount(4);
            l.ChangeColumnWidth(0, 200);
            l.X            = Skin.SelectStartX;
            l.Y            = Skin.SelectStartY;
            l.ShowDividers = true;
            int colcount = 3;             // at least columns for title, value, and checkbox.

            if (Profile.CapEnable)
            {
                colcount++;
            }
            if (Profile.WeightEnable)
            {
                colcount++;
            }
            l.SetColumnCount(colcount);
            int checkID = 0;

            if (!Profile.Manual)
            {
                checkID = 1000;
            }
            else
            {
                checkID = 3000;
            }
            Dictionary <string, TMUsedInfo> selitem = Session.HasSelectedItems(Profile.ProfileName);

            SkillSettings.DoTell(" Selitem debug: " + selitem.Count + " Profile: " + Profile.ProfileName + " TSP: " + Session.totalSelectedPoints);
            IEnumerator selitemie = selitem.GetEnumerator();

            while (selitemie.MoveNext())
            {
                SkillSettings.DoTell(" - " + ((KeyValuePair <string, TMUsedInfo>)selitemie.Current).Value.SkillName + " Value: " + ((KeyValuePair <string, TMUsedInfo>)selitemie.Current).Value.SkillValue);
            }
            while (ie.MoveNext())
            {
                TMSkillInfo inf = (TMSkillInfo)((KeyValuePair <string, TMSkillInfo>)ie.Current).Value;

                /*
                 * if (y % sk.NumPerPage == 0)
                 * {Page.SetupPage(thisProfile.ProfileName, y == 0, thisProfile.MasterHash.Count - y < sk.NumPerPage ? true : false, page); page++;}
                 * Page.AddEntryCheck( 0, y%sk.NumPerPage, sk.SelectUp, sk.SelectDn, false, (1000 * page) + (y % sk.NumPerPage), ""+inf.SkillName, ""+inf.SkillWeight, ""+inf.SkillValue );
                 * y++;*/
                GumpListEntry e = new GumpListEntry(0, 0, l, Skin.EntryDefaultWidth, Skin.EntryDefaultHeight);

                e.AddColumn(inf.SkillName);
                e.AddColumn("" + inf.SkillValue);
                if (Profile.CapEnable)
                {
                    e.AddColumn("" + inf.SkillCap);
                }
                if (Profile.WeightEnable)
                {
                    e.AddColumn("" + inf.SkillWeight);
                }
                if (!Profile.Manual)
                {
                    e.AddColumn(new GumpCheck(-2, 0, Skin.EntryDefaultCheckUp, Skin.EntryDefaultCheckDn, selitem.ContainsKey(inf.SkillName), checkID));
                }
                else
                {
                    e.AddColumn(new GumpTextEntry(0, 0, 30, Skin.EntryDefaultHeight, Skin.NormalText, checkID, ""));
                }

                checkID++;
                l.Add(e);
            }
            l.CommitList();
            Session.Mobile.SendGump(this);
        }
		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();
		}
		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;
		}
Example #15
0
        public void GetGumpCode(TMQueryPage page)
        {
            Page          = page;
            this.Dragable = false;
            object o = page.GetValueSet();

            if (o is TMSkillSession)
            {
                Session = (TMSkillSession)o;
            }
            else
            {
                SkillSettings.SystemWrite("Error. No valid Session."); return;
            }
            if (!Session.Profile.StatEnable)
            {
                return;
            }
            Page.BaseSkinByType(this);
            Page.AddTitle("Stats: ", "Control", this);
            if (!Session.Profile.StatForce)
            {
                this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Max: " + Session.Profile.StatSum + " pts");
            }
            else
            {
                this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Requirement: " + Session.Profile.StatSum + " pts");
            }
            ButtonInfo inf2 = Session.Skin.ButtonInfo["StatAddButton"];

            Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Session.Skin.ListUnderButtonN, Session.Skin.ListUnderButtonP, Session.Skin.AddLabel, GumpButtonType.Reply, 1, 0, this);
            Dictionary <string, int> statvals = Session.Stats;
            GumpList g = new GumpList(this, "details", Session.Skin);

            g.SetColumnCount(3);
            g.AddColumn("Stat:");
            g.AddColumn("Max Value: ");
            g.AddColumn("Enter Value: ");
            GumpListEntry str = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            str.AddColumn("Strength");
            str.AddColumn("Max: " + Session.Profile.StrVal);
            str.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 1000, statvals.ContainsKey("Strength") ? "" + statvals["Strength"]:""));
            GumpListEntry dex = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            dex.AddColumn("Dexterity");
            dex.AddColumn("Max: " + Session.Profile.DexVal);
            dex.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 2000, statvals.ContainsKey("Dexterity") ? "" + statvals["Dexterity"] : ""));
            GumpListEntry intel = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);

            intel.AddColumn("Intelligence");
            intel.AddColumn("Max: " + Session.Profile.IntVal);
            intel.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 3000, statvals.ContainsKey("Intelligence") ? "" + statvals["Intelligence"] : ""));
            g.Add(str);
            g.Add(dex);
            g.Add(intel);
            g.ShowDividers = true;
            g.X            = Session.Skin.SelectStartX;
            g.Y            = Session.Skin.SelectStartY;
            g.CommitList();
            Session.Mobile.SendGump(this);
        }
		public override void OnDoubleClick(Mobile from)
		{
			TMSkillSession session = new TMSkillSession(from, this);
			session.Start();
		}
		public void GetGumpCode(TMQueryPage page)
		{			
			Page = page;
			this.Dragable =false;
			object o = page.GetValueSet();
			if (o is TMSkillSession)
				Session = (TMSkillSession)o;
			else
			{ SkillSettings.SystemWrite("Error. No valid Session."); return; }
			if( !Session.Profile.StatEnable )
				return;
			Page.BaseSkinByType(this);
			Page.AddTitle("Stats: ", "Control",this);
			if( !Session.Profile.StatForce )
				this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Max: "+Session.Profile.StatSum+" pts");
			else
				this.AddLabel(50, 70, Session.Skin.HighlightText, "Overall Requirement: " + Session.Profile.StatSum + " pts");
			ButtonInfo inf2 = Session.Skin.ButtonInfo["StatAddButton"];
			Page.AddSuperButton(inf2.X, Page.Y + inf2.Y, inf2.H, inf2.W, inf2.bgID, Session.Skin.ListUnderButtonN, Session.Skin.ListUnderButtonP, Session.Skin.AddLabel, GumpButtonType.Reply, 1, 0,this);
			Dictionary<string,int> statvals = Session.Stats;
			GumpList g = new GumpList(this, "details", Session.Skin );
			g.SetColumnCount( 3 );
			g.AddColumn( "Stat:" );
			g.AddColumn( "Max Value: ");
			g.AddColumn( "Enter Value: ");
			GumpListEntry str = new GumpListEntry( 0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight );
			str.AddColumn( "Strength" );
			str.AddColumn( "Max: "+Session.Profile.StrVal );
			str.AddColumn( new GumpTextEntry( 0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 1000, statvals.ContainsKey("Strength") ? ""+statvals["Strength"]:"" ) );
			GumpListEntry dex = new GumpListEntry( 0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight );
			dex.AddColumn("Dexterity");
			dex.AddColumn("Max: " + Session.Profile.DexVal);
			dex.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 2000, statvals.ContainsKey("Dexterity") ? "" + statvals["Dexterity"] : ""));
			GumpListEntry intel = new GumpListEntry(0, 0, g, Session.Skin.EntryDefaultWidth, Session.Skin.EntryDefaultHeight);
			intel.AddColumn("Intelligence");
			intel.AddColumn("Max: " + Session.Profile.IntVal);
			intel.AddColumn(new GumpTextEntry(0, 0, 25, Session.Skin.EntryDefaultHeight, Session.Skin.NormalText, 3000, statvals.ContainsKey("Intelligence") ? "" + statvals["Intelligence"] : ""));
			g.Add(str);
			g.Add(dex);
			g.Add(intel);
			g.ShowDividers = true;
			g.X = Session.Skin.SelectStartX;
			g.Y = Session.Skin.SelectStartY;
			g.CommitList();
			Session.Mobile.SendGump(this);
		}
		public void GetGumpCode(TMQueryPage page)
		{
			Page = page;
			SkillSettings.DoTell("GetGumpCode, Skill Gump.");
			if (Profile == null)
			{
				try
				{
					Dictionary<string, object> h = (Dictionary<string, object>)Page.GetValueSet();
					Profile = (SkillProfile)h["Profile"];
					Skin = (TMSS4Skin)h["Skin"];
					Session = (TMSkillSession)h["Session"];
				}
				catch (Exception e)
				{
					SkillSettings.DoTell("Error when generating skill gump: " + e);
					return;
				}
			}
			if (Profile == null)
			{ SkillSettings.DoTell("Profile is still null. Cannot continue."); return; }
			if( !Profile.SkillEnable )
			{
				SkillSettings.DoTell("Skills not enabled on this profile.");
				return;
			}
			this.Dragable = false;
			Page.BaseSkinByType(this);
			Page.AddTitle( "Skill Gump for "+Profile.ProfileName+": ", "Control",this);
			if (Profile.IconID > 0)
			{ 
				SkillSettings.DoTell("Adding Icon: "+Profile.IconID);
				Page.AddIcon(Profile.IconID, "Control", this); 
			}
			this.AddLabel(35, Skin.GetCoord("Control", "H") - 40, Skin.HighlightText, "Profile Maximum: " + Profile.SkillPoints + " pts");
			ButtonInfo inf2 = Skin.ButtonInfo["SessionAddButton"];
			SkillSettings.DoTell("Inf2: X: "+inf2.X+" Y: "+inf2.Y+" W: "+inf2.W+" H: " +inf2.H+" BG: "+inf2.bgID+ " TX: "+inf2.text);
			Page.AddSuperButton(inf2.X, Page.Y+inf2.Y, inf2.H, inf2.W, inf2.bgID, Skin.ListUnderButtonN, Skin.ListUnderButtonP, Skin.AddLabel, GumpButtonType.Reply, 1, 0,this);
			IEnumerator ie = Profile.MasterHash.GetEnumerator();
			GumpList l = new GumpList(this, "details", this.Skin);
			l.numperpage=8;
			l.AddColumn("Skill Name");
			l.AddColumn("Skill Value");
			l.AddColumn("Weight");
			l.AddColumn("Select");
			l.SetColumnCount(4);
			l.ChangeColumnWidth(0, 200);
			l.X = Skin.SelectStartX;
			l.Y = Skin.SelectStartY;
			l.ShowDividers = true;
			int colcount = 3; // at least columns for title, value, and checkbox.
			if (Profile.CapEnable)
				colcount++;
			if (Profile.WeightEnable)
				colcount++;
			l.SetColumnCount(colcount);
			int checkID = 0;
			if (!Profile.Manual)
				checkID = 1000;
			else
				checkID = 3000;
			Dictionary<string,TMUsedInfo> selitem = Session.HasSelectedItems( Profile.ProfileName );
			SkillSettings.DoTell(" Selitem debug: "+selitem.Count+" Profile: "+Profile.ProfileName+" TSP: "+Session.totalSelectedPoints);
			IEnumerator selitemie = selitem.GetEnumerator();
			while (selitemie.MoveNext())
			{
				SkillSettings.DoTell(" - " + ((KeyValuePair<string, TMUsedInfo>)selitemie.Current).Value.SkillName + " Value: " + ((KeyValuePair<string, TMUsedInfo>)selitemie.Current).Value.SkillValue);
			}
			while (ie.MoveNext())
			{
				TMSkillInfo inf = (TMSkillInfo)((KeyValuePair<string,TMSkillInfo>)ie.Current).Value;
				/*
				if (y % sk.NumPerPage == 0)
				{Page.SetupPage(thisProfile.ProfileName, y == 0, thisProfile.MasterHash.Count - y < sk.NumPerPage ? true : false, page); page++;}
				Page.AddEntryCheck( 0, y%sk.NumPerPage, sk.SelectUp, sk.SelectDn, false, (1000 * page) + (y % sk.NumPerPage), ""+inf.SkillName, ""+inf.SkillWeight, ""+inf.SkillValue );
				y++;*/
				GumpListEntry e = new GumpListEntry(0, 0, l, Skin.EntryDefaultWidth, Skin.EntryDefaultHeight);

				e.AddColumn(inf.SkillName);
				e.AddColumn("" + inf.SkillValue);
				if (Profile.CapEnable)
					e.AddColumn("" + inf.SkillCap);
				if (Profile.WeightEnable)
					e.AddColumn("" + inf.SkillWeight);
				if (!Profile.Manual)
					e.AddColumn(new GumpCheck(-2, 0, Skin.EntryDefaultCheckUp, Skin.EntryDefaultCheckDn, selitem.ContainsKey(inf.SkillName), checkID));
				else
					e.AddColumn(new GumpTextEntry(0, 0, 30, Skin.EntryDefaultHeight, Skin.NormalText, checkID, ""));

				checkID++;
				l.Add(e);
			}
			l.CommitList();	
			Session.Mobile.SendGump(this);
		}
		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 );
			}
		}
Example #20
0
        public override void OnDoubleClick(Mobile from)
        {
            TMSkillSession session = new TMSkillSession(from, this);

            session.Start();
        }