عرض مشاركة واحدة
قديم 2020-05-04, 08:30 PM
المشاركة 10
Rider
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: ايرور فى القونصول رايزوا
ايوه كدا هرد عليك انا بقا واقولك ان الكود مش هنا اصلا هنا مجرد update للايتمز فعلشان كدا الحل مش هنا خالص الحل فى الكود بتاع الادد مش كود الابديت لانك كدا مهما يحصل هيتكرر الايتمز تانى وهيجيلوا نفس الايرور انا مش قصدى حاجه ليكون كلامى هيعمل زعل ولا حاجه والله بس حبيت انبهك لحاجه مش اكتر
حبيبي ربنا ما يجيب زعل
طب ممكن تشرحلي

كود ده سطر سطر و كلمه كلمه و كل حاجه فيه بتعمل ايه + توضح قسن كود ابديت هنا و فين كود الاد مكانه فين

كود:
public void UpdateBestPlayer()
        {
            
Stuff = new Dictionary<stringuint>();
            
BestPlayer Rayzo.Network.GamePackets.MsgUserAbilityScore.RankingList.OrderByDescending(=> i.Prestige).ThenByDescending(=> i.Level).ThenBy(=> i.UID).FirstOrDefault();
            if (
BestPlayer == null) return;
            
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID"BestPlayer.UID).And("Position"0true))
            
using (var reader = new MySqlReader(cmd))
            {
                while (
reader.Read())
                {
                    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") == 4) if (!Stuff.ContainsKey(GetPositionName(4))) Stuff.Add(GetPositionName(4), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 19)
                    {
                        if (!
Stuff.ContainsKey(GetPositionName(19)))
                        
Stuff.Add(GetPositionName(19), reader.ReadUInt32("ID"));
                        if (!
Stuff.ContainsKey(GetPositionName(255)))
                        
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"0true))
                    
using (var reader2 = new MySqlReader(cmd2))
                    {
                        while (
reader2.Read())
                        {
                        }
                    }
                }
            }
        }