Tefa
2019-07-29, 03:30 AM
بسم الله و الصلاة و السلام علي رسول الله
هتدخل علي كلاس Prefection.cs
بعدها هتبحث علي
public void UpdateBestPlayer()
اقفله من السالب و امسحه و حط ده مكانه
public void UpdateBestPlayer()
{
Stuff = new Dictionary<string, uint>();
BestPlayer = MsgUserAbilityScore.RankingList.OrderByDescending( i => i.TotalPerfectionScore).ThenByDescending(i => i.Level).ThenBy(i => i.UID).FirstOrDefault();
if (BestPlayer == null) return;
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
using (var reader = new MySqlReader(cmd))
{
while (reader.Read())
{
if (reader.ReadByte("Position") == 1) if (!Stuff.ContainsKey(GetPositionName(1))) Stuff.Add(GetPositionName(1), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 3) if (!Stuff.ContainsKey(GetPositionName(3))) Stuff.Add(GetPositionName(3), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 5) if (!Stuff.ContainsKey(GetPositionName(5))) Stuff.Add(GetPositionName(5), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 9) if (!Stuff.ContainsKey(GetPositionName(9))) Stuff.Add(GetPositionName(9), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 16) if (!Stuff.ContainsKey(GetPositionName(16))) Stuff.Add(GetPositionName(16), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 17) if (!Stuff.ContainsKey(GetPositionName(17))) Stuff.Add(GetPositionName(17), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 4) if (!Stuff.ContainsKey(GetPositionName(4))) Stuff.Add(GetPositionName(4), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 15) if (!Stuff.ContainsKey(GetPositionName(15))) Stuff.Add(GetPositionName(15), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 19) if (!Stuff.ContainsKey(GetPositionName(19)))
{
Stuff.Add(GetPositionName(19), reader.ReadUInt32("ID"));
Stuff.Add(GetPositionName(255), reader.ReadByte("Plus"));
}
}
if (!Stuff.Keys.Contains("MountArmor"))
{
using (var cmd2 = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
using (var reader2 = new MySqlReader(cmd2))
{
while (reader2.Read())
{
if (reader2.ReadByte("Position") == 12) Stuff.Add(GetPositionName(17), reader2.ReadUInt32("ID"));
}
}
}
}
}
بس كده تم بحمد الله
يا ريت الي شاف اي مشكله في السورس يقولها في تعليق
هتدخل علي كلاس Prefection.cs
بعدها هتبحث علي
public void UpdateBestPlayer()
اقفله من السالب و امسحه و حط ده مكانه
public void UpdateBestPlayer()
{
Stuff = new Dictionary<string, uint>();
BestPlayer = MsgUserAbilityScore.RankingList.OrderByDescending( i => i.TotalPerfectionScore).ThenByDescending(i => i.Level).ThenBy(i => i.UID).FirstOrDefault();
if (BestPlayer == null) return;
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
using (var reader = new MySqlReader(cmd))
{
while (reader.Read())
{
if (reader.ReadByte("Position") == 1) if (!Stuff.ContainsKey(GetPositionName(1))) Stuff.Add(GetPositionName(1), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 3) if (!Stuff.ContainsKey(GetPositionName(3))) Stuff.Add(GetPositionName(3), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 5) if (!Stuff.ContainsKey(GetPositionName(5))) Stuff.Add(GetPositionName(5), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 9) if (!Stuff.ContainsKey(GetPositionName(9))) Stuff.Add(GetPositionName(9), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 16) if (!Stuff.ContainsKey(GetPositionName(16))) Stuff.Add(GetPositionName(16), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 17) if (!Stuff.ContainsKey(GetPositionName(17))) Stuff.Add(GetPositionName(17), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 4) if (!Stuff.ContainsKey(GetPositionName(4))) Stuff.Add(GetPositionName(4), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 15) if (!Stuff.ContainsKey(GetPositionName(15))) Stuff.Add(GetPositionName(15), reader.ReadUInt32("ID"));
if (reader.ReadByte("Position") == 19) if (!Stuff.ContainsKey(GetPositionName(19)))
{
Stuff.Add(GetPositionName(19), reader.ReadUInt32("ID"));
Stuff.Add(GetPositionName(255), reader.ReadByte("Plus"));
}
}
if (!Stuff.Keys.Contains("MountArmor"))
{
using (var cmd2 = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
using (var reader2 = new MySqlReader(cmd2))
{
while (reader2.Read())
{
if (reader2.ReadByte("Position") == 12) Stuff.Add(GetPositionName(17), reader2.ReadUInt32("ID"));
}
}
}
}
}
بس كده تم بحمد الله
يا ريت الي شاف اي مشكله في السورس يقولها في تعليق