I need help coding.
Hey guys since my server closed down for the 3th time because of duping i tried to make a fix for it but im stuck.
From trade.cs
I wanna add it into this (clientprocessor.cs)
The idea is to make any trades stop when people try to disconnect / back to home.
And it will hotfix my main dupe exploit.
Can someone please help me.
From trade.cs
Code:
public void CancelTrade(RealmTime time, CancelTradePacket pkt)
{
this.psr.SendPacket(new TradeDonePacket()
{
Result = 1,
Message = "Trade cancelled."
});
tradeTarget.psr.SendPacket(new TradeDonePacket()
{
Result = 1,
Message = "Trade cancelled."
});
tradeTarget.tradeTarget = null;
tradeTarget.trade = null;
tradeTarget.tradeAccepted = false;
this.tradeTarget = null;
this.trade = null;
this.tradeAccepted = false;
return;
}
I wanna add it into this (clientprocessor.cs)
Code:
public void Disconnect()
{
try
{
if (stage == ProtocalStage.Disconnected) return;
var original = stage;
stage = ProtocalStage.Disconnected;
if (account != null)
DisconnectFromRealm();
if (db != null && original != ProtocalStage.Ready)
{
db.Dispose();
db = null;
}
skt.Close();
}
catch
{
Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.WriteLine("Error disconnecting client, check ClientProcessor.cs");
Console.ForegroundColor = ConsoleColor.White;
}
}
And it will hotfix my main dupe exploit.
Can someone please help me.


