GMs can see eachother in hide.

Newbie Spellweaver
Joined
Apr 12, 2008
Messages
23
Reaction score
0
Small change, could be usefull :]

People who are in hide, or are a GM will be able to see if you use hide.

In maplecharacter.java
Find:
Code:
getMap().broadcastMessage(this, MaplePacketCreator.removePlayerFromMap(getId()), false);

Replace with:
Code:
getMap().broadcastNonGmMessage(this, MaplePacketCreator.removePlayerFromMap(getId()));


In maplemap.java
Find:
Code:
/**
	 * Broadcasts the given packet to everyone on the map but the source. source = null Broadcasts to everyone
	 * 
	 * @param source
	 * @param packet
	 */

Add Before:
Code:
public void broadcastNonGmMessage(MapleCharacter source, MaplePacket packet) {
		synchronized (characters) {
			for (MapleCharacter chr : characters) {
				if (chr != source && (!chr.isGM() || !chr.isHidden())) chr.getClient().getSession().write(packet);
			}
		}
	}

For those interested, what this does is changes if so that instead of brodcasting the packet to everyone in the map when your in hide, it brodcasts it to everyone who isnt a GM, or isnt in hide.


I havent actually tested this myself yet (I will nextime I restart my server), but someone in the dev secion said it worked fine.
(auto hide on login will apprently keep you hidden, though)
 
Re: [Release] GMs can see eachother in hide.

Lol, some dude in Dev came up with this idea, didnt know you actually released it Lulz. good job. BTW, is it working?
 
Re: [Release] GMs can see eachother in hide.

I know you made it :P

Dont worry, im just sayin' it.

No, someone else told me to make sure I gave credit to the guy who made it. I guess they edited their post :/

I really should quote things more often D;
 
Re: [Release] GMs can see eachother in hide.

I think the broadcastnonGmmessage method will be extremely useful for other things that I've wanted to do for a little while. Thanks!
 
Re: [Release] GMs can see eachother in hide.

/**
* Broadcasts the given packet to everyone on the map but the source. source = null Broadcasts to everyone
*
* @param source
* @param packet
*/

**** cant find.
 
Re: [Release] GMs can see eachother in hide.

Mine Says /**
* not threadsafe, please synchronize yourself
*
* @param monster
*/
 
Re: [Release] GMs can see eachother in hide.

Very nice release, Lol even i couldn't make something like this.
 
Back