Send no guild for static trainers on the wire

Live static trainers carried no guild in 2,110 of 2,110 sightings, in
buildings too; slotted ones showed their CITY building's guild tag (e.g.
Nathokk in King's Cross). npc.guild keeps the building's guild for
server-side checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-28 10:24:28 -04:00
1 parent 652142065d
commit 38255048c8
1 file changed
+6 -3
+6 -3
View File
@@ -330,9 +330,12 @@ public class NPC extends AbstractCharacter {
writer.putInt(0);
writer.put((byte) 0);
//Pull guild info from building if linked to one
Guild.serializeForClientMsg(npc.guild, writer, null, true);
// Live static trainers sent no guild, even when slotted in a guild's building (2,110 of 2,110 sightings);
// npc.guild still holds the building's guild for the server's own checks.
if (npc.isStaticWorldObject())
Guild.serializeForClientMsg(Guild.getErrantGuild(), writer, null, true);
else
Guild.serializeForClientMsg(npc.guild, writer, null, true);
writer.putInt(1);
writer.putInt(0x8A2E);