|
Class MsgItemHandler.cs
ابحث
public static void PurifyItem
وبدل دول بالي عندك
public static void PurifyItem(MsgQuench ps, Client.GameState client)
{
MsgItemInfo Item = null, AddingItem = null;
if (client.Inventory.TryGetItem(ps.ItemUID, out Item) && client.Inventory.TryGetItem(ps.AddUID, out AddingItem))
{
if (ps.ItemUID == ps.AddUID)
return;
var PurifyInformation = Database.ConquerItemInformation.BaseInformations[AddingItem.ID];
var ItemInformation = Database.ConquerItemInformation.BaseInformations[Item.ID];
if (PurifyInformation.PurificationLevel > 0)
{
if (ItemInformation.Level >= PurifyInformation.Level)
{
var doPurify = false;
if (client.Inventory.Contains(720027, (ushort)(PurifyInformation.PurificationMeteorNeed / 10)))
{
client.Inventory.Remove(720027, (byte)(PurifyInformation.PurificationMeteorNeed / 10));
doPurify = true;
}
if (!doPurify && client.Inventory.Contains(1088001, PurifyInformation.PurificationMeteorNeed))
{
client.Inventory.Remove(1088001, (byte)PurifyInformation.PurificationMeteorNeed);
doPurify = true;
}
if (doPurify)
{
if (Item.Purification.PurificationItemID > 0)
Database.ItemAddingTable.RemoveAdding(Item.UID, Item.Purification.PurificationItemID);
client.Send(ps);
ItemAdding.Purification_ purify = new ItemAdding.Purification_();
purify.AddedOn = DateTime.Now;
purify.Available = true;
purify.ItemUID = ps.ItemUID;
purify.PurificationLevel = PurifyInformation.PurificationLevel;
if (client.Player.VIPLevel == 1)
purify.PurificationDuration = 8 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 2)
purify.PurificationDuration = 9 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 3)
purify.PurificationDuration = 11 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 4)
purify.PurificationDuration = 14 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 5)
purify.PurificationDuration = 14 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 6)
purify.PurificationDuration = 14 * 24 * 60 * 60;
else if (client.Player.VIPLevel == 0)
purify.PurificationDuration = 7 * 24 * 60 * 60;
purify.PurificationItemID = AddingItem.ID;
Database.ItemAddingTable.AddPurification(purify);
Item.Purification = purify;
Item.Mode = COServer.Game.Enums.ItemMode.Update;
Item.Send(client);
client.Inventory.Remove(AddingItem, COServer.Game.Enums.ItemUse.Remove);
client.CalculateStatBonus();
client.LoadItemStats();
// client.ReshareClan();
if (client.Team != null)
foreach (var teammate in client.Team.Teammates)
// teammate.ReshareClan();
client.CalculateHPBonus();
client.Send(ps);
}
}
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
صفحه كونكر اصليه عربى كامله | Mr. Co | صفحات التسجيل كونكر اونلاين | 102 | 2024-08-21 11:04 PM |
مشكله فى نجوم اسلحه الدراجون وارير | walid88 | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2020-04-28 05:12 PM |
كوستة الايبك | stevenayman1 | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-03-25 02:01 PM |
مشكلة في درع القرصان الايبك(سورس ماتريكس) | magdy | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-03-20 06:04 AM |
مشكله في صول الاسلحه الايبك | midoazoz | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-11-27 02:17 PM |