示例#1
0
    private void SharpMind(Creature user, Creature target, SkillId skillId, SharpMindStatus state)
    {
        var packet = new Packet(Op.SharpMind, target.EntityId);

        packet.PutLong(user.EntityId);
        packet.PutByte(1);
        packet.PutByte(1);
        packet.PutUShort((ushort)skillId);
        packet.PutInt((int)state);

        user.Region.Broadcast(packet, user);
    }
示例#2
0
文件: AiScript.cs 项目: Rokstarr/aura
 /// <summary>
 /// Sends SharpMind to all applicable creatures.
 /// </summary>
 /// <remarks>
 /// The Wiki is speaking of a passive Sharp Mind skill, but it doesn't
 /// seem to be a skill at all anymore.
 ///
 /// TODO: Implement old Sharp Mind (optional).
 ///
 /// TODO: To implement the old Sharp Mind we have to figure out how
 ///   to display a failed Sharp Mind (X). "?" is shown for skill id 0.
 ///   Older logs make use of status 3 and 4, but the current NA client
 ///   doesn't seem to react to them.
 ///   If we can't get X to work we could use ? for both.
 /// </remarks>
 /// <param name="skillId"></param>
 /// <param name="status"></param>
 protected void SharpMind(SkillId skillId, SharpMindStatus status)
 {
     foreach (var creature in _playersInRange)
     {
         if (status == SharpMindStatus.Cancelling || status == SharpMindStatus.None)
         {
             Send.SharpMind(this.Creature, creature, skillId, SharpMindStatus.Cancelling);
             Send.SharpMind(this.Creature, creature, skillId, SharpMindStatus.None);
         }
         else
         {
             Send.SharpMind(this.Creature, creature, skillId, status);
         }
     }
 }
示例#3
0
        /// <summary>
        /// Sends SharpMind to all creatures in range of user.
        /// </summary>
        /// <param name="user"></param>
        /// <param name="target"></param>
        /// <param name="skillId"></param>
        /// <param name="state"></param>
        public static void SharpMind(Creature user, Creature target, SkillId skillId, SharpMindStatus state)
        {
            var packet = new Packet(Op.SharpMind, target.EntityId);

            packet.PutLong(user.EntityId);
            packet.PutByte(1);
            packet.PutByte(1);
            packet.PutUShort((ushort)skillId);
            packet.PutInt((int)state);

            target.Client.Send(packet);
        }
示例#4
0
 public static MabiPacket SharpMind(MabiCreature user, MabiCreature target, SkillConst skillId, SharpMindStatus state)
 {
     return new MabiPacket(Op.SharpMind, target.Id)
         .PutLong(user.Id)
         .PutByte(1)
         .PutByte(1)
         .PutShort((ushort)skillId)
         .PutInt((uint)state);
 }
示例#5
0
 private void SharpMind(MabiCreature user, SharpMindStatus state, SkillConst skill)
 {
     var inRange = WorldManager.Instance.GetPlayersInRange(user, WorldConf.SightRange);
     foreach (var creature in inRange)
     {
         creature.Client.Send(PacketCreator.SharpMind(user, creature, skill, state));
     }
 }
示例#6
0
        /// <summary>
        /// Sends SharpMind to all creatures in range of user.
        /// </summary>
        /// <param name="user"></param>
        /// <param name="target"></param>
        /// <param name="skillId"></param>
        /// <param name="state"></param>
        public static void SharpMind(Creature user, Creature target, SkillId skillId, SharpMindStatus state)
        {
            var packet = new Packet(Op.SharpMind, target.EntityId);
            packet.PutLong(user.EntityId);
            packet.PutByte(1);
            packet.PutByte(1);
            packet.PutUShort((ushort)skillId);
            packet.PutInt((int)state);

            target.Client.Send(packet);
        }
示例#7
0
		/// <summary>
		/// Sends SharpMind to all applicable creatures.
		/// </summary>
		/// <remarks>
		/// The Wiki is speaking of a passive Sharp Mind skill, but it doesn't
		/// seem to be a skill at all anymore.
		/// 
		/// TODO: Implement old Sharp Mind (optional).
		/// 
		/// TODO: To implement the old Sharp Mind we have to figure out how
		///   to display a failed Sharp Mind (X). "?" is shown for skill id 0.
		///   Older logs make use of status 3 and 4, but the current NA client
		///   doesn't seem to react to them.
		///   If we can't get X to work we could use ? for both.
		/// </remarks>
		/// <param name="skillId"></param>
		/// <param name="status"></param>
		protected void SharpMind(SkillId skillId, SharpMindStatus status)
		{
			foreach (var creature in _playersInRange)
			{
				if (status == SharpMindStatus.Cancelling || status == SharpMindStatus.None)
				{
					Send.SharpMind(this.Creature, creature, skillId, SharpMindStatus.Cancelling);
					Send.SharpMind(this.Creature, creature, skillId, SharpMindStatus.None);
				}
				else
				{
					Send.SharpMind(this.Creature, creature, skillId, status);
				}
			}
		}