قديم 2019-08-08, 04:55 AM
المشاركة 2
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى
كلك يمين ع كود بتاع Remove,Add
و ابعتهملي هنا ف شات

قديم 2019-08-08, 07:35 AM
المشاركة 3
osama
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى
مش فاهم انا ساحب سيستم الوترى من سورس KhaledMohamed v3
لو معاك السيستم كامل يريت لو تجيب الاضافة علشاان السورس صعب فا محتاج السيستم كامل

قديم 2019-08-08, 08:31 AM
المشاركة 4
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى
كود مسئول عن اضافة ايتم في السورس
كود:
inventory.cs 

اسحبهم هما كمان من سورس خالد محمد
اي
كود:
public bool Add

او remove اسحبهم للسورس بتاعك

قديم 2019-08-08, 11:17 AM
المشاركة 5
osama
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى
كود مسئول عن اضافة ايتم في السورس
كود:
inventory.cs 

اسحبهم هما كمان من سورس خالد محمد
اي
كود:
public bool add

او remove اسحبهم للسورس بتاعك
لى الاسف السورس حليا انا مسحو من على الجهاز لو الاكواد جاهزة معاك ياريت يا ريدر لو تجبها معلشى هتعبك معية
انا عاوز اخلى الوترى شغالة زى اون لااين

قديم 2019-08-08, 02:11 PM
المشاركة 6
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى

كود:
 public bool Add(uint idbyte plusbyte timesbool bound false)
        {
            try
            {
                
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(idplus);
                while (
times 0)
                {
                    if (
Count <= 39)
                    {
                        
ConquerItem item;
                        
item = new ConquerItem(true);
                        {
                            
#region Stacksize
                            
if (infos.BaseInformation.StackSize 1)
                            {
                                
//item.StackSize = (byte)times;                                
                                
ushort _StackCount infos.BaseInformation.StackSize;
                                if (
times <= infos.BaseInformation.StackSize)
                                    
_StackCount = (ushort)times;
                                
item.StackSize = (ushort)_StackCount;
                                
Database.ConquerItemTable.UpdateStack(item);
                                
times -= (byte)_StackCount;
                            }
                            else
                            {
                                
item = new ConquerItem(true);
                                
item.StackSize 1;
                                
times--;
                            }
                            
#endregion Stacksize
                            
item.ID id;
                            
item.Plus plus;
                            
item.Durability item.MaximDurability infos.BaseInformation.Durability;

                        };
                        
this.Add(itemEnums.ItemUse.CreateAndAdd);
                    }
                    else
                    {
                        return 
false;
                    }
                    
// times--;
                
}
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
true;
        }

 public 
bool Add(uint idbyte plusbyte timesbyte soc1byte soc2byte Bless 0)
        {
            
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(idplus);
            while (
times 0)
            {
                if (
Count <= 39)
                {
                    
ConquerItem item = new Network.GamePackets.ConquerItem(true);
                    
item.ID id;
                    
item.Plus plus;
                    
//if (soc1 != 0)
                    
item.SocketOne = (Enums.Gem)soc1;
                    
item.SocketTwo = (Enums.Gem)soc2;
                    
item.Bless Bless;
                    
item.Durability item.MaximDurability infos.BaseInformation.Durability;
                    
Add(itemEnums.ItemUse.CreateAndAdd);
                }
                else
                {
                    return 
false;
                }
                
times--;
            }
            return 
true;
        }
        public 
bool Add(uint idGame.Enums.ItemEffect effect)
        {
            try
            {
                
ConquerItem item = new Network.GamePackets.ConquerItem(true);
                
item.ID id;
                
item.Effect effect;
                
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(id0);
                
item.Durability item.MaximDurability infos.BaseInformation.Durability;
                if (
Count <= 39)
                {
                    
Add(itemEnums.ItemUse.CreateAndAdd);
                }
                else
                {
                    return 
false;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
true;
        }
        public 
bool Add(ConquerItem itemEnums.ItemUse use)
        {
            try
            {
                if (!
Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
                    return 
true;
                if (
Count == 40)
                {
                    
Owner.Send(Constants.FullInventory);
                    return 
false;
                }
                if (!
inventory.ContainsKey(item.UID))
                {
                    
item.Position 0;
                    switch (use)
                    {
                        case 
Enums.ItemUse.CreateAndAdd:
                            
item.UID KhaledMohamed.Network.GamePackets.ConquerItem.ItemUID.Next;
                            
Database.ConquerItemTable.AddItem(ref itemOwner);
                            
Database.ConquerItemTable.Update_Free(itemOwner);
                            
item.MobDropped false;
                            break;
                        case 
Enums.ItemUse.Add:
                            
Database.ConquerItemTable.UpdateLocation(itemOwner);
                            break;
                        case 
Enums.ItemUse.Move:
                            
item.Position 0;
                            
item.StatsLoaded false;
                            
Database.ConquerItemTable.UpdateLocation(itemOwner);
                            break;
                    }
                    if (use != 
Enums.ItemUse.None)
                        
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Add);
                    
lock (inventory)
                    {
                        if (!
inventory.ContainsKey(item.UID))
                        {
                            
inventory.Add(item.UIDitem);
                        }
                    }
                    
objects inventory.Values.ToArray();
                    
item.Mode Enums.ItemMode.Default;
                    if (use != 
Enums.ItemUse.None)
                        
item.Send(Owner);

                    
//Data data = new Data(true);
                    //data.ID = Data.OpenCustom;
                    //data.UID = Owner.Entity.UID;
                    //data.TimeStamp = Time32.Now;
                    //data.dwParam = 3382;
                    //data.wParam1 = Owner.Entity.X;
                    //data.wParam2 = Owner.Entity.Y;
                    //Owner.Send(data);
                    
return true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }

 public 
bool Remove(ConquerItem itemEnums.ItemUse use)
        {
            try
            {
                if (
inventory.ContainsKey(item.UID))
                {
                    switch (use)
                    {
                        case 
Enums.ItemUse.RemoveFromStack:
                            {
                                if (
item.StackSize 1)
                                {
                                    
item.StackSize -= 1;
                                    
Database.ConquerItemTable.UpdateStack(item);
                                    
item.Mode Game.Enums.ItemMode.Update;
                                    
item.Send(Owner);
                                    return 
true;
                                }
                                else
                                {
                                    
Database.ConquerItemTable.RemoveItem(item.UID);
                                }
                                break;
                            }
                        case 
Enums.ItemUse.Remove:
                        case 
Enums.ItemUse.Delete:
                            
Database.ConquerItemTable.RemoveItem(item.UID); break;
                        case 
Enums.ItemUse.MoveDatabase.ConquerItemTable.UpdateLocation(itemOwner); break;
                    }
                    
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);

                    
inventory.Remove(item.UID);
                    
objects inventory.Values.ToArray();
                    
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                    
iu.UID item.UID;
                    
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                    
Owner.Send(iu);
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(ConquerItem itemEnums.ItemUse use, bool equipment)
        {
            try
            {
                if (
inventory.ContainsKey(item.UID))
                {
                    
inventory.Remove(item.UID);
                    
objects inventory.Values.ToArray();
                    
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                    
iu.UID item.UID;
                    
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                    
Owner.Send(iu);
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(uint UIDEnums.ItemUse use, bool sendRemove)
        {
            try
            {
                if (
inventory.ContainsKey(UID))
                {
                    switch (use)
                    {
                        case 
Enums.ItemUse.RemoveDatabase.ConquerItemTable.RemoveItem(UID); break;
                        case 
Enums.ItemUse.MoveDatabase.ConquerItemTable.UpdateLocation(inventory[UID], Owner); break;
                    }
                    
Database.ItemLog.LogItem(UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);
                    
inventory.Remove(UID);
                    
objects inventory.Values.ToArray();
                    if (
sendRemove)
                    {
                        
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                        
iu.UID UID;
                        
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                        
Owner.Send(iu);
                    }
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(string name)
        {
            try
            {
                
string loweredName name.ToLower();
                foreach (var 
item in inventory.Values)
                {
                    if (
Database.ConquerItemInformation.BaseInformations[item.ID].LowerName == loweredName)
                    {
                        
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);
                        
Remove(itemEnums.ItemUse.Remove);
                        
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                        
iu.UID item.UID;
                        
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                        
Owner.Send(iu);
                        return 
true;
                    }
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        } 


قديم 2019-08-08, 08:54 PM
المشاركة 7
osama
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: مشكلة بخصوص الوترى
كود:
 public bool Add(uint idbyte plusbyte timesbool bound false)
        {
            try
            {
                
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(idplus);
                while (
times 0)
                {
                    if (
Count <= 39)
                    {
                        
ConquerItem item;
                        
item = new ConquerItem(true);
                        {
                            
#region Stacksize
                            
if (infos.BaseInformation.StackSize 1)
                            {
                                
//item.StackSize = (byte)times;                                
                                
ushort _StackCount infos.BaseInformation.StackSize;
                                if (
times <= infos.BaseInformation.StackSize)
                                    
_StackCount = (ushort)times;
                                
item.StackSize = (ushort)_StackCount;
                                
Database.ConquerItemTable.UpdateStack(item);
                                
times -= (byte)_StackCount;
                            }
                            else
                            {
                                
item = new ConquerItem(true);
                                
item.StackSize 1;
                                
times--;
                            }
                            
#endregion Stacksize
                            
item.ID id;
                            
item.Plus plus;
                            
item.Durability item.MaximDurability infos.BaseInformation.Durability;

                        };
                        
this.Add(itemEnums.ItemUse.CreateAndAdd);
                    }
                    else
                    {
                        return 
false;
                    }
                    
// times--;
                
}
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
true;
        }

 public 
bool Add(uint idbyte plusbyte timesbyte soc1byte soc2byte Bless 0)
        {
            
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(idplus);
            while (
times 0)
            {
                if (
Count <= 39)
                {
                    
ConquerItem item = new Network.GamePackets.ConquerItem(true);
                    
item.ID id;
                    
item.Plus plus;
                    
//if (soc1 != 0)
                    
item.SocketOne = (Enums.Gem)soc1;
                    
item.SocketTwo = (Enums.Gem)soc2;
                    
item.Bless Bless;
                    
item.Durability item.MaximDurability infos.BaseInformation.Durability;
                    
Add(itemEnums.ItemUse.CreateAndAdd);
                }
                else
                {
                    return 
false;
                }
                
times--;
            }
            return 
true;
        }
        public 
bool Add(uint idGame.Enums.ItemEffect effect)
        {
            try
            {
                
ConquerItem item = new Network.GamePackets.ConquerItem(true);
                
item.ID id;
                
item.Effect effect;
                
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(id0);
                
item.Durability item.MaximDurability infos.BaseInformation.Durability;
                if (
Count <= 39)
                {
                    
Add(itemEnums.ItemUse.CreateAndAdd);
                }
                else
                {
                    return 
false;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
true;
        }
        public 
bool Add(ConquerItem itemEnums.ItemUse use)
        {
            try
            {
                if (!
Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
                    return 
true;
                if (
Count == 40)
                {
                    
Owner.Send(Constants.FullInventory);
                    return 
false;
                }
                if (!
inventory.ContainsKey(item.UID))
                {
                    
item.Position 0;
                    switch (use)
                    {
                        case 
Enums.ItemUse.CreateAndAdd:
                            
item.UID KhaledMohamed.Network.GamePackets.ConquerItem.ItemUID.Next;
                            
Database.ConquerItemTable.AddItem(ref itemOwner);
                            
Database.ConquerItemTable.Update_Free(itemOwner);
                            
item.MobDropped false;
                            break;
                        case 
Enums.ItemUse.Add:
                            
Database.ConquerItemTable.UpdateLocation(itemOwner);
                            break;
                        case 
Enums.ItemUse.Move:
                            
item.Position 0;
                            
item.StatsLoaded false;
                            
Database.ConquerItemTable.UpdateLocation(itemOwner);
                            break;
                    }
                    if (use != 
Enums.ItemUse.None)
                        
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Add);
                    
lock (inventory)
                    {
                        if (!
inventory.ContainsKey(item.UID))
                        {
                            
inventory.Add(item.UIDitem);
                        }
                    }
                    
objects inventory.Values.ToArray();
                    
item.Mode Enums.ItemMode.Default;
                    if (use != 
Enums.ItemUse.None)
                        
item.Send(Owner);

                    
//Data data = new Data(true);
                    //data.ID = Data.OpenCustom;
                    //data.UID = Owner.Entity.UID;
                    //data.TimeStamp = Time32.Now;
                    //data.dwParam = 3382;
                    //data.wParam1 = Owner.Entity.X;
                    //data.wParam2 = Owner.Entity.Y;
                    //Owner.Send(data);
                    
return true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }

 public 
bool Remove(ConquerItem itemEnums.ItemUse use)
        {
            try
            {
                if (
inventory.ContainsKey(item.UID))
                {
                    switch (use)
                    {
                        case 
Enums.ItemUse.RemoveFromStack:
                            {
                                if (
item.StackSize 1)
                                {
                                    
item.StackSize -= 1;
                                    
Database.ConquerItemTable.UpdateStack(item);
                                    
item.Mode Game.Enums.ItemMode.Update;
                                    
item.Send(Owner);
                                    return 
true;
                                }
                                else
                                {
                                    
Database.ConquerItemTable.RemoveItem(item.UID);
                                }
                                break;
                            }
                        case 
Enums.ItemUse.Remove:
                        case 
Enums.ItemUse.Delete:
                            
Database.ConquerItemTable.RemoveItem(item.UID); break;
                        case 
Enums.ItemUse.MoveDatabase.ConquerItemTable.UpdateLocation(itemOwner); break;
                    }
                    
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);

                    
inventory.Remove(item.UID);
                    
objects inventory.Values.ToArray();
                    
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                    
iu.UID item.UID;
                    
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                    
Owner.Send(iu);
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(ConquerItem itemEnums.ItemUse use, bool equipment)
        {
            try
            {
                if (
inventory.ContainsKey(item.UID))
                {
                    
inventory.Remove(item.UID);
                    
objects inventory.Values.ToArray();
                    
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                    
iu.UID item.UID;
                    
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                    
Owner.Send(iu);
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(uint UIDEnums.ItemUse use, bool sendRemove)
        {
            try
            {
                if (
inventory.ContainsKey(UID))
                {
                    switch (use)
                    {
                        case 
Enums.ItemUse.RemoveDatabase.ConquerItemTable.RemoveItem(UID); break;
                        case 
Enums.ItemUse.MoveDatabase.ConquerItemTable.UpdateLocation(inventory[UID], Owner); break;
                    }
                    
Database.ItemLog.LogItem(UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);
                    
inventory.Remove(UID);
                    
objects inventory.Values.ToArray();
                    if (
sendRemove)
                    {
                        
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                        
iu.UID UID;
                        
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                        
Owner.Send(iu);
                    }
                    return 
true;
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        }
        public 
bool Remove(string name)
        {
            try
            {
                
string loweredName name.ToLower();
                foreach (var 
item in inventory.Values)
                {
                    if (
Database.ConquerItemInformation.BaseInformations[item.ID].LowerName == loweredName)
                    {
                        
Database.ItemLog.LogItem(item.UIDOwner.Entity.UIDKhaledMohamed.Database.ItemLog.ItemLogAction.Remove);
                        
Remove(itemEnums.ItemUse.Remove);
                        
Network.GamePackets.ItemUsage iu = new Network.GamePackets.ItemUsage(true);
                        
iu.UID item.UID;
                        
iu.ID Network.GamePackets.ItemUsage.RemoveInventory;
                        
Owner.Send(iu);
                        return 
true;
                    }
                }
            }
            catch (
Exception e)
            {
                
Program.SaveException(e);
            }
            return 
false;
        } 
بردو بياخد 10 لو معمولين فى بعض انا عاوز ياخد 3 زى اى سرفر لاك لو 30 واحدة فى بعض بيخدهم كلهم + فى مشكلة كمان لما تعمل

+Ticket باخد واحدة وكل حاجة بس بيتنية شغال يستبدل بى 1 انا عاوز يقف لحد معين زى اون لااين اعمل اية ؟


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



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

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

المواضيع المتشابهه للموضوع: مشـكــلة بخـصـووص اللـوتــري .
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
بخـصـووص الاستـمـينــاا ! MRonlineGvrix مشكلات السيرفيرات كونكر الشخصيه 5 2022-04-09 01:24 AM
مـشكــلة بخـصـووص الفـي بـي اسـ واللعبـةة يـاريـت حـل . ابو مروان مشكلات السيرفيرات كونكر الشخصيه 12 2019-08-23 03:05 AM
مشــكــلة فــي اللـوتــري !! osama مشكلات السيرفيرات كونكر الشخصيه 8 2019-08-21 11:50 PM
طـلــب بخـصـووص الاوتـوو بــااتـش ! manshestar مشكلات السيرفيرات كونكر الشخصيه 3 2019-08-08 04:05 PM


الساعة الآن 09:15 PM

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