Jump to content
Sign in to follow this  
displee

667 Second Screen Duel Fix

Recommended Posts

The 'duelDecline' method is executing a setted close interface event which isn't setted when you open a new interface. (Show the main method for example) When you accepted both on the first interface it will open the second interface. So just replace your 'openSecondScreenInterface' method with this one:
[CODE] /**
* Sending second screen.
*
* @param player
* The player.
* @param other
* The opponent.
* @param ifFriendly
* {@code true} if the duel is friendly, {@code false} the duel
* is stake.
*/
private void openSecondInterface(final Player player, final Player other,
boolean ifFriendly) {
player.setCloseInterfacesEvent(new Runnable() {
@Override
public void run() {
declineDuel(player);
}
});
other.setCloseInterfacesEvent(new Runnable() {
@Override
public void run() {
declineDuel(other);
}
});
other.getInterfaceManager().sendInterface(ifFriendly ? 639 : 626);
player.getInterfaceManager().sendInterface(ifFriendly ? 639 : 626);
}[/CODE]

Share this post


Link to post
Share on other sites
Sign in to follow this  

×