public bool UseItem(ItemTemplateInfo item) { if (m_energy > item.Property4) { m_energy -= item.Property4; m_delay += item.Property5; GSPacketIn pkg = m_player.Out.SendPropUseRespone(this, -2, -2, item.TemplateID); m_game.SendToAll(pkg, m_player); SpellMgr.ExecuteSpell(m_game, m_game.CurrentPlayer, item); m_player.QuestInventory.CheckUseItem(item.TemplateID); if (item.Property6 == 1 && IsAttacking) { StopAttacking(); m_game.CheckState(0); } return(true); } return(false); }
public void UseSecondWeapon() { if (this.PlayerDetail.SecondWeapon != null && this.m_energy - this.PlayerDetail.SecondWeapon.Template.Property4 >= 0) { if (this.m_secondWeapon <= 0) { if (this.PlayerDetail.SecondWeapon != null) { if (this.AngelCount <= 0) { this.PlayerDetail.SendMessage(eMessageType.ERROR, LanguageMgr.GetTranslation("UnusableSecondWeapon", new object[] { this.PlayerDetail.SecondWeapon.Template.Name })); } else { this.m_secondWeapon = this.PlayerDetail.SecondWeapon.Template.Property6; this.m_energy -= this.PlayerDetail.SecondWeapon.Template.Property4; SpellMgr.ExecuteSpell(base.Game, this, this.PlayerDetail.SecondWeapon); this.m_game.SendPlayerUseProp(this, -2, -2, this.PlayerDetail.SecondWeapon.TemplateID); this.AngelCount--; } } } } }
private void ChangeProperty(Player player) { if (this.rand.Next(100) < this.m_probability) { SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10022)); player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("AtomBombEquipEffect.Success", new object[0])); } }
private void ChangeProperty(Player player) { if (rand.Next(100) < m_probability) { SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10020)); //player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("ArmorPiercerEquipEffect.Success")); } }
private void player_AfterKilledByLiving(Living living, Living target, int damageAmount, int criticalAmount) { if (this.rand.Next(100) < this.m_probability) { living.EffectTrigger = true; SpellMgr.ExecuteSpell(living.Game, living as Player, ItemMgr.FindItemTemplate(10021)); living.Game.SendEquipEffect(living, LanguageMgr.GetTranslation("NoHoleEquipEffect.Success", new object[0])); } }
private void ChangeProperty(Player player) { if (rand.Next(100) < m_probability) { SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10015)); player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("IceFronzeEquipEffect.Success")); //player.Game.SendAttackEffect(player, 1);reEn } }
void player_AfterKilledByLiving(Living living, Living target, int damageAmount, int criticalAmount) { if (rand.Next(100) < m_probability) { living.ShootMovieDelay = 50; SpellMgr.ExecuteSpell(living.Game, living as Player, ItemMgr.FindItemTemplate(10021)); // living.Game.SendEquipEffect(living, LanguageMgr.GetTranslation("NoHoleEquipEffect.Success")); } }
private void ChangeProperty(Player player, int ball) { if (AbstractEffect.random.Next(1000000) < this.m_probability * 10000 && !player.AttackEffectTrigger) { this.EffectTrigger = true; player.FlyingPartical = 65; SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10020)); player.AttackEffectTrigger = true; player.Game.AddAction(new LivingSayAction(player, LanguageMgr.GetTranslation("ArmorPiercerEquipEffect.msg", new object[0]), 9, 0, 1000)); } }
public bool UseItem(ItemTemplateInfo item) { if (this.CanUseItem(item)) { this.m_energy -= item.Property4; this.m_delay += item.Property5; this.m_game.SendPlayerUseProp(this, -2, -2, item.TemplateID); SpellMgr.ExecuteSpell(this.m_game, this.m_game.CurrentLiving as Player, item); return(true); } return(false); }
public bool UseItem(ItemTemplateInfo item) { if (CanUseItem(item))// && IsUseProp == true) { m_energy -= item.Property4; m_delay += item.Property5; m_game.SendPlayerUseProp(this, -2, -2, item.TemplateID); SpellMgr.ExecuteSpell(m_game, m_game.CurrentLiving as Player, item); //if (item.Property6 == 1 && IsAttacking) //{ // StopAttacking(); // m_game.CheckState(0); //} return(true); } return(false); }
public bool UseItem(ItemTemplateInfo item) { bool result; if (this.CanUseItem(item)) { this.m_energy -= item.Property4; this.m_delay += item.Property5; this.m_game.SendPlayerUseProp(this, -2, -2, item.TemplateID); this.OnPlayerUseProp(this); SpellMgr.ExecuteSpell(this.m_game, this.m_game.CurrentLiving as Player, item); if (item.Property6 == 1 && base.IsAttacking) { this.StopAttacking(); this.m_game.CheckState(0); } result = true; } else { result = false; } return(result); }