بسم الله الرحمن الرحيم
انهردة و بس على منتدى مجتمعنا , ان بى سى تجربة الجرمنت اللى فى كونكر اون لاينgo in packethandle
packet : 1009
there add this:
كود:
case 53:
{
uint ItemAdd = BitConverter.ToUInt32(packet, 8);
http://Interfaces.IConquerItem item_new = null;
//if (client.Inventory.TryGetItem(ItemAdd, out item_new))
{
uint obtined_points = 0;
Database.ConquerItemInformation iteminfo = new Conquer_Online_Server.Database.ConquerItemInformation(ItemAdd, 0);
Dictionary<uint, uint> amount = new Dictionary<uint, uint>();//packet[20]);
for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4)
{
uint item_swap = BitConverter.ToUInt32(packet, i);
if (client.Inventory.ContainsUID(item_swap))
{
Interfaces.IConquerItem item = null;
if (client.Inventory.TryGetItem(item_swap, out item))
{
amount.Add(item_swap, i);
}
switch (item.ID)
{
case 191505:
case 191605:
case 191705:
case 191805:
case 191905:
case 191405:
case 183325:
case 183315:
case 183375:
case 183305:
{
obtined_points += 300;
break;
}
default:
obtined_points += 50;
break;
}
}
}
if (iteminfo.BaseInformation.ConquerPointsWorth > obtined_points)
{
uint add_cps = 0;
add_cps = (uint)(iteminfo.BaseInformation.ConquerPointsWorth - obtined_points);
if (add_cps < client.Entity.ConquerPoints)
{
client.Entity.ConquerPoints -= (int)add_cps;
foreach (uint key in amount.Keys)
{
if (client.Inventory.ContainsUID(key))
client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
}
client.Inventory.Add(ItemAdd, 0, 1);
}
}
else
{
foreach (uint key in amount.Keys)
{
if (client.Inventory.ContainsUID(key))
client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
}
client.Inventory.Add(ItemAdd, 0, 1);
}
}
break;
}
npc link:
كود:
#region GarmentShop
case 6002:
{
switch (npcRequest.OptionID)
{
case 0:
{
Network.GamePackets.Data Data = new Network.GamePackets.Data(true);
Data.UID = client.Entity.UID;
Data.ID = 126;
Data.dwParam = 502;
Data.wParam1 = client.Entity.X;
Data.wParam2 = client.Entity.Y;
client.Send(Data);
break;
}
}
break;
}
#endregion
| This image has been resized. Click this bar to view the full image. The original image is sized 1024x768. |
| This image has been resized. Click this bar to view the full image. The original image is sized 1024x768. |