Aura.Channel.World.Entities.Creature.GetChainCastLevel C# (CSharp) Method

GetChainCastLevel() public method

Returns the chain cast level the creature can use for the given skill.
Checks passive monster skill and upgrades of equipped weapons.
public GetChainCastLevel ( SkillId skillId ) : int
skillId SkillId
return int
		public int GetChainCastLevel(SkillId skillId)
		{
			if (this.Skills.Has(SkillId.ChainCasting))
				return 5;

			if (this.RightHand == null)
				return 0;

			return this.Inventory.GetChainCastLevel(skillId);
		}

Usage Example

示例#1
0
		/// <summary>
		/// Finishes preparing, adds stack.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="skill"></param>
		/// <param name="packet"></param>
		/// <returns></returns>
		public virtual bool Ready(Creature creature, Skill skill, Packet packet)
		{
			// Note: The client only prevents casting if stacks = max, if you go above the limit
			//   it lets you keep casting.

			var addStacks = skill.RankData.Stack + creature.GetChainCastLevel(skill.Info.Id);
			skill.Stacks = Math.Min(skill.RankData.StackMax, skill.Stacks + addStacks);

			Send.Effect(creature, Effect.StackUpdate, EffectSkillName, (byte)skill.Stacks, (byte)0);
			Send.Effect(creature, Effect.Casting, (short)skill.Info.Id, (byte)0, (byte)2, (short)0);

			Send.SkillReady(creature, skill.Info.Id);

			return true;
		}
All Usage Examples Of Aura.Channel.World.Entities.Creature::GetChainCastLevel