本文整理汇总了C#中Server.Mobiles.PlayerMobile.HasGump方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.HasGump方法的具体用法?C# PlayerMobile.HasGump怎么用?C# PlayerMobile.HasGump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.HasGump方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendGumpThreaded
public static void SendGumpThreaded(PlayerMobile to)
{
if (to.AntiMacroGump && m_GumpDictionary.ContainsKey(to))
{
AntiMacroGump oldGump = m_GumpDictionary[to];
m_GumpDictionary.Remove(to);
//Close existing gump if it exists
if (to.HasGump(typeof(AntiMacroGump)))
to.CloseGump(typeof(AntiMacroGump));
to.SendGump(new AntiMacroGump(oldGump) );
return;
}
if ( !MySQLManager.SQLEnabled)
{
to.SendGump(new OldAntiMacroGump(to));
return;
}
AntiMacroGump gump = new AntiMacroGump(to);
new Thread(gump.ThreadedGump).Start();
}
示例2: OnLevelChanged
public override void OnLevelChanged( PlayerMobile owner )
{
base.OnLevelChanged( owner );
owner.ComputeResistances();
if( owner.HasGump( typeof( Gumps.CharInfoGump ) ) && owner.m_CharInfoTimer == null )
{
owner.m_CharInfoTimer = new Gumps.CharInfoGump.CharInfoTimer( owner );
owner.m_CharInfoTimer.Start();
}
}
示例3: AttemptRemoval
public virtual void AttemptRemoval( PlayerMobile m, int level, bool freeRemoval )
{
if( level != Level )
m.SendMessage( "Please remove the higher levels of this skill first." );
else if( CanRemoveThisFeat(m, freeRemoval) )
{
m.CP += Level * BaseCost;
m.CPSpent -= Level * BaseCost;
m.FeatSlots -= Level * BaseCost;
if( m.HasGump( typeof(CharInfoGump) ) )
m.SendGump( new CharInfoGump(m) );
Level--;
OnLevelChanged( m );
OnLevelLowered( m );
for( int i = 0; i < AssociatedFeats.Length; i++ )
m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m );
for( int i = 0; i < AssociatedSkills.Length; i++ )
m.Skills[AssociatedSkills[i]].Base = SkillLevel;
}
}
示例4: AttemptPurchase
public virtual void AttemptPurchase( PlayerMobile m, int level, bool freeRemoval )
{
if( CostLevel == FeatCost.None )
m.SendMessage( "This skill cannot be directly purchased." );
if( !MeetsOurRequirements(m) )
m.SendMessage( "You do not meet the requirements for this skill." );
else if( Level >= level )
AttemptRemoval( m, level, freeRemoval );
else if( (level - Level) != 1 )
m.SendMessage( "You cannot acquire a skill level before purchasing all previous levels." );
else if( m.CP < CostToRaise )
m.SendMessage( "You do not have enough CPs to acquire this skill level." );
else if( LevelSystem.CanSpendCP(m, CostToRaise) )
{
m.CP -= CostToRaise;
m.CPSpent += CostToRaise;
m.FeatSlots += CostToRaise;
Level++;
OnLevelChanged( m );
OnLevelRaised( m );
m.SendMessage( "You have purchased " + Name + " Level " + Level.ToString() + "." );
for( int i = 0; i < AssociatedFeats.Length; i++ )
m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m );
for( int i = 0; i < AssociatedSkills.Length; i++ )
m.Skills[AssociatedSkills[i]].Base = SkillLevel;
if( m.HasGump( typeof(CharInfoGump) ) )
m.SendGump( new CharInfoGump(m) );
}
}