Aura.Channel.World.Entities.Creature.GetRestPose C# (CSharp) Метод

GetRestPose() публичный Метод

Returns Rest pose based on skill's rank.
public GetRestPose ( ) : byte
Результат byte
		public byte GetRestPose()
		{
			byte pose = 0;

			var skill = this.Skills.Get(SkillId.Rest);
			if (skill != null)
			{
				if (skill.Info.Rank >= SkillRank.R9)
					pose = 4;
				// Deactivated until we know how to keep the pose up.
				//if (skill.Info.Rank >= SkillRank.R1)
				//	pose = 5;
			}

			return pose;
		}

Usage Example

Пример #1
0
		/// <summary>
		/// Broadcasts SitDown in range of creature.
		/// </summary>
		/// <remarks>
		/// The byte parameter is the rest post to use, 0 being the default.
		/// To keep sitting in that position for others, even if they run
		/// out of range, CreatureStateEx is required to be set (see Rest).
		/// It's unknown which state is the one for Rest R1 though,
		/// it might not be implemented at all yet.
		/// </remarks>
		/// <param name="creature"></param>
		public static void SitDown(Creature creature)
		{
			var packet = new Packet(Op.SitDown, creature.EntityId);
			packet.PutByte(creature.GetRestPose());

			creature.Region.Broadcast(packet, creature);
		}