22 package com.realtime.crossfire.jxclient.server.crossfire;
25 import org.jetbrains.annotations.NotNull;
26 import org.jetbrains.annotations.Nullable;
27 import org.junit.Assert;
104 public void sendLock(
final boolean val,
final int tag) {
128 public void sendMove(
final int to,
final int tag,
final int nrof) {
136 public int sendNcom(
final int repeat, @NotNull
final String command) {
138 throw new AssertionError();
161 public void sendSetup(@NotNull
final String... options) {
177 public void sendVersion(
final int csval,
final int scval, @NotNull
final String vinfo) {
218 throw new AssertionError();
225 public void connect(@NotNull
final String hostname,
final int port) {
241 public void sendAccountLogin(@NotNull
final String login, @NotNull
final String password) {
257 public void sendAccountLink(
final int force, @NotNull
final String login, @NotNull
final String password) {
278 public void sendAccountPassword(@NotNull
final String currentPassword, @NotNull
final String newPassword) {
void sendAskface(final int faceNum)
Sends an "askface" command.the face number to request
Abstract base class for CrossfireServerConnection implementing classes.
void setPreferredMapSize(final int preferredMapWidth, final int preferredMapHeight)
Sets the preferred map size.the preferred map width in tiles; must be odd the preferred map height in...
void sendAccountCreate(@NotNull final String login, @NotNull final String password)
Sends a request to create a new account.the account login the account password
void stop()
Stops operation.if stopping was interrupted
void sendAddme()
Sends an "addme" command to the server.
void addClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Adds a ClientSocketListener to notify.the client socket listener to add
void sendAccountLink(final int force, @NotNull final String login, @NotNull final String password)
Sends a request to add an existing character to an account.0 to allow failure, 1 to force in certain ...
void sendApply(final int tag)
Sends an "apply" command to the server.the item to apply
void sendMove(final int to, final int tag, final int nrof)
Sends a "move" command to the server.the destination location the item to move the number of items to...
void sendLock(final boolean val, final int tag)
Sends a "lock" command to the server.whether to lock the item the item to lock
void start()
Starts operation.
void sendExamine(final int tag)
Sends an "examine" command to the server.the item to examine
void disconnect(@NotNull final String reason)
Disconnects from the server.Does nothing if not connected. the reason for the disconnect ...
Combines all model classes that are updated.
void sendAccountLogin(@NotNull final String login, @NotNull final String password)
Asks for an account login.the account login the account password
void sendReply(@NotNull final String text)
Sends a "reply" command to the server.the text to reply
int sendNcom(final int repeat, @NotNull final String command)
Sends a "ncom" command to the server.the repeat count the command the packet id
Implements CrossfireServerConnection for regression tests.
void sendAccountPlay(@NotNull final String name)
Sends a request to play a character from an account.the character's name to play
void sendAccountPassword(@NotNull final String currentPassword, @NotNull final String newPassword)
Sends a request to change the account's password.
Interface for listeners interested in ClientSocket related events.
void sendLookat(final int dx, final int dy)
Sends a "lookat" command to the server.the x-coordinate in tiles, relative to the player the y-coordi...
void setPreferredNumLookObjects(final int preferredNumLookObjects)
Sets the maximum number of objects in the ground view.Must not be called in connected state...
void removeClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Removes a ClientSocketListener to notify.the client socket listener to remove
String getAccountName()
Returns the current account name.the current account name ornull
TestCrossfireServerConnection()
Creates a new instance.
void sendToggleextendedtext(@NotNull final int... types)
Sends a "toggleextendedtext" command to the server.the types to request
void setCrossfireUpdateMapListener(@Nullable final CrossfireUpdateMapListener listener)
Sets a listener to be notified about map changes.At most one such listener may be set...
void sendVersion(final int csval, final int scval, @NotNull final String vinfo)
Sends a "version" command to the server.the client version number the server version number the clien...
void sendMark(final int tag)
Sends a "mark" command to the server.the item to mark
void sendRequestinfo(@NotNull final String infoType)
Sends a "requestinfo" command to the server.the info type to request
void connect(@NotNull final String hostname, final int port)
Attempts to connect the client to a server.the hostname to connect to the port to connect to ...
Interface for listeners interested in map related commands.
void sendAccountCharacterCreate(@NotNull final String login, @NotNull final String password)
Sends a request to create a new character associated to the account.the character's name the characte...
void sendSetup(@NotNull final String... options)
Sends a "setup" command to the server.the option/value pairs to send