Sfoglia il codice sorgente

- Cleaned up and fixed @where command.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5840 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 anni fa
parent
commit
dde6f4f5f1
2 ha cambiato i file con 15 aggiunte e 6 eliminazioni
  1. 7 0
      Changelog-Trunk.txt
  2. 8 6
      src/map/atcommand.c

+ 7 - 0
Changelog-Trunk.txt

@@ -4,6 +4,13 @@ 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.
 
 2006/04/01
+	* Cleaned up and fixed @where command. [Skotlex]
+	* Fixed standing up no really making you stand up. [Skotlex]
+	* Added upgrade_svn5834.sql to update view for item type 10. Because of the
+	  ammo upgrade, all arrows need their view set to 1. This query does that to
+	  all type 10 items (this includes all ninja weapons as well, but a proper
+	  item_db.sql update is pending until the rest of throwables are updated)
+	  [Skotlex]
 	* Fixed compiler warnings. [Lance]
 	* Added structure view_data to handle sprite information for all characters
 	  (equipment, weapons, hair, dyes, etc). [Skotlex]

+ 8 - 6
src/map/atcommand.c

@@ -1285,8 +1285,9 @@ int atcommand_where(
 	const char* command, const char* message)
 {
 	struct map_session_data *pl_sd = NULL;
-	
 	int GM_level, pl_GM_level;
+
+	nullpo_retr(-1, sd);
 	memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
 
 	if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
@@ -1294,27 +1295,28 @@ int atcommand_where(
 		return -1;
 	}
 	pl_sd = map_nick2sd(atcmd_player_name);
-	nullpo_retr(-1, sd);
 
+	pl_sd = map_nick2sd(atcmd_player_name);
+	
 	if (pl_sd == NULL) 
 		return -1;
 
-	if(strncmp(sd->status.name,atcmd_player_name,NAME_LENGTH)!=0)
+	if(strncmp(pl_sd->status.name,atcmd_player_name,NAME_LENGTH)!=0)
 		return -1;
 		
 	GM_level = pc_isGM(sd);//also hide gms depending on settings in battle_athena.conf, show if they are aid [Kevin]
 	pl_GM_level = pc_isGM(pl_sd);
 	
 	if (battle_config.hide_GM_session) {
-		if(!(GM_level >= pl_GM_level)) {
-			if (!(battle_config.who_display_aid > 0 && pc_isGM(sd) >= battle_config.who_display_aid)) {
+		if(GM_level < pl_GM_level) {
+			if (!(battle_config.who_display_aid && GM_level >= battle_config.who_display_aid)) {
 				return -1;
 			}
 		}
 	}
 
 	snprintf(atcmd_output, sizeof atcmd_output, "%s %s %d %d",
-		atcmd_player_name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
+		pl_sd->status.name, mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
 	clif_displaymessage(fd, atcmd_output);
 
 	return 0;