قديم 2020-01-25, 04:19 AM
المشاركة 2
MRonlineGvrix
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: مشكله +12 دي تاني مره ومش عارف احلها
حضرتك هتفح
كلاس PackerHandler.cs

وتبحث عن


كود:
static void ComposePlus(Compose composeClient.GameState client

تقفلة من السالب وتبدلة بدا


كود:
static void ComposePlus(Compose composeClient.GameState client)
        {
            
ConquerItem Item null;
            
ConquerItem[] Minors null;
            if (
client.Inventory.TryGetItem(compose[0], out Item) || (client.Equipment.TryGetItem(compose[0]) != null) || (compose.Mode == Compose.QuickCompose))
            {
                if (
Item == null && client.Inventory.TryGetItem(compose[0], out Item) == false && (client.Equipment.TryGetItem(compose[0]) != null))
                    
Item client.Equipment.TryGetItem(compose[0]);

                if (
compose.Mode == Compose.DragonBallUpgrade || compose.Mode == Compose.MeteorUpgrade)
                {
                    
Minors = new ConquerItem[compose.Countx];
                    for (
int i 0compose.Countxi++)
                    {
                        if (!
client.Inventory.TryGetItem(compose[2], out Minors[i]))
                            return;
                        else
                            if (
Minors[i].UID == Item.UID)
                                return;
                    }
                }
                else
                {
                    
Minors = new ConquerItem[compose.Count 1];
                    for (
int i 0compose.Count 1i++)
                    {
                        if (!
client.Inventory.TryGetItem(compose[1], out Minors[i]))
                            return;
                        else
                            if (
Minors[i].UID == Item.UID)
                                return;
                    }
                }
                
ushort pos ItemPosition(Item.ID);
                if (
pos == ConquerItem.Bottle || pos == ConquerItem.Garment || pos == ConquerItem.LeftWeaponAccessory || pos == ConquerItem.RightWeaponAccessory || pos == ConquerItem.SteedArmor//mohsen.. i'm remove crop
                    
return;

                if (
compose.Mode == Compose.ChanceUpgrade || compose.Mode == Compose.QuickCompose)
                {
                    if (
Item.Plus 12 && Item.PlusProgress != 0)
                    {
                        
double percent = (double)Item.PlusProgress / (double)Database.DataHolder.ComposePlusPoints(Item.Plus);
                        if (
Kernel.Rate(percent))
                        {
                            
Item.PlusProgress 0;
                            
Item.Plus++;
                        }
                        else
                            
Item.PlusProgress 0;
                        
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                        
Item.Send(client);
                        
Database.ConquerItemTable.UpdatePlus(Item);
                        
Database.ConquerItemTable.UpdatePlusProgress(Item);
                        if (
Item.Plus >= 9)
                            
Kernel.SendWorldMessage(new Message("Congratulations, " client.Entity.Name " has upgraded His " Database.ConquerItemInformation.BaseInformations[Item.ID].Name " to + " Item.Plus " and " Item.PlusProgress " in Progress!"System.Drawing.Color.RedNetwork.GamePackets.Message.TopLeft), Program.Values);
                    }
                    return;
                }
                if (
compose.Mode == Compose.MeteorUpgrade || compose.Mode == Compose.DragonBallUpgrade)
                {
                    
Database.ConquerItemInformation info = new AbdoRedaGxV4.Database.ConquerItemInformation(Item.IDItem.Plus);

                    
Minors = new ConquerItem[compose.Count 2];
                    for (
int i 0compose.Count 2i++)
                    {
                        if (!
client.Inventory.TryGetItem(compose[2], out Minors[i]))
                            return;
                        else
                            if (
Minors[i].UID == Item.UID)
                                return;
                    }
                    switch (
compose.Mode)
                    {
                        case 
Compose.DragonBallUpgrade:
                            {
                                if (
Item.ID 10 == (byte)Game.Enums.ItemQuality.Super)
                                    break;
                                if (
Item.Durability Item.MaximDurability)
                                    break;
                                
// byte chance = (byte)(70 - ((infos.BaseInformation.Level - (infos.BaseInformation.Level > 100 ? 30 : 0)) / (10 - Item.ID % 10)));
                                
byte cost DragonBallUpgradeCost(Iteminfo);
                                
double chance = (((double)compose.Countx / (double)cost) * 100);
                                if (
MyMath.Success(chance))
                                {
                                    switch ((
Game.Enums.ItemQuality)(Item.ID 10))
                                    {
                                        case 
Game.Enums.ItemQuality.Normal:
                                        case 
Game.Enums.ItemQuality.NormalV1:
                                        case 
Game.Enums.ItemQuality.NormalV2:
                                        case 
Game.Enums.ItemQuality.NormalV3Item.ID = (Item.ID - (Item.ID 10)) + (byte)Game.Enums.ItemQuality.Refined; break;
                                        default: 
Item.ID++; break;
                                    }
                                    
Database.ConquerItemTable.UpdateItemID(Itemclient);
                                    
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                    
Item.Send(client);
                                    
client.Send(new ItemUsage(true)
                                    {
                                        
UID client.Entity.UID,
                                        
dwParam 1,
                                        
ID ItemUsage.DragonBallUpgrade
                                    
});
                                }
                                else
                                {
                                    
Item.Durability = (ushort)(Item.Durability 2);
                                    
Database.ConquerItemTable.UpdateDurabilityItem(Item);
                                    
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                    
Item.Send(client);
                                }
                                foreach (var 
item in Minors)
                                    
client.Inventory.Remove(itemAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                if (
compose.Countx cost)
                                {
                                    var 
diff compose.Countx cost;
                                    
client.Inventory.Add((uint)(Minors[0].ID == 720028 1088000 1088001), 0, (byte)diff);
                                }
                                break;

                            }
                        case 
Compose.MeteorUpgrade:
                            {
                                if (
info.BaseInformation.Level == ItemMaxLevel(ItemPosition(info.BaseInformation.ID)))
                                    break;
                                if (
Item.Durability Item.MaximDurability)
                                {
                                    
client.MessageBox("Ro7 sal7ha ya Dog .."nullnull);
                                    break;
                                }
                                
byte cost MeteorUpgradeCost(Item.ID);
                                if (
ItemPosition(Item.ID) == (ushort)ConquerItem.Armor || ItemPosition(Item.ID) == (ushort)ConquerItem.Head || IsShield(Item.ID))
                                {
                                    if (
info.BaseInformation.Level >= 110)
                                        
cost 1;
                                }
                                else
                                {
                                    if (
info.BaseInformation.Level >= 115)
                                        
cost 1;
                                }
                                
double chance = (((double)compose.Countx / (double)cost) * 100);
                                
uint newid info.CalculateUplevel();
                                if (
newid != && newid != Item.ID)
                                {
                                    if (
MyMath.Success(chance))
                                    {
                                        
Item.ID newid;
                                        
info = new AbdoRedaGxV4.Database.ConquerItemInformation(Item.IDItem.Plus);
                                        
Item.Durability Item.MaximDurability info.BaseInformation.Durability;
                                        
Database.ConquerItemTable.UpdateItemID(Itemclient);
                                        
Database.ConquerItemTable.UpdateDurabilityItem(Item);
                                        
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                        
Item.Send(client);

                                        
client.Send(new ItemUsage(true)
                                        {
                                            
UID client.Entity.UID,
                                            
dwParam 1,
                                            
ID ItemUsage.MeteorUpgrade
                                        
});

                                    }
                                    else
                                    {
                                        
Item.Durability = (ushort)(Item.Durability 2);
                                        
Database.ConquerItemTable.UpdateDurabilityItem(Item);
                                        
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                        
Item.Send(client);
                                    }
                                }
                                foreach (var 
item in Minors)
                                    
client.Inventory.Remove(itemAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                if (
compose.Countx cost)
                                {
                                    var 
diff compose.Countx cost;
                                    
client.Inventory.Add((uint)(Minors[0].ID == 720028 1088000 1088001), 0, (byte)diff);
                                }
                                break;
                            }
                    }
                }

                foreach (var 
item in Minors)
                {
                    var 
ItemPlus item;
                    
Database.ConquerItemInformation infos = new AbdoRedaGxV4.Database.ConquerItemInformation(Item.IDItem.Plus);
                    switch (
compose.Mode)
                    {
                        case 
Compose.CurrentSteed:
                        case 
Compose.Plus:
                            {
                                if (
Item.Plus == 12 && Item.GetItemType() == ConquerItem.ItemTypes.WingID || Item.Plus == 12 && pos == ConquerItem.Wing || Item.Plus == 12 && pos == ConquerItem.Steed)//DigitalConquer
                                
{
                                    
Item.PlusProgress += Database.DataHolder.StonePlusPoints(ItemPlus.Plus);
                                    
Item.PlusProgress -= Database.DataHolder.ComposePlusPoints(Item.Plus);//DigitalConquer
                                    
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                    
Item.Send(client);
                                    
Database.ConquerItemTable.UpdatePlusProgress(Item);
                                    
client.Inventory.Remove(ItemPlusAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                }
                                if (
Item.Plus 12 && Item.GetItemType() != ConquerItem.ItemTypes.GarmentID_1 && Item.GetItemType() != ConquerItem.ItemTypes.GarmentID_2 && Item.GetItemType() != ConquerItem.ItemTypes.BottleID && Item.GetItemType() != ConquerItem.ItemTypes.RightAccessory1 && Item.GetItemType() != ConquerItem.ItemTypes.RightAccessory2 && Item.GetItemType() != ConquerItem.ItemTypes.RightAccessory3 && Item.GetItemType() != ConquerItem.ItemTypes.LeftAccessory)
                                {
                                    
Item.PlusProgress += Database.DataHolder.StonePlusPoints(ItemPlus.Plus);
                                    while (
Item.PlusProgress >= Database.DataHolder.ComposePlusPoints(Item.Plus) && Item.Plus != 12)
                                    {
                                        
Item.PlusProgress -= Database.DataHolder.ComposePlusPoints(Item.Plus);
                                        
Item.Plus++;
                                        if (
Item.Plus == 12)
                                            
Item.PlusProgress 0;
                                    }
                                    
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                    
Item.Send(client);
                                    
Database.ConquerItemTable.UpdatePlus(Item);
                                    
Database.ConquerItemTable.UpdatePlusProgress(Item);
                                    
client.Inventory.Remove(ItemPlusAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                    if (
Item.Plus >= 9)
                                        
Kernel.SendWorldMessage(new Message("Congratulations, " client.Entity.Name " has upgraded His " Database.ConquerItemInformation.BaseInformations[Item.ID].Name " to + " Item.Plus " and " Item.PlusProgress " in Progress!"System.Drawing.Color.RedNetwork.GamePackets.Message.TopLeft), Program.Values);
                                }
                                break;
                            }
                        case 
Compose.NewSteed:
                            {
                                if (
Item.Plus 12)
                                {
                                    
Item.PlusProgress += Database.DataHolder.StonePlusPoints(ItemPlus.Plus);
                                    while (
Item.PlusProgress >= Database.DataHolder.ComposePlusPoints(Item.Plus) && Item.Plus != 12)
                                    {
                                        
Item.PlusProgress -= Database.DataHolder.ComposePlusPoints(Item.Plus);
                                        
Item.Plus++;
                                        if (
Item.Plus == 12)
                                            
Item.PlusProgress 0;
                                    }
                                    
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                    
Item.Send(client);
                                    
Database.ConquerItemTable.UpdatePlus(Item);
                                    
client.Inventory.Remove(ItemPlusAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                }

                                
int color1 = (int)Item.SocketProgress;
                                
int color2 = (int)ItemPlus.SocketProgress;

                                
int G1 color1 0xFF;
                                
int G2 color2 0xFF;
                                
int B1 = (color1 >> 8) & 0xFF;
                                
int B2 = (color2 >> 8) & 0xFF;
                                
int R1 = (color1 >> 16) & 0xFF;
                                
int R2 = (color2 >> 16) & 0xFF;
                                
Item.NextGreen = (byte)((int)Math.Floor(0.9 G1) + (int)Math.Floor(0.1 G2) + 1);
                                
Item.NextBlue = (byte)((int)Math.Floor(0.9 B1) + (int)Math.Floor(0.1 B2) + 1);
                                
Item.NextRed = (byte)((int)Math.Floor(0.9 R1) + (int)Math.Floor(0.1 R2) + 1);
                                
Item.SocketProgress = (uint)(Item.NextGreen | (Item.NextBlue << 8) | (Item.NextRed << 16));

                                
Item.Mode AbdoRedaGxV4.Game.Enums.ItemMode.Update;
                                
Item.Send(client);
                                
Database.ConquerItemTable.UpdatePlusProgress(Item);
                                
Database.ConquerItemTable.UpdateSocketProgress(Item);
                                
//  Database.ConquerItemTable.UpdateNextSteedColor(Item);
                                
client.Inventory.Remove(ItemPlusAbdoRedaGxV4.Game.Enums.ItemUse.Remove);
                                break;
                            }

                    }
                }
            }
        } 


قديم 2020-01-25, 04:29 AM
المشاركة 3
ahmedshetos888
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله +12 دي تاني مره ومش عارف احلها
تسلم يدك يا خااال ♥ ♥ ♥


العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 

الانتقال السريع

المواضيع المتشابهه للموضوع: مشكله +12 دي تاني مره ومش عارف احلها
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
مشكله مش عارف من اى اصلا xD koko1 مشكلات السيرفيرات كونكر الشخصيه 5 2020-05-04 04:58 PM
مشكله ف انى بى سى مش عارف اعملها photog مشكلات السيرفيرات كونكر الشخصيه 4 2020-04-05 09:53 PM
تعالي تاني يا رايدر في مشكله :d uncelsam مشكلات السيرفيرات كونكر الشخصيه 3 2019-10-24 12:29 AM
تاني مشكله ف رايزو zonfor مشكلات السيرفيرات كونكر الشخصيه 7 2019-09-24 12:35 PM
حل مشكله الجارد لما يموت مش بيصحى تانى محمد ياسر تطوير سيرفرات كونكر 1 2019-06-25 05:31 PM


الساعة الآن 05:19 AM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.