public static void OnLoginSuccessResponse(ref NetworkClient Client, ProcessedPacket Packet)
{
string CacheDir = GlobalSettings.Default.DocumentsPath + "CharacterCache\\" + PlayerAccount.Username;
if (!Directory.Exists(CacheDir))
{
Directory.CreateDirectory(CacheDir);
//The charactercache didn't exist, so send the Unix epoch, which is
//older than the server's stamp. This will cause the server to send the entire cache.
UIPacketSenders.SendCharacterInfoRequest(new DateTime(1970, 1, 1, 0, 0, 0, 0).ToString(CultureInfo.InvariantCulture));
}
else
{
if (!File.Exists(CacheDir + "\\Sims.cache"))
{
//The charactercache didn't exist, so send the Unix epoch, which is
//older than the server's stamp. This will cause the server to send the entire cache.
UIPacketSenders.SendCharacterInfoRequest(new DateTime(1970, 1, 1, 0, 0, 0, 0).ToString(CultureInfo.InvariantCulture));
}
else
{
string LastDateCached = Cache.GetDateCached();
if (LastDateCached == "")
{
UIPacketSenders.SendCharacterInfoRequest(new DateTime(1970, 1, 1, 0, 0, 0, 0).ToString(CultureInfo.InvariantCulture));
}
else
{
UIPacketSenders.SendCharacterInfoRequest(LastDateCached);
}
}
}
}