Working on implementing some extended features to my Spellbar[hotbar] code.
Using the ClearCurrentAbility in WeaponAbility.cs seems to be the only option to register if a player has executed/cancelled/changed weaponabilites (certain Bushido and Ninjitsu spells are weapon abilities)
I've worked out some previous problems but stuck on how to reference an item in a static method.
looking at:
http://www.runuo.com/community/threads/accessing-nonstatic-members.19619/ and
http://www.runuo.com/community/thre...uses-when-wearing-the-whole-set.100909/page-2
I've tried m_Scroll(item) and multiple other trial/errors that didn't work.
mirror post: Check if SpecialMove has been executed or cancelled/changed
I'll post here if I get the answer somewhere else.
Thanks
Using the ClearCurrentAbility in WeaponAbility.cs seems to be the only option to register if a player has executed/cancelled/changed weaponabilites (certain Bushido and Ninjitsu spells are weapon abilities)
I've worked out some previous problems but stuck on how to reference an item in a static method.
C#:
public static void ClearCurrentAbility(Mobile m)
{
m_Table.Remove(m);
if (Core.AOS && m.NetState != null)
m.Send(ClearWeaponAbility.Instance);
SpecialMove.ClearCurrentMove(m);
if ( m.HasGump(typeof (SpellBarGump.SpellBar_BarGump)) )
{
int dbx = 0; int dbxa = 0; int dby = 0; int dbya = 0; int xselect_var = 0;
m.CloseGump( typeof( SpellBarGump.SpellBar_BarGump ) );
m.SendGump(new SpellBarGump.SpellBar_BarGump(m, dbx, dbxa, dby, dbya, xselect_var, m_Scroll ));
}
}
Items/Weapons/Abilities/WeaponAbility.cs:
CS0120: Line 471: An object reference is required for the non-static field,
method, or property 'Server.Items.WeaponAbility.m_Scroll'
looking at:
http://www.runuo.com/community/threads/accessing-nonstatic-members.19619/ and
http://www.runuo.com/community/thre...uses-when-wearing-the-whole-set.100909/page-2
I've tried m_Scroll(item) and multiple other trial/errors that didn't work.
mirror post: Check if SpecialMove has been executed or cancelled/changed
I'll post here if I get the answer somewhere else.
Thanks