ok um the requesting trade function...i dont think its coded correctly and i tried several times trying to fix it. heres the problem. whenever someone requests trade to me 2 times and i click no it opens up the trade box even if i click no. and the annoying part is you can keep spamming other players like forcing the trade box open.
heres the code for requesting trade. anyone know how to make it better?
heres the code for requesting trade. anyone know how to make it better?
Code:
case 1://Request trade
{
Character Who = (Character)World.AllChars[UID];
if (UID != Character.TradingWith)
{
Who.MyClient.SendPacket(General.MyPackets.TradePacket(Character.UID, 1));
Character.TradingWith = UID;
Who.TradingWith = Character.UID;
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", Character.Name, "[Trade]Request for trading has been sent out.", 2005));
}
else
{
Who.Trading = true;
Character.Trading = true;
Who.MyClient.SendPacket(General.MyPackets.TradePacket(Character.UID, 3));
SendPacket(General.MyPackets.TradePacket(Who.UID, 3));
}
break;
}