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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
*.suo
release/
debug/
tests/
2 changes: 1 addition & 1 deletion SharpMapTracker/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace SharpMapTracker
{
public class Constants
{
public const string MAP_TRACKER_VERSION = "0.8.21";
public const string MAP_TRACKER_VERSION = "0.8.27";

public const string MAP_SHARE_HOST = "brunodunbar.no-ip.info";
public const int MAP_SHARE_PORT = 41567;
Expand Down
Binary file modified SharpTibiaProxy.v12.suo
Binary file not shown.
16 changes: 15 additions & 1 deletion SharpTibiaProxy/Domain/ClientVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ public class ClientVersion
public static readonly ClientVersion Version1075 = new ClientVersion { Number = 1075, FileVersion = "10.7.5.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 55 };
public static readonly ClientVersion Version1076 = new ClientVersion { Number = 1076, FileVersion = "10.7.6.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 55 };
public static readonly ClientVersion Version1079 = new ClientVersion { Number = 1079, FileVersion = "10.7.9.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Current = Version1079;
public static readonly ClientVersion Version1090 = new ClientVersion { Number = 1090, FileVersion = "10.9.0.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1091 = new ClientVersion { Number = 1091, FileVersion = "10.9.1.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1092 = new ClientVersion { Number = 1092, FileVersion = "10.9.2.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1094 = new ClientVersion { Number = 1094, FileVersion = "10.9.4.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1095 = new ClientVersion { Number = 1095, FileVersion = "10.9.5.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1097 = new ClientVersion { Number = 1097, FileVersion = "10.9.7.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Version1098 = new ClientVersion { Number = 1098, FileVersion = "10.9.8.0", OtbmVersion = 2, OtbMajorVersion = 3, OtbMinorVersion = 56 };
public static readonly ClientVersion Current = Version1098;

public int Number { get; private set; }
public string FileVersion { get; private set; }
Expand Down Expand Up @@ -85,6 +92,13 @@ public static ClientVersion GetFromFileVersion(string fileVersion)
case "10.7.5.0": return Version1075;
case "10.7.6.0": return Version1076;
case "10.7.9.0": return Version1079;
case "10.9.0.0": return Version1090;
case "10.9.1.0": return Version1091;
case "10.9.2.0": return Version1092;
case "10.9.4.0": return Version1094;
case "10.9.5.0": return Version1095;
case "10.9.7.0": return Version1097;
case "10.9.8.0": return Version1098;
default: return null;
}
}
Expand Down
4 changes: 4 additions & 0 deletions SharpTibiaProxy/Domain/Items.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ public bool Load(string filename, int version)
case 0x23: //default action
reader.ReadUInt16();
break;
case 0x24: // New in 10.92, unknown
break;
case 0x25: // New in 10.92, unknown
break;
case 0xFE: //is usable
break;
case 0xFF: //end of attributes
Expand Down
9 changes: 9 additions & 0 deletions SharpTibiaProxy/Network/ProtocolWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,15 @@ private void ParseServerLoginSuccess(InMessage message)

if (client.Version.Number >= ClientVersion.Version1059.Number)
client.ExpertModeButtonEnabled = message.ReadByte().Equals(0x1);

if (client.Version.Number >= ClientVersion.Version1090.Number) // From 10.80 at least
{
var StoreImage = message.ReadString();
var IncCoinsTransferShop = message.ReadByte();

// Not sure what this extra byte is. Maybe the above var is a ushort?
var extra = message.ReadByte();
}
}

private void ParseServerChannelEvent(InMessage message)
Expand Down
21 changes: 21 additions & 0 deletions SharpTibiaProxy/Network/Proxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,31 @@ private void ParseServerLoginMessage()
charList[j].WorldIPString = worldList[WorldID].Hostname;
}

/**
* Not very accurately named variables, but I'll settle for some pseudocode in case of futher implementations
*
* if version < 10.80:
* ushort PremiumTime
* else if version < 10.82
* bool isPremium
* uint PremiumTime (In seconds from epoch - don't quote me on this :D)
* else if version >= 10.82
* byte AccountStatus (0 = normal, 1 = frozen, 2 = suspended)
* bool isPremium
* uint PremiumTime
*/

ushort PremiumTime = serverInMessage.ReadUShort();
clientOutMessage.WriteUShort(PremiumTime);

if (client.Version.Number >= ClientVersion.Version1090.Number) // From 10.80 - but haven't added 10.80 support.
{
uint PremiumSeconds = serverInMessage.ReadUInt(); // Not sure about this name.
clientOutMessage.WriteUInt(PremiumSeconds);
}

clientOutMessage.Size = clientOutMessage.WritePosition;

}
break;
default:
Expand Down
3 changes: 2 additions & 1 deletion SharpTibiaProxy/Util/ClientChooser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public static Client ShowBox(ClientChooserOptions options)
}
else
{
newClientChooser.Height = 54;
//newClientChooser.Height = 54;
newClientChooser.uxUseOT.Enabled = false;
}

newClientChooser.options = options;
Expand Down
62 changes: 37 additions & 25 deletions SharpTibiaProxy/Util/ClientChooser.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions SharpTibiaProxy/Util/ClientChooser.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
2 changes: 1 addition & 1 deletion SharpTibiaProxy/Util/ClientChooserBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static Client ChooseClient(ClientChooserOptions options, object selectedI
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(dialog.FileName);
if (fvi.ProductName.Equals("Tibia Player"))
{
client = Client.Open(dialog.FileName, options.Arguments);
client = Client.OpenMC(dialog.FileName, options.Arguments);
if (options.SaveClientPath == true)
{
ClientChooserBase.SaveClientPath(
Expand Down
Loading