I'm trying to hook a custom skills gump into the players paper doll. I found this is the core Mobile.cs

Code:
        public virtual void OnSkillsQuery(Mobile from)
        {
            if (from == this)
            {
                Send(new SkillUpdate(m_Skills));
            }
        }

Being virtual means i can override it.

So I put this into Player Mobile.

Code:
        #region Custom Skills Gump   
        public override void OnSkillsQuery( Mobile from )
        {
            if( from == this )
            {
                from.SendGump( new CustomSkillsTestGump(from, (Mobile)from));           
            }
            else base.OnSkillsQuery( from );
        }
        #endregion

This works and allows the skills button to pull my gump, however the problem is after the player logs in, it immediately opens the gump, the default i want the gump not to auto open upon login. Is there a way i can achieve this?

I have tried using this code

Code:
                if (from.HasGump(typeof(CustomSkillsTestGump)))
                    from.CloseGump(typeof(CustomSkillsTestGump));

However that did not close the gump upon login, in fact i do not think it did anything. lol...
 
Also i did try the closegump on the loginstats however that had no affect, probably because login stats is after playermobile.
 
do they have the skills gump open when they logout?
if so then that would cause it auto open or remain open when logging in
 
So the gump opens up upon login, closed the gump , logged out and back in and it opened up again. Forgot to mention this, it actually opens TWO copies of the gump upon login.. lol. I can close them and the skills button works fine, its just it does that on login.
 
Back