mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
Added PlayerMoneyResponse/Request, started work on CommPlayerMessage
This commit is contained in:
@@ -42,6 +42,7 @@ import protocol.swg.ClientMfdStatusUpdateMessage;
|
||||
import protocol.swg.ExpertiseRequestMessage;
|
||||
import protocol.swg.GuildRequestMessage;
|
||||
import protocol.swg.GuildResponseMessage;
|
||||
import protocol.swg.PlayerMoneyResponse;
|
||||
import protocol.swg.ServerTimeMessage;
|
||||
import protocol.swg.SetWaypointColor;
|
||||
import protocol.swg.objectControllerObjects.ChangeRoleIconChoice;
|
||||
@@ -274,6 +275,32 @@ public class PlayerService implements INetworkDispatch {
|
||||
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.PlayerMoneyRequest, new INetworkRemoteEvent() {
|
||||
|
||||
@Override
|
||||
public void handlePacket(IoSession session, IoBuffer data) throws Exception {
|
||||
|
||||
Client client = core.getClient(session);
|
||||
|
||||
if (client == null)
|
||||
return;
|
||||
|
||||
SWGObject player = client.getParent();
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
CreatureObject creature = (CreatureObject) player;
|
||||
|
||||
if (creature == null)
|
||||
return;
|
||||
|
||||
PlayerMoneyResponse response = new PlayerMoneyResponse(creature.getCashCredits(), creature.getBankCredits());
|
||||
session.write(response.serialize());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.CmdSceneReady, new INetworkRemoteEvent() {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user