diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-11 13:02:16 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-11 13:02:16 +0000 |
commit | 2c6e4b099a37438a71f07b4a2a1f855801b02d90 (patch) | |
tree | fbcaf57e52fd0ac4b6e1743d57ca6e3469ecd030 | |
parent | c81fe7d47a39ab1a6bfe95549aa4bc4153f98f2b (diff) | |
download | hercules-2c6e4b099a37438a71f07b4a2a1f855801b02d90.tar.gz hercules-2c6e4b099a37438a71f07b4a2a1f855801b02d90.tar.bz2 hercules-2c6e4b099a37438a71f07b4a2a1f855801b02d90.tar.xz hercules-2c6e4b099a37438a71f07b4a2a1f855801b02d90.zip |
Added partylock/guildlock mapflag checking for @changeleader/@changegm (bugreport:72)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12810 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/atcommand.c | 16 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 99ce42486..ada2aa1ee 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2008/06/11 + * Added partylock/guildlock checking for @changeleader/@changegm + (bugreport:72) [ultramage] 2008/06/10 * Fixed double attack working with unarmed attacks, as reported by Lone Wolf. [Brainstorm] * Added experimental code to set the socket limit at runtime. [FlavioJS] diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9bf6b710f..2c80db37c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5894,6 +5894,13 @@ int atcommand_changegm(const int fd, struct map_session_data* sd, const char* co clif_displaymessage(fd, "You need to be a Guild Master to use this command."); return -1; } + + if( map[sd->bl.m].flag.guildlock ) + { + clif_displaymessage(fd, "You cannot change guild leaders on this map."); + return -1; + } + if (strlen(message)==0) { clif_displaymessage(fd, "Command usage: @changegm <guildmember name>"); @@ -5926,8 +5933,13 @@ int atcommand_changeleader(const int fd, struct map_session_data* sd, const char return -1; } - for (mi = 0; mi < MAX_PARTY && p->data[mi].sd != sd; mi++); - + if( map[sd->bl.m].flag.partylock ) + { + clif_displaymessage(fd, "You cannot change party leaders on this map."); + return -1; + } + + ARR_FIND( 0, MAX_PARTY, mi, p->data[mi].sd == sd ); if (mi == MAX_PARTY) return -1; //Shouldn't happen |