-
Apprentice
v83 Donor able to see GM Hide problem
Hi, I'm currently facing a problem, that is when a GM uses GM Hide. It does hide from players and works normally. But it doesn't works on Donor which is gmLevel 1, donor still will be able to see GM unless using warphere <player> during hide mode. I tried compared some of the different source but I still can't a solution. Can anyone guide me on this? I'm using Heliosms Source.
public void sendSpawnData(MapleClient client) {
if ((this.isHidden() && client.getPlayer().isSGM()) || !this.isHidden()) {
client.getSession().write(MaplePacketCreator.spawnPlayerMapobject(this));
for (int i = 0; pets[i] != null; i++) {
client.getSession().write(MaplePacketCreator.showPet(this, pets[i], false, false));
}
}
}
public void registerEffect(MapleStatEffect effect, long starttime, ScheduledFuture<?> schedule) {
if (effect.isHide() && gmLevel > 1) {
this.hidden = true;
this.getClient().getSession().write(MaplePacketCreator.getGMEffect(16, (byte) 1));
getMap().broadcastNONGMMessage(this, MaplePacketCreator.removePlayerFromMap(id), false);
I did try if using
(!this.isHidden() || client.getPlayer().gmLevel() > 1) {
if ((this.isHidden() && client.getPlayer().isGM()) || !this.isHidden()) {
if (!this.isHidden() || client.getPlayer().gmLevel() >= this.gmLevel()) {
-
-
Valued Member
Re: v83 Donor able to see GM Hide problem
Probable fix: Modify your broadcastGMMessage and broadcastNONGMMessage methods to account for donors being level 1.
Better idea: Don't use gm level for donors, period.
-
Re: v83 Donor able to see GM Hide problem
If you didn't use GM level, you'd still need to code some type of system to handle donors vs non-donors. I think using GM levels for this is fine, you just gotta handle situations like these when they arise.
-
Apprentice
Re: v83 Donor able to see GM Hide problem
Thanks guys, it seems that Heliosms was made that way, it will be troublesome if separate it.
But I found that changing
public boolean isGM() {
return gmLevel >= 2;
}
fixed the problem.
If changing broadcastNONGMMessage to broadcastGMMessage will make donor cant see GM but player can see GM.
Anyway problem fixed thanks.