mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
Guild names now show when examining another player
This commit is contained in:
@@ -40,6 +40,8 @@ import org.apache.mina.core.session.IoSession;
|
||||
import protocol.swg.ClientIdMsg;
|
||||
import protocol.swg.ClientMfdStatusUpdateMessage;
|
||||
import protocol.swg.ExpertiseRequestMessage;
|
||||
import protocol.swg.GuildRequestMessage;
|
||||
import protocol.swg.GuildResponseMessage;
|
||||
import protocol.swg.ServerTimeMessage;
|
||||
import protocol.swg.SetWaypointColor;
|
||||
import protocol.swg.objectControllerObjects.ChangeRoleIconChoice;
|
||||
@@ -51,6 +53,7 @@ import resources.common.Opcodes;
|
||||
import resources.common.RGB;
|
||||
import resources.common.SpawnPoint;
|
||||
import resources.datatables.PlayerFlags;
|
||||
import resources.guild.Guild;
|
||||
import resources.objects.Buff;
|
||||
import resources.objects.building.BuildingObject;
|
||||
import resources.objects.cell.CellObject;
|
||||
@@ -237,6 +240,38 @@ public class PlayerService implements INetworkDispatch {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
swgOpcodes.put(Opcodes.GuildRequestMessage, new INetworkRemoteEvent() {
|
||||
|
||||
@Override
|
||||
public void handlePacket(IoSession session, IoBuffer data) throws Exception {
|
||||
data.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
Client client = core.getClient(session);
|
||||
|
||||
if (client == null)
|
||||
return;
|
||||
|
||||
SWGObject player = client.getParent();
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
GuildRequestMessage request = new GuildRequestMessage();
|
||||
request.deserialize(data);
|
||||
|
||||
CreatureObject targetPlayer = (CreatureObject) core.objectService.getObject(request.getCharacterId());
|
||||
|
||||
if (targetPlayer.getGuildId() != 0) {
|
||||
Guild targetGuild = core.guildService.getGuildById(targetPlayer.getGuildId());
|
||||
GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), targetGuild.getName());
|
||||
client.getSession().write(response.serialize());
|
||||
} else {
|
||||
GuildResponseMessage response = new GuildResponseMessage(request.getCharacterId(), "None");
|
||||
client.getSession().write(response.serialize());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.CmdSceneReady, new INetworkRemoteEvent() {
|
||||
|
||||
Reference in New Issue
Block a user