Jump to content

New IsGM() - with new Gamemaster permission


Recommended Posts

Hey guys.

i wanted to create a new Function, because @my Project i created a new GMFlag.

I created "GM_DEVELOPER" only for Serverowner, now im sitting on the permissions - i wanted to block all situations like (exchange, Storage, drop items and so on...)

For example: (Block Friendlist)

				if (!ch->IsGM() && ch_companion->IsLowLevelGM())	// Player -> GM
				{
					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<¸Þ½ÅÁ®> ¿î¿µÀÚ´Â ¸Þ½ÅÁ®¿¡ Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù."));
					return sizeof(TPacketCGMessengerAddByVID);
				}
                      
				if (ch->IsLowGM() && gm_get_level(name) == GM_PLAYER)	// GM -> Player
				{
					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("GameMasters can't have player friends."));
					return CHARACTER_NAME_MAX_LEN;
				}

I created "IsLowLevelGM()" it should only contains GM_LOW_WIZARD up to GM_IMPLEMENTOR

My IsLowLevelGM():

BOOL CHARACTER::IsLowLevelGM() const
{
	if (GetGMLevel() >= GM_LOW_WIZARD <= GM_HIGH_WIZARD)
		return true;
	return false;
}

In case of [Adding GM to Friendlist/Adding Players to GM-Friendlist] it is working, adding to guild isnt working, but only drop down is working...
The original Function works with "IsGM()" but i only wanted that GM_DEVELOPER" is higher Ranked as GM_IMPLEMENTOR and have more Permissions than GM_IMPLEMENTOR.
I wanted with the Dev Rank Full Perm. and only to block for all other gm's

My Question - is the IsLowLevelGM() correct? or where is the problem?^^
Thanks!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.