-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20de2d7
commit 7e7c6ae
Showing
27 changed files
with
682 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
logic/org/solace/game/entity/mobile/player/command/impl/ChangeLookCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This file is part of Solace Framework. | ||
* Solace is free software: you can redistribute it and/or modify it under the | ||
* terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* Solace is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Solace. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.solace.game.entity.mobile.player.command.impl; | ||
|
||
import org.solace.game.entity.mobile.player.Player; | ||
import org.solace.game.entity.mobile.player.PrivilegeRank; | ||
import org.solace.game.entity.mobile.player.command.Command; | ||
|
||
/** | ||
* | ||
* @author Faris <https://github.com/faris-mckay> | ||
*/ | ||
public class ChangeLookCommand extends Command { | ||
|
||
@Override | ||
public void handle(Player player, String command) { | ||
player.getPacketDispatcher().sendInterface(3559); | ||
} | ||
|
||
@Override | ||
public PrivilegeRank rightsRequired() { | ||
return PrivilegeRank.MODERATOR; | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
logic/org/solace/game/entity/mobile/player/command/impl/CheckPositionCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This file is part of Solace Framework. | ||
* Solace is free software: you can redistribute it and/or modify it under the | ||
* terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* Solace is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Solace. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.solace.game.entity.mobile.player.command.impl; | ||
|
||
import org.solace.game.entity.mobile.player.Player; | ||
import org.solace.game.entity.mobile.player.PrivilegeRank; | ||
import org.solace.game.entity.mobile.player.command.Command; | ||
|
||
/** | ||
* | ||
* @author Faris <https://github.com/faris-mckay> | ||
*/ | ||
public class CheckPositionCommand extends Command { | ||
|
||
@Override | ||
public void handle(Player player, String command) { | ||
player.getAdvocate().displayChatboxText("X: " + player.getLocation().getX() + " Y: " + player.getLocation().getY()); | ||
} | ||
|
||
@Override | ||
public PrivilegeRank rightsRequired() { | ||
return PrivilegeRank.MODERATOR; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
logic/org/solace/game/entity/mobile/player/command/impl/EmptyInventoryCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* This file is part of Solace Framework. | ||
* Solace is free software: you can redistribute it and/or modify it under the | ||
* terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* Solace is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Solace. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.solace.game.entity.mobile.player.command.impl; | ||
|
||
import org.solace.game.entity.mobile.player.Player; | ||
import org.solace.game.entity.mobile.player.PrivilegeRank; | ||
import org.solace.game.entity.mobile.player.command.Command; | ||
|
||
/** | ||
* | ||
* @author Faris <https://github.com/faris-mckay> | ||
*/ | ||
public class EmptyInventoryCommand extends Command { | ||
|
||
@Override | ||
public void handle(Player player, String command) { | ||
for (int i = 0; i < 28; i++) { | ||
player.getInventory().set(i, -1, 0); | ||
player.getInventory().refreshItems(); | ||
} | ||
} | ||
|
||
@Override | ||
public PrivilegeRank rightsRequired() { | ||
return PrivilegeRank.STANDARD; | ||
} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
logic/org/solace/game/entity/mobile/player/command/impl/MapTeleportCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is part of Solace Framework. | ||
* Solace is free software: you can redistribute it and/or modify it under the | ||
* terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* Solace is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Solace. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package org.solace.game.entity.mobile.player.command.impl; | ||
|
||
import org.solace.game.entity.mobile.player.Player; | ||
import org.solace.game.entity.mobile.player.PrivilegeRank; | ||
import org.solace.game.entity.mobile.player.command.Command; | ||
import org.solace.game.map.Location; | ||
|
||
/** | ||
* | ||
* @author Faris <https://github.com/faris-mckay> | ||
*/ | ||
public class MapTeleportCommand extends Command { | ||
|
||
@Override | ||
public void handle(Player player, String command) { | ||
String[] args = command.split(" "); | ||
String secondWord = args[1].toLowerCase(); | ||
if (args.length == 3) { | ||
int x = Integer.parseInt(secondWord); | ||
int y = Integer.parseInt(args[2]); | ||
int z = Integer.parseInt(args[3]); | ||
player.getMobilityManager().processTeleport(player, new Location(x, y, z)); | ||
} | ||
} | ||
|
||
@Override | ||
public PrivilegeRank rightsRequired() { | ||
return PrivilegeRank.MODERATOR; | ||
} | ||
|
||
} |
Oops, something went wrong.