/// <summary>
/// Sends dialog to player's client.
/// </summary>
/// <param name="hide"></param>
/// <param name="elements"></param>
public void Msg(Hide hide, params DialogElement[] elements)
{
var element = new DialogElement();
if (hide == Hide.Face || hide == Hide.Both)
element.Add(new DialogPortrait(null));
else if (this.NPC.DialogPortrait != null)
element.Add(new DialogPortrait(this.NPC.DialogPortrait));
if (hide == Hide.Name || hide == Hide.Both)
element.Add(new DialogTitle(null));
element.Add(elements);
var xml = string.Format(
"<call convention='thiscall' syncmode='non-sync'>" +
"<this type='character'>{0}</this>" +
"<function>" +
"<prototype>void character::ShowTalkMessage(character, string)</prototype>" +
"<arguments>" +
"<argument type='character'>{0}</argument>" +
"<argument type='string'>{1}</argument>" +
"</arguments>" +
"</function>" +
"</call>",
this.Player.EntityId, HtmlEncode(element.ToString()));
Send.NpcTalk(this.Player, xml);
}