Here you go:
Code:
public void Hide(boolean hide, boolean login) {
if (isGM() && hide != this.hidden) {
if (!hide) {
this.hidden = false;
announce(MaplePacketCreator.getGMEffect(0x10, (byte) 0));
getMap().broadcastMessage(this, MaplePacketCreator.spawnPlayerMapobject(this), false);
updatePartyMemberHP();
} else if (ServerConstants.GM_HIDE_SHOW_OTHERS) {
this.hidden = true;
announce(MaplePacketCreator.getGMEffect(0x10, (byte) 1));
for (MapleMapObject mmo : getMap().getAllPlayer()) {
MapleCharacter character = (MapleCharacter) mmo;
if (character.isGM()) {
character.announce(MaplePacketCreator.spawnPlayerMapobject(this));
//character.announce(MaplePacketCreator.getGMEffect(0x10, (byte) 1)); If it fails try using this.
updatePartyMemberHP();
}
}
} else {
this.hidden = true;
announce(MaplePacketCreator.getGMEffect(0x10, (byte) 1));
if (!login) {
getMap().broadcastMessage(this, MaplePacketCreator.removePlayerFromMap(getId()), false);
}
}
announce(MaplePacketCreator.enableActions());
}
}
ServerConstants.GM_HIDE_SHOW_OTHERS is true if you want it to work.
Since, you can't really filter for GM Hide, I made it so that when your character is loaded it will display itself on to other GM's within the map. I didn't test if it works after changing maps or tested if another gm appears in the map afterwards.
I've tested this only once, let me know if it works for you and it be great if anyone else can do a full test on this.
- - - Updated - - -
Sorry, I made a mistake for adding this: character.announce(MaplePacketCreator.getGMEffect(0x10, (byte) 1));
I'll update this later, after work to show the gm hide effect too or if anyone wants to try :D