Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions Core/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ private Globals m_oGlobals
private bool m_bUpdatingRoom = false;
private bool m_bUpdateRoomOnStreamEnd = false;
private string m_sRoomTitle = string.Empty;
private string m_sRoomUid = string.Empty;
// private Match m_oRegMatch;
private Hashtable m_oIndicatorHash = new Hashtable();
private Hashtable m_oCompassHash = new Hashtable();
Expand Down Expand Up @@ -1400,21 +1401,40 @@ private string ProcessXMLNodeElement(XmlNode oXmlNode)
{
string argstrAttributeName4 = "subtitle";
m_sRoomTitle = GetAttributeData(oXmlNode, argstrAttributeName4);
if (m_sRoomTitle.StartsWith(" - "))
m_sRoomUid = "0";

Regex m_RoomNameRegex = new Regex(@"\[(?<roomname>[^\]]+)\](?: \((?<roomuid>\d+)\))?");
System.Text.RegularExpressions.Match o_Match = m_RoomNameRegex.Match(m_sRoomTitle);
if (o_Match.Success)
{
m_sRoomTitle = m_sRoomTitle.Substring(3);
m_sRoomTitle = o_Match.Groups["roomname"].Value;
m_sRoomUid = o_Match.Groups["roomuid"].Success ? o_Match.Groups["roomuid"].Value : "0";
}

if (m_sRoomTitle.StartsWith("["))
else
{
m_sRoomTitle = m_sRoomTitle.Substring(1, m_sRoomTitle.Length - 2);
if (m_sRoomTitle.StartsWith(" - "))
{
m_sRoomTitle = m_sRoomTitle.Substring(3);
}

if (m_sRoomTitle.StartsWith("["))
{
m_sRoomTitle = m_sRoomTitle.Substring(1, m_sRoomTitle.Length - 2);
}

m_sRoomTitle = m_sRoomTitle.Trim();
}

m_sRoomTitle = m_sRoomTitle.Trim();
string argkey = "roomname";
m_oGlobals.VariableList.Add(argkey, m_sRoomTitle, Globals.Variables.VariableType.Reserved);
string argkey1 = "roomname";
m_oGlobals.VariableList.Add(argkey1, m_sRoomTitle, Globals.Variables.VariableType.Reserved);
string argsVariable1 = "$roomname";
VariableChanged(argsVariable1);

string argkey2 = "uid";
m_oGlobals.VariableList.Add(argkey2, m_sRoomUid, Globals.Variables.VariableType.Reserved);
string argsVariable2 = "$uid";
VariableChanged(argsVariable2);

m_bUpdatingRoom = true;
break;
}
Expand Down Expand Up @@ -3359,4 +3379,4 @@ private void GameSocket_EventConnectionLost()
m_bManualDisconnect = false;
}
}
}
}
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
// by using the '*' as shown below:
// <Assembly: AssemblyVersion("1.0.*")>

[assembly: AssemblyVersion("4.0.2.9")]
[assembly: AssemblyFileVersion("4.0.2.9")]
[assembly: AssemblyVersion("4.0.2.10")]
[assembly: AssemblyFileVersion("4.0.2.10")]