/// <summary> /// Converts this virtual room pet to a string to make it appear for game clients. /// </summary> public override string ToString() { fuseStringBuilder FSB = new fuseStringBuilder(); if(this.Information != null) { FSB.appendKeyValueParameter("i", this.ID); FSB.appendKeyValueParameter("n", this.Information.ID.ToString() + Convert.ToChar(4).ToString() + this.Information.Name); FSB.appendKeyValueParameter("f", this.Information.Figure); FSB.appendKeyValueParameter("l", this.X + " " + this.Y + " " + stringFunctions.formatFloatForClient(this.Z)); return FSB.ToString(); } return FSB.ToString(); }
/// <summary> /// Converts this room user to a room user details string and returns it. /// </summary> public override string ToString() { if (this.Session != null && this.Session.User != null) { fuseStringBuilder FSB = new fuseStringBuilder(); FSB.appendKeyValueParameter("i", this.ID); FSB.appendKeyValueParameter("a", Session.User.ID); FSB.appendKeyValueParameter("n", Session.User.Username); FSB.appendKeyValueParameter("f", Session.User.Figure); FSB.appendKeyValueParameter("s", Session.User.Sex); FSB.appendKeyValueParameter("l", this.X + " " + this.Y + " " + this.Z); if (Session.User.Motto.Length > 0) FSB.appendKeyValueParameter("c", Session.User.Motto); if (Session.User.Badge.Length > 0) FSB.appendKeyValueParameter("b", Session.User.Badge); // TODO: Swimoutfit return FSB.ToString(); } else return ""; }
/// <summary> /// Converts this store page representation to a string and returns it. /// </summary> public override string ToString() { if (this._szObj == null) // Not made yet! { fuseStringBuilder FSB = new fuseStringBuilder(); FSB.appendKeyValueParameter("i", base.getStringAttribute("name_index")); // Index name of page FSB.appendKeyValueParameter("n", base.getStringAttribute("name")); // Display name of page FSB.appendKeyValueParameter("l", base.getStringAttribute("layout")); // Layout type of page FSB.appendKeyValueParameter("g", base.getStringAttribute("img_headline")); // Name of headline image in c_images/catalogue/ directory OR internal cast files of client FSB.appendKeyValueParameter("e", base.getStringAttribute("img_teasers")); // List of teaser image names, separated by commas FSB.appendKeyValueParameter("h", base.getStringAttribute("body")); // Body text of page if (base.hasSetAttribute("label_pick")) // 'Click for more information' label FSB.appendKeyValueParameter("w", base.getStringAttribute("label_pick")); if (base.hasSetAttribute("label_extra_s")) // Extra information FSB.appendKeyValueParameter("s", base.getStringAttribute("label_extra_s")); // Custom data (t1:, t2: etc) for (int attID = 1; attID < 11; attID++) { string szExtraAttribute = "label_extra_t_" + attID; if (!base.hasSetAttribute(szExtraAttribute)) break; FSB.appendKeyValueParameter("t" + attID, base.getStringAttribute(szExtraAttribute)); } foreach (storeCatalogueSale lSale in this.getSales()) { FSB.appendKeyValueParameter("p", lSale.ToString()); } this._szObj = FSB.ToString(); } return this._szObj; }