|  | 
|  أفضل جواب - كتبه MRonlineGvrix | 
| جرب كود: 
		 | 
 رد: مشكلة فى البيرفكشن
				رد: مشكلة فى البيرفكشن
			
		
	 
        public void Handle(Client.GameState client, byte[] myPacket)
        {
            try
            {
                switch (Info.ActionId)
                {
                    case 0://Temper
                        {
                            #region Minors
                            var packet2 = new byte[myPacket.Length - 4];
                            Array.Copy(myPacket, 4, packet2, 0, packet2.Length);
                            var variable = Kernel.Read7BitEncodedInt(packet2).SelectMany(System.BitConverter.GetBytes).ToArray();
                            var variable2 = new byte[variable.Length - 8];
                            Array.Copy(variable, 8, variable2, 0, variable.Length - 8);
                            var MinorsCount = (variable2.Length / 4);
                            uint[] Minors = new uint[MinorsCount];
                            byte x = 0;
                            for (int i = 0; i < MinorsCount; i++)
                            {
                                Minors[i] = BitConverter.ToUInt32(variable2, x);
                                x += 4;
                            }
                            #endregion
                            if (Minors != null)
                            {
                                ConquerItem Item;
                                if (client.Equipment.TryGetItem(Info.ItemUID, out Item))
                                {
                                    foreach (var minor in Minors)
                                    {
                                        ConquerItem ItemPlus;
                                        if (client.Inventory.TryGetItem(minor, out ItemPlus))
                                        {
                                            if (ItemPlus.ID == 730001
                                           || ItemPlus.ID == 730002
                                           || ItemPlus.ID == 730003
                                           || ItemPlus.ID == 730004
                                           || ItemPlus.ID == 730005
                                           || ItemPlus.ID == 730006
                                           || ItemPlus.ID == 730007
                                           || ItemPlus.ID == 730008) { client.MessageBox("You can't temp the perfection with a stone "); return; }
                                            if (ItemPlus.ID == 300000) { client.MessageBox("You can't temp the perfection with a steed "); return; }
                                            Item.PerfectionProgress += GetPlusStonePoints(ItemPlus.ID == 300000 ? ItemPlus.Plus : ItemPlus.ID)/*Database.PerfectionTable.CostList[ItemPlus.ID].Progress*/;
                                            client.Inventory.Remove(minor, Game.Enums.ItemUse.Remove, true);
                                        }
                                    }
                                    while (Item.PerfectionProgress >= GetPerfectionProgress(Item)/*Database.PerfectionTable.UpgradeList.Where(i => i.Stars == (Item.Stars + 1)).FirstOrDefault().Progress*/)
                                    {
                                        Item.PerfectionProgress -= GetPerfectionProgress(Item)/*Database.PerfectionTable.UpgradeList.Where(i => i.Stars == (Item.Stars + 1)).FirstOrDefault().Progress*/;
                                        Item.Stars++;
                                    }
                                    while (Item.Stars >= 54 && Item.PerfectionProgress > 0)
                                    {
                                        Item.Stars = 54;
                                        Item.PerfectionProgress = 0;
                                    }
                                    Item.Owner = client.Entity.Name;
                                    Item.OwnerUID = client.Entity.UID;
                                    Item.Mode = Game.Enums.ItemMode.Update;
                                    Item.Send(client);
                                    var proto = Kernel.FinalizeProtoBuf((new MsgItemRefineOptProto2()
                                    {
                                        ItemUID = Item.UID,
                                        EntityUID = client.Entity.UID,
                                        OwnerUID = Item.OwnerUID,
                                        OwnerName = Item.Owner,
                                        Progress = Item.PerfectionProgress,
                                        Stars = Item.Stars
                                    }), 3250);
                                    client.LoadItemStats();
                                    client.Send(proto);
                                    Database.ConquerItemTable.UpdatePerfection(Item);
                                    new MsgUserTotalRefineLev().Send(client);
                                }
                            }
                            break;
                        } 
   
	
		
		
		| الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
| أدوات الموضوع | |
| 
 | 
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة | 
| مشكلة فى ان بي سي البيرفكشن | MRonlineGvrix | مشكلات السيرفيرات كونكر الشخصيه | 11 | 2020-01-25 07:15 AM | 
| مشكلة في رانك البيرفكشن | Avengers-Co | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-09-02 12:54 AM |