本文整理汇总了C#中ExpireTimer.DoExpire方法的典型用法代码示例。如果您正苦于以下问题:C# ExpireTimer.DoExpire方法的具体用法?C# ExpireTimer.DoExpire怎么用?C# ExpireTimer.DoExpire使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExpireTimer
的用法示例。
在下文中一共展示了ExpireTimer.DoExpire方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnResponse
public override void OnResponse(NetState state, RelayInfo info)
{
Mobile m = state.Mobile;
BaseWeapon weapon = m.Weapon as BaseWeapon;
TimeSpan duration = TimeSpan.FromSeconds((m.Skills[SkillName.Mysticism].Value / 1.2) + 1.0);//needs work, just a base formula.
switch (info.ButtonID)
{
case 0:
{
m.CloseGump(typeof(EnchantGump));
break;
}
case 1:
{
ExpireTimer t = (ExpireTimer)m_Table[weapon];
if (t != null)
t.DoExpire();
m.SendMessage("You added Hit Dispel to your weapon");
weapon.WeaponAttributes.HitDispel += 30;
m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
if (weapon.Name == null)
this.m_Name = weapon.GetType().Name;
else
this.m_Name = weapon.Name;
weapon.Name = this.m_Name + " [Enchanted]";
m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitDispel, m, duration);
t.Start();
m.CloseGump(typeof(EnchantGump));
EnchantSpell.AddEffects(m, weapon);
break;
}
case 2:
{
ExpireTimer t = (ExpireTimer)m_Table[weapon];
if (t != null)
t.DoExpire();
m.SendMessage("You added Hit Fireball to your weapon");
weapon.WeaponAttributes.HitFireball += 30;
m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
if (weapon.Name == null)
this.m_Name = weapon.GetType().Name;
else
this.m_Name = weapon.Name;
weapon.Name = this.m_Name + " [Enchanted]";
m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitFireball, m, duration);
t.Start();
m.CloseGump(typeof(EnchantGump));
EnchantSpell.AddEffects(m, weapon);
break;
}
case 3:
{
ExpireTimer t = (ExpireTimer)m_Table[weapon];
if (t != null)
t.DoExpire();
m.SendMessage("You added Hit Harm to your weapon");
weapon.WeaponAttributes.HitHarm += 30;
m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
if (weapon.Name == null)
this.m_Name = weapon.GetType().Name;
else
this.m_Name = weapon.Name;
weapon.Name = this.m_Name + " [Enchanted]";
m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitHarm, m, duration);
t.Start();
m.CloseGump(typeof(EnchantGump));
EnchantSpell.AddEffects(m, weapon);
break;
}
case 4:
{
ExpireTimer t = (ExpireTimer)m_Table[weapon];
if (t != null)
t.DoExpire();
m.SendMessage("You added Hit Lightning to your weapon");
weapon.WeaponAttributes.HitLightning += 30;
m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
if (weapon.Name == null)
this.m_Name = weapon.GetType().Name;
else
this.m_Name = weapon.Name;
weapon.Name = this.m_Name + " [Enchanted]";
m_Table[weapon] = t = new ExpireTimer(weapon, AosWeaponAttribute.HitLightning, m, duration);
t.Start();
m.CloseGump(typeof(EnchantGump));
EnchantSpell.AddEffects(m, weapon);
break;
}
case 5:
{
ExpireTimer t = (ExpireTimer)m_Table[weapon];
if (t != null)
t.DoExpire();
m.SendMessage("You added Hit Magic Arrow to your weapon");
//.........这里部分代码省略.........