mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Helmet and backpacks now show for player, server will store player creation date
(BugFix) /showhelmet and /showbackpack works and helmet/backpacks now showed for the person wearing the item (Code) Server will store player creation date for future use in baseline
This commit is contained in:
@@ -52,6 +52,8 @@ import protocol.swg.ObjControllerMessage;
|
||||
import protocol.swg.PlayerMoneyResponse;
|
||||
import protocol.swg.ServerTimeMessage;
|
||||
import protocol.swg.SetWaypointColor;
|
||||
import protocol.swg.ShowBackpack;
|
||||
import protocol.swg.ShowHelmet;
|
||||
import protocol.swg.objectControllerObjects.ChangeRoleIconChoice;
|
||||
import protocol.swg.objectControllerObjects.ShowFlyText;
|
||||
import protocol.swg.objectControllerObjects.ShowLootBox;
|
||||
@@ -155,7 +157,55 @@ public class PlayerService implements INetworkDispatch {
|
||||
|
||||
@Override
|
||||
public void insertOpcodes(Map<Integer, INetworkRemoteEvent> swgOpcodes, Map<Integer, INetworkRemoteEvent> objControllerOpcodes) {
|
||||
|
||||
|
||||
swgOpcodes.put(Opcodes.ShowBackpack, (session, data) -> {
|
||||
data.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
Client client = core.getClient(session);
|
||||
|
||||
if (client == null)
|
||||
return;
|
||||
|
||||
SWGObject player = client.getParent();
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost");
|
||||
|
||||
if (ghost == null)
|
||||
return;
|
||||
|
||||
ShowBackpack sentPacket = new ShowBackpack();
|
||||
sentPacket.deserialize(data);
|
||||
|
||||
ghost.setShowBackpack(sentPacket.isShowBackpack());
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.ShowHelmet, (session, data) -> {
|
||||
data.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
Client client = core.getClient(session);
|
||||
|
||||
if (client == null)
|
||||
return;
|
||||
|
||||
SWGObject player = client.getParent();
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
PlayerObject ghost = (PlayerObject) player.getSlottedObject("ghost");
|
||||
|
||||
if (ghost == null)
|
||||
return;
|
||||
|
||||
ShowHelmet sentPacket = new ShowHelmet();
|
||||
sentPacket.deserialize(data);
|
||||
|
||||
ghost.setShowHelmet(sentPacket.isShowHelmet());
|
||||
});
|
||||
|
||||
objControllerOpcodes.put(ObjControllerOpcodes.ChangeRoleIconChoice, (session, data) -> {
|
||||
|
||||
Client c = core.getClient(session);
|
||||
|
||||
Reference in New Issue
Block a user