Quote:
Originally Posted by مصطفى خضرى
How can I do check on this item
|
at packethandler.cs (assuming that you are using another shitty edit for trinity)
you will find a method called
Code:
static void AddTradeItem(Trade trade, Client.GameState client)
you will find this check
Code:
if (infos.BaseInformation.Type != Database.ConquerItemBaseInformation.ItemType.Dropable || (item.Lock != 0 && !client.Partners.ContainsKey(_client.Entity.UID) && !client.Partners[_client.Entity.UID].StillOnProbation) || item.Bound || item.Suspicious)
{
also there is a nice struct at itemadding.cs
called
Code:
public struct Purification_
{
public bool Available;
public uint ItemUID;
public uint PurificationItemID;
public uint PurificationLevel;
/// <summary>
/// In minutes.
/// </summary>
public uint PurificationDuration;
public DateTime AddedOn;
}
you would simply use it to get something like
Code:
if (infos.BaseInformation.Type != Database.ConquerItemBaseInformation.ItemType.Dropable || (item.Lock != 0 && !client.Partners.ContainsKey(_client.Entity.UID) && !client.Partners[_client.Entity.UID].StillOnProbation) || item.Bound || item.Suspicious || (item.Purification.PurificationItemID = /*YOUR SOUL ID*/))
or maybe create a bool at this struct, call it tradeable, set it to false on login and loading the items
and do something like
Code:
if(item.Purification.Treadable)
{
trade
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "learn programming");
npc.OptionID = 255;
client.Send(npc.ToArray());
}