المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : طلب بخصوص سورس اليكس


AdmAhmed
2020-03-11, 03:58 PM
بعد ازنكم انا عندى فى السورس الإيميلات مش عاوزه تدلت ارجو الحل

محمد ياسر
2020-03-11, 05:30 PM
ازاي ياعني مش عايزه تتمسح

Tefa
2020-03-11, 09:00 PM
بيجيلك ايرور ف قنصل

AdmAhmed
2020-03-12, 08:35 AM
لا الايميل بيتقفل ويفتح تانى

Tefa
2020-03-15, 01:12 PM
سيرش
ActionType.DeleteCharacter
اقفله و بدله ب ده
[DataAttribute(ActionType.DeleteCharacter)]
public unsafe static void DeleteCharacter(Client.GameClient client, ServerSockets.Packet msg, ActionQuery* data)
{

if (client.Player.OnMyOwnServer == false)
return;
if (client.Player.SecurityPassword == data->dwParam)
{
if (client.Player.MyGuild != null)
{
#if Arabic
client.SendSysMesage("Please remove your guild.");
#else
client.SendSysMesage("Please remove your guild.");
#endif

return;
}
if (client.Player.MyClan != null)
{
#if Arabic
client.SendSysMesage("Please remove your clan.");
#else
client.SendSysMesage("Please remove your clan.");
#endif

return;
}

client.Player.Delete = true;
client.Socket.Disconnect();
}
else
{
#if Arabic
client.SendSysMesage("wrong password.");
#else
client.SendSysMesage("wrong password.");
#endif

}

}
ServerDatabase.cs
سيرش
protected unsafe override void OnDequeue
و بدله ب ده
protected unsafe override void OnDequeue(object obj, int time)
{
try
{

if (obj is string)
{
string text = obj as string;
if (text.StartsWith("[DemonBox]"))
{

const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "DemonBox" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
else if (text.StartsWith("[Chat]"))
{

const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "Chat" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
else if (text.StartsWith("[Item]"))
{

const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "Item" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
else if (text.StartsWith("[CallStack]"))
{

const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "CallStack" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
else if (text.StartsWith("[CallStack2]"))
{

const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "CallStack2" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
else if (text.StartsWith("[Pocker]"))
{
const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "Pocker" + dt.Month + "-" + dt.Day + "";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
if (text.StartsWith("[GMLogs]"))
{
const string UnhandledExceptionsPath = "Loggs\\";

var dt = DateTime.Now;
string date = "GMLogs";

if (!Directory.Exists(Application.StartupPath + UnhandledExceptionsPath))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);
if (!Directory.Exists(Application.StartupPath + "\\" + UnhandledExceptionsPath + date))
Directory.CreateDirectory(Application.StartupPath + "\\" + UnhandledExceptionsPath + date);

string fullPath = Application.StartupPath + "\\" + UnhandledExceptionsPath + date + "\\";

if (!File.Exists(fullPath + date + ".txt"))
{
File.WriteAllLines(fullPath + date + ".txt", new string[0]);
}


using (var SW = File.AppendText(fullPath + date + ".txt"))
{
SW.WriteLine(text);
SW.Close();
}
}
//GMLogs
}
else if (obj is Role.GameMap)
{
UpdateMapRace(obj as Role.GameMap);
}
else if (obj is Role.Instance.Guild.Member)
{
UpdateGuildMember(obj as Role.Instance.Guild.Member);
}
else if (obj is Role.Instance.Guild.UpdateDB)
{
UpdateGuildMember(obj as Role.Instance.Guild.UpdateDB);
}
else if (obj is Role.Instance.Union.Member)
{
UpdateUnionMember(obj as Role.Instance.Union.Member);
}
else if (obj is Role.Instance.Clan.Member)
{
UpdateClanMember(obj as Role.Instance.Clan.Member);
}
else
{
Client.GameClient client = obj as Client.GameClient;

if (client.Player != null && client.Player.Delete == true)
{
if (client.Map != null)
client.Map.View.LeaveMap<Role.Player>(client.Player);

DateTime Now64 = DateTime.Now;

MyConsole.WriteLine("Client " + client.Player.Name + " delete he account.");

if (File.Exists(Program.ServerConfig.DbLocation + "\\Users\\" + client.Player.UID + ".ini"))
File.Copy(Program.ServerConfig.DbLocation + "\\Users\\" + client.Player.UID + ".ini", Program.ServerConfig.DbLocation + "\\BackUp\\Users\\" + client.Player.UID + "date" + GenerateDate() + ".ini", true);
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersSpells\\" + client.Player.UID + ".bin"))
File.Copy(Program.ServerConfig.DbLocation + "\\PlayersSpells\\" + client.Player.UID + ".bin", Program.ServerConfig.DbLocation + "\\BackUp\\PlayersSpells\\" + client.Player.UID + "date" + GenerateDate() + ".bin", true);
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersProfs\\" + client.Player.UID + ".bin"))
File.Copy(Program.ServerConfig.DbLocation + "\\PlayersProfs\\" + client.Player.UID + ".bin", Program.ServerConfig.DbLocation + "\\BackUp\\PlayersProfs\\" + client.Player.UID + "date" + GenerateDate() + ".bin", true);
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersItems\\" + client.Player.UID + ".bin"))
File.Copy(Program.ServerConfig.DbLocation + "\\PlayersItems\\" + client.Player.UID + ".bin", Program.ServerConfig.DbLocation + "\\BackUp\\PlayersItems\\" + client.Player.UID + "date" + GenerateDate() + ".bin");


if (File.Exists(Program.ServerConfig.DbLocation + "\\Users\\" + client.Player.UID + ".ini"))
File.Delete(Program.ServerConfig.DbLocation + "\\Users\\" + client.Player.UID + ".ini");
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersSpells\\" + client.Player.UID + ".bin"))
File.Delete(Program.ServerConfig.DbLocation + "\\PlayersSpells\\" + client.Player.UID + ".bin");
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersProfs\\" + client.Player.UID + ".bin"))
File.Delete(Program.ServerConfig.DbLocation + "\\PlayersProfs\\" + client.Player.UID + ".bin");
if (File.Exists(Program.ServerConfig.DbLocation + "\\PlayersItems\\" + client.Player.UID + ".bin"))
File.Delete(Program.ServerConfig.DbLocation + "\\PlayersItems\\" + client.Player.UID + ".bin");
if (File.Exists(Program.ServerConfig.DbLocation + "\\Quests\\" + client.Player.UID + ".bin"))
File.Delete(Program.ServerConfig.DbLocation + "\\Quests\\" + client.Player.UID + ".bin");


Role.Instance.House house;
if (client.MyHouse != null && Role.Instance.House.HousePoll.ContainsKey(client.P layer.UID))
Role.Instance.House.HousePoll.TryRemove(client.Pla yer.UID, out house);
// PrestigeRanking.Remove(client.Player.UID);
if (File.Exists(Program.ServerConfig.DbLocation + "\\Houses\\" + client.Player.UID + ".bin"))
File.Delete(Program.ServerConfig.DbLocation + "\\Houses\\" + client.Player.UID + ".bin");

Role.Instance.Chi chi;
if (Role.Instance.Chi.ChiPool.ContainsKey(client.Play er.UID))
{
Role.Instance.Chi.ChiPool.TryRemove(client.Player. UID, out chi);
WindowsAPI.IniFile write = new WindowsAPI.IniFile("\\BackUp\\ChiInfo.txt");
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Dragon", chi.Dragon.ToString());
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Phoenix", chi.Phoenix.ToString());
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Turtle", chi.Turtle.ToString());
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Tiger", chi.Tiger.ToString());
}

Role.Instance.Flowers flow;
if (Role.Instance.Flowers.ClientPoll.ContainsKey(clie nt.Player.UID))
{
Role.Instance.Flowers.ClientPoll.TryRemove(client. Player.UID, out flow);
}

Role.Instance.InnerPower innerpower;
if (Role.Instance.InnerPower.InnerPowerPolle.Contains Key(client.Player.UID))
{
Role.Instance.InnerPower.InnerPowerPolle.TryRemove (client.Player.UID, out innerpower);
WindowsAPI.IniFile write = new WindowsAPI.IniFile("\\BackUp\\InnerPower.txt");
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Dragon", innerpower.ToString());
}
Role.Instance.JiangHu Jiang;
if (Role.Instance.JiangHu.Poll.ContainsKey(client.Pla yer.UID))
{
Role.Instance.JiangHu.Poll.TryRemove(client.Player .UID, out Jiang);
WindowsAPI.IniFile write = new WindowsAPI.IniFile("\\BackUp\\JiangHuInfo.txt");
write.WriteString(client.Player.UID.ToString() + "date" + GenerateDate() + "", "Jiang", Jiang.ToString());
}
Role.Instance.Associate.MyAsociats Associate;
if (Role.Instance.Associate.Associates.TryGetValue(cl ient.Player.UID, out Associate))
{
Role.Instance.Associate.Associates.TryRemove(clien t.Player.UID, out Associate);
}
Client.GameClient user;
Database.Server.GamePoll.TryRemove(client.Player.U ID, out user);

if (Server.NameUsed.Contains(user.Player.Name.GetHash Code()))
{
lock (Server.NameUsed)
Server.NameUsed.Remove(user.Player.Name.GetHashCod e());
}
client.Player.Delete = false;
return;
}

if ((client.ClientFlag & Client.ServerFlag.RemoveSpouse) == Client.ServerFlag.RemoveSpouse)
{
DestroySpouse(client);
client.ClientFlag &= ~Client.ServerFlag.RemoveSpouse;
return;
}
if ((client.ClientFlag & Client.ServerFlag.UpdateSpouse) == Client.ServerFlag.UpdateSpouse)
{
UpdateSpouse(client);
client.ClientFlag &= ~Client.ServerFlag.UpdateSpouse;
return;
}
if ((client.ClientFlag & Client.ServerFlag.SetLocation) != Client.ServerFlag.SetLocation && (client.ClientFlag & Client.ServerFlag.OnLoggion) == Client.ServerFlag.OnLoggion)
{
Game.MsgServer.MsgLoginClient.LoginHandler(client, client.OnLogin);
}
else if ((client.ClientFlag & Client.ServerFlag.QueuesSave) == Client.ServerFlag.QueuesSave)
{
if (client.Player.OnTransform)
{
client.Player.HitPoints = Math.Min(client.Player.HitPoints, (int)client.Status.MaxHitpoints);

}
SaveClient(client);

}
}
}
catch (Exception e) { MyConsole.SaveException(e); }
}

MRonlineGvrix
2020-03-15, 11:48 PM
جرب النسخة دي كدا

عفواً لايمكن عرض الروابط في الإرشيف