Kamras
Member
I'm trying to hook a custom skills gump into the players paper doll. I found this is the core Mobile.cs
Being virtual means i can override it.
So I put this into Player Mobile.
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
However that did not close the gump upon login, in fact i do not think it did anything. lol...
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...