Buy stuff started
This commit is contained in:
parent
c4e04b2ea5
commit
2941d33d12
@ -13,7 +13,7 @@ An unofficial server for semi-famous game Rolypolyland (Shararam). Remake by alt
|
|||||||
>
|
>
|
||||||
> We only distribute software on [GitHub](https://github.com/) and [Gitea](https://gitea.awain.net/alterwain/WhimsyWorld).
|
> We only distribute software on [GitHub](https://github.com/) and [Gitea](https://gitea.awain.net/alterwain/WhimsyWorld).
|
||||||
>
|
>
|
||||||
> If you would like to have a little chat with me, here's my IRC server (TOR):
|
> If you would like to have a little chat about this project, here's XMPP: [wworld@chat.awain.net](xmpp:wworld@chat.awain.net?join)
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
|
@ -244,9 +244,15 @@ public class GameServer {
|
|||||||
long postcardMessageId = ((Number) message.getArguments().get(0).getValue()).longValue();
|
long postcardMessageId = ((Number) message.getArguments().get(0).getValue()).longValue();
|
||||||
this.postcardService.removeById(postcardMessageId);
|
this.postcardService.removeById(postcardMessageId);
|
||||||
}
|
}
|
||||||
|
case BuyBatch -> buySomething(playerId, message.getArguments().get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buySomething(long playerId, AMFObject obj) {
|
||||||
|
List<AMFObject> array = (List<AMFObject>) obj.getValue();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private boolean subtractUsualTickets(long userId, int amount) {
|
private boolean subtractUsualTickets(long userId, int amount) {
|
||||||
int val = this.users.getUsualTickets(userId);
|
int val = this.users.getUsualTickets(userId);
|
||||||
if ( val >= amount ) {
|
if ( val >= amount ) {
|
||||||
|
@ -35,6 +35,7 @@ public enum UserCommandType {
|
|||||||
CardMessage("_MC"),
|
CardMessage("_MC"),
|
||||||
MarkCardMessageAsRead("_MCR"),
|
MarkCardMessageAsRead("_MCR"),
|
||||||
DeleteCardMessage("_MCD"),
|
DeleteCardMessage("_MCD"),
|
||||||
|
BuyBatch("_BGB"),
|
||||||
Unknown("");
|
Unknown("");
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user