Aura.Channel.World.Party.ToString C# (CSharp) Method

ToString() public method

Returns the party name in the format the Party Member Wanted functionality requires.
public ToString ( ) : string
return string
		public override string ToString()
		{
			var name = (this.Type != PartyType.Dungeon ? this.Name : "[Dungeon] " + this.Name + "/" + this.DungeonLevel + "-" + this.Info);
			var password = (this.HasPassword ? "y" : "n");

			return string.Format("p{0}{1:d2}{2:d2}{3}{4}", (int)this.Type, this.MemberCount, this.MaxSize, password, name);
		}

Usage Example

Ejemplo n.º 1
0
		/// <summary>
		/// Updates the party title with new information, such as a change in the total party members,
		/// name, type, etc.
		/// </summary>
		/// <param name="party"></param>
		public static void PartyMemberWantedRefresh(Party party)
		{
			var packet = new Packet(Op.PartyWantedUpdate, party.Leader.EntityId);

			packet.PutByte(party.IsOpen);
			packet.PutString(party.ToString());

			party.Leader.Region.Broadcast(packet, party.Leader);
		}