I almost do not understand a single thing you're saying chunkarama..Sorry :/, but from what I see on your post, I looked into MapleCharacter and found
Code:
public void registerEffect(MapleStatEffect effect, long starttime, ScheduledFuture<?> schedule) { if (effect.isHide() && gmLevel > 0) {
this.hidden = true;
this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 1));
getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(id), false);
I assume that it's only a one way (Don't know any other way to explain it), and there's no other option for when a GM unhides. I found
Code:
if (!overwrite) { cancelPlayerBuffs(buffstats);
if (effect.isHide() && (MapleCharacter) getMap().getMapObject(getObjectId()) != null) {
this.hidden = false;
this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 0));
getMap().broadcastNONGMMessage(this, MaplePacketCreator.spawnPlayerMapobject(this), false);
for (int i = 0; pets[i] != null; i++) {
getMap().broadcastNONGMMessage(this, MaplePacketCreator.showPet(this, pets[i], false, false), false);
}
}
}
EDIT: Based on trial and lots of errors:
Code:
public void registerEffect(MapleStatEffect effect, long starttime, ScheduledFuture<?> schedule) { if (effect.isHide() && gmLevel > 0) {
this.hidden = true;
this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 1));
getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(id), false);
if (effect.isHide() && (MapleCharacter) getMap().getMapObject(getObjectId()) != null) {
this.hidden = false;
this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 0));
getMap().broadcastNONGMMessage(this, MaplePacketCreator.spawnPlayerMapobject(this), false);
for (int i = 0; pets[i] != null; i++) {
getMap().broadcastNONGMMessage(this, MaplePacketCreator.showPet(this, pets[i], false, false), false); }
}
}
}
This works only once for GM hide. When you log on and unhide, it works once, but after that, you can't rehide. It keeps you unhided like it doesn't even work, but the buff icon appears on the top right corner. (I may have lost some "}" during the process of copy & pasting, but don't mind that if you can)
From another HellyMS source, but I'm not sure if it's even correct or not to put in to unhide the GM correctly. I have tried putting that into the original and many bugs occur so I had to undo Anything involving it. Any suggestions? o.o