mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 13:15:42 +12:00
Fix Trading bug and Mods Revenge.
This commit is contained in:
parent
5fedb7841d
commit
b5ae6946a9
2 changed files with 8 additions and 3 deletions
|
@ -14,6 +14,7 @@ namespace HISP.Game.Events
|
|||
{
|
||||
Thrower = thrower;
|
||||
ThrownAt = new List<User>();
|
||||
|
||||
}
|
||||
public User Thrower;
|
||||
public List<User> ThrownAt;
|
||||
|
@ -78,6 +79,7 @@ namespace HISP.Game.Events
|
|||
private void revengeTimedOut(object state)
|
||||
{
|
||||
resetEvent();
|
||||
EndEvent();
|
||||
}
|
||||
|
||||
private void resetEvent()
|
||||
|
@ -94,7 +96,9 @@ namespace HISP.Game.Events
|
|||
return throwTracker;
|
||||
}
|
||||
|
||||
return new ThrowTracker(thrower);
|
||||
ThrowTracker tracker = new ThrowTracker(thrower);
|
||||
trackedThrows.Add(tracker);
|
||||
return tracker;
|
||||
}
|
||||
|
||||
private bool checkUserThrownAtAlready(ThrowTracker tracker, User thrownAt)
|
||||
|
@ -123,7 +127,7 @@ namespace HISP.Game.Events
|
|||
public void Payout(User thrower, User throwAt)
|
||||
{
|
||||
ThrowTracker throwCounter = getUserThrowTracker(thrower);
|
||||
if(checkUserThrownAtAlready(throwCounter, throwAt))
|
||||
if(!checkUserThrownAtAlready(throwCounter, throwAt))
|
||||
{
|
||||
|
||||
byte[] otherEarned = PacketBuilder.CreateChat(Messages.FormatModSplatterBallAwardedOther(thrower.Username), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
|
|
|
@ -4671,7 +4671,8 @@ namespace HISP.Server
|
|||
|
||||
// Cancel Trades
|
||||
if (loggedInUser.TradingWith != null)
|
||||
loggedInUser.TradingWith.CancelTradeMoved();
|
||||
if((loggedInUser.TradingWith.Trader.X != loggedInUser.X) && (loggedInUser.TradingWith.Trader.Y != loggedInUser.Y))
|
||||
loggedInUser.TradingWith.CancelTradeMoved();
|
||||
loggedInUser.PendingBuddyRequestTo = null;
|
||||
|
||||
// Close Social Windows
|
||||
|
|
Loading…
Add table
Reference in a new issue