mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Fixed #300: (Misc) Clicking on profession icon does not alterate within list
This commit is contained in:
@@ -204,25 +204,29 @@ public class PlayerService implements INetworkDispatch {
|
||||
});
|
||||
|
||||
objControllerOpcodes.put(ObjControllerOpcodes.ChangeRoleIconChoice, (session, data) -> {
|
||||
|
||||
Client c = core.getClient(session);
|
||||
ChangeRoleIconChoice packet = new ChangeRoleIconChoice();
|
||||
PlayerObject player;
|
||||
SWGObject o;
|
||||
|
||||
packet.deserialize(data);
|
||||
o = core.objectService.getObject(packet.getObjectId());
|
||||
|
||||
if (c.getParent() == null || o == null || c.getParent() != o
|
||||
|| !(o instanceof CreatureObject) || !(o.getSlottedObject("ghost")
|
||||
instanceof PlayerObject)) {
|
||||
|
||||
Client client = core.getClient(session);
|
||||
|
||||
if (client == null)
|
||||
return;
|
||||
}
|
||||
|
||||
player = (PlayerObject) o.getSlottedObject("ghost");
|
||||
|
||||
|
||||
SWGObject object = client.getParent();
|
||||
|
||||
if (object == null)
|
||||
return;
|
||||
|
||||
PlayerObject player = (PlayerObject) object.getSlottedObject("ghost");
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
data.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
ChangeRoleIconChoice packet = new ChangeRoleIconChoice();
|
||||
packet.deserialize(data);
|
||||
|
||||
player.setProfessionIcon(packet.getIcon());
|
||||
|
||||
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.SetWaypointColor, (session, data) -> {
|
||||
|
||||
Reference in New Issue
Block a user