Aura.Channel.World.Entities.Creatures.CreatureDeadMenu.ToString C# (CSharp) Метод

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

public ToString ( ) : string
Результат string
		public override string ToString()
		{
			var sb = new StringBuilder();

			if (this.Has(ReviveOptions.ArenaLobby))
				sb.Append("arena_lobby;");
			if (this.Has(ReviveOptions.ArenaSide))
				sb.Append("arena_side;");
			if (this.Has(ReviveOptions.ArenaWaitingRoom))
				sb.Append("arena_waiting;");
			if (this.Has(ReviveOptions.TirNaNog))
				sb.Append("tirnanog;");
			if (this.Has(ReviveOptions.BarriLobby))
				sb.Append("barri_lobby;");
			if (this.Has(ReviveOptions.NaoStone))
				sb.Append("naocoupon;");
			if (this.Has(ReviveOptions.DungeonEntrance))
				sb.Append("dungeon_lobby;");
			if (this.Has(ReviveOptions.Here))
				sb.Append("here;");
			if (this.Has(ReviveOptions.HereNoPenalty))
				sb.Append("trnsfrm_pvp_here;");
			if (this.Has(ReviveOptions.HerePvP))
				sb.Append("showdown_pvp_here;");
			if (this.Has(ReviveOptions.InCamp))
				sb.Append("camp;");
			if (this.Has(ReviveOptions.StatueOfGoddess))
				sb.Append("dungeon_statue;");
			if (this.Has(ReviveOptions.TirChonaill))
				sb.Append("tirchonaill;");
			if (this.Has(ReviveOptions.Town))
				sb.Append("town;");
			if (this.Has(ReviveOptions.WaitForRescue))
				sb.Append("stay;");

			return sb.ToString().Trim(';');
		}

Usage Example

Пример #1
0
		/// <summary>
		/// Sends DeadMenuR to creature's client.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="menu">Negative answer if null</param>
		public static void DeadMenuR(Creature creature, CreatureDeadMenu menu)
		{
			var packet = new Packet(Op.DeadMenuR, creature.EntityId);
			packet.PutByte(menu != null);
			if (menu != null)
			{
				packet.PutString(menu.ToString());
				packet.PutInt(0); // Beginner Nao Stone count
				packet.PutInt(0); // Nao Stone Count
			}

			creature.Client.Send(packet);
		}
All Usage Examples Of Aura.Channel.World.Entities.Creatures.CreatureDeadMenu::ToString