Added votepoints into db_database.sql (#411)
* Added GM lv0 command to read votepoints and rewardpoints * Added missing votepoints in sql and tweaked MapleClient * Fix read from votes * Fix votepoints sql
This commit is contained in:
@@ -184,7 +184,7 @@ public class CommandsExecutor {
|
||||
addCommand("online", OnlineCommand.class);
|
||||
addCommand("gm", GmCommand.class);
|
||||
addCommand("reportbug", ReportBugCommand.class);
|
||||
//addCommand("points", "");
|
||||
addCommand("points", ReadPointsCommand.class);
|
||||
addCommand("joinevent", JoinEventCommand.class);
|
||||
addCommand("leaveevent", LeaveEventCommand.class);
|
||||
addCommand("ranks", RanksCommand.class);
|
||||
|
||||
38
src/client/command/commands/gm0/ReadPointsCommand.java
Normal file
38
src/client/command/commands/gm0/ReadPointsCommand.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
public class ReadPointsCommand extends Command {
|
||||
{
|
||||
setDescription("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient client, String[] params) {
|
||||
|
||||
MapleCharacter player = client.getPlayer();
|
||||
if (params.length > 2) {
|
||||
player.yellowMessage("Syntax: @points (rp|vp|all)");
|
||||
return;
|
||||
} else if (params.length == 0) {
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints() + " | "
|
||||
+ "VotePoints: " + player.getClient().getVotePoints());
|
||||
return;
|
||||
}
|
||||
|
||||
switch (params[0]) {
|
||||
case "rp":
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints());
|
||||
break;
|
||||
case "vp":
|
||||
player.yellowMessage("VotePoints: " + player.getClient().getVotePoints());
|
||||
break;
|
||||
default:
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints() + " | "
|
||||
+ "VotePoints: " + player.getClient().getVotePoints());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user