浏览代码

* Fixed GMs with GM level equal to 'lowest_gm_level' being treated as normal players in 'gm_can_party' check (bugreport:4162, since r13143).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14705 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 年之前
父节点
当前提交
0cd89ec86f
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/party.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/02/14
+	* Fixed GMs with GM level equal to 'lowest_gm_level' being treated as normal players in 'gm_can_party' check (bugreport:4162, since r13143). [Ai4rei]
 	* Fixed a crash when script 'npctalk' is given too long string (bugreport:4759, related r2145). [Ai4rei]
 	- Fixed related buffer overflows in message related clif functions (since r1182, r14270).
 2011/02/09

+ 2 - 2
src/map/party.c

@@ -309,8 +309,8 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
 		return 0;
 	}
 	
-	if ( (pc_isGM(sd) > battle_config.lowest_gm_level && pc_isGM(tsd) < battle_config.lowest_gm_level && !battle_config.gm_can_party && pc_isGM(sd) < battle_config.gm_cant_party_min_lv)
-		|| ( pc_isGM(sd) < battle_config.lowest_gm_level && pc_isGM(tsd) > battle_config.lowest_gm_level && !battle_config.gm_can_party && pc_isGM(tsd) < battle_config.gm_cant_party_min_lv) )
+	if ( (pc_isGM(sd) >= battle_config.lowest_gm_level && pc_isGM(tsd) < battle_config.lowest_gm_level && !battle_config.gm_can_party && pc_isGM(sd) < battle_config.gm_cant_party_min_lv)
+		|| ( pc_isGM(sd) < battle_config.lowest_gm_level && pc_isGM(tsd) >= battle_config.lowest_gm_level && !battle_config.gm_can_party && pc_isGM(tsd) < battle_config.gm_cant_party_min_lv) )
 	{
 		//GMs can't invite non GMs to the party if not above the invite trust level
 		//Likewise, as long as gm_can_party is off, players can't invite GMs.