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:
Jerry Wang
2019-02-23 23:17:11 +10:00
committed by Ronan Lana
parent 895326e819
commit 1772910a52
4 changed files with 43 additions and 4 deletions

View File

@@ -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);

View 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;
}
}
}