Procházet zdrojové kódy

- Fixed the mob_override_name setting not working on summoned mobs.
- The server now prints an error message when it the produce_db reaches the max number of allowed produce recipes.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9907 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex před 18 roky
rodič
revize
f457d842bc
3 změnil soubory, kde provedl 13 přidání a 1 odebrání
  1. 3 0
      Changelog-Trunk.txt
  2. 7 1
      src/map/mob.c
  3. 3 0
      src/map/skill.c

+ 3 - 0
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.
 
 2007/02/24
+	* Fixed the mob_override_name setting not working on summoned mobs.
+	* The server now prints an error message when it the produce_db reaches the
+	  max number of allowed produce recipes.
 	* The NK value of the skill_db has been made a hexadecimal value, and
 	  expanded to include more information about a skill's damage properties: 0x8
 	  ignore caster's cards, 0x10 ignore element adjustments, 0x20 ignore

+ 7 - 1
src/map/mob.c

@@ -2486,7 +2486,13 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
 			data.x = md2->bl.x;
 			data.y = md2->bl.y;
 		}
-		strcpy(data.name, "--ja--");	//These two need to be loaded from the db for each slave.
+
+		//These two need to be loaded from the db for each slave.
+		if(battle_config.override_mob_names==1)
+			strcpy(data.name,"--en--");
+		else
+			strcpy(data.name,"--ja--");
+
 		data.level = 0;
 		if (!mob_parse_dataset(&data))
 			continue;

+ 3 - 0
src/map/skill.c

@@ -11442,7 +11442,10 @@ int skill_readdb (void)
 			}
 			k++;
 			if(k >= MAX_SKILL_PRODUCE_DB)
+			{
+				ShowError("Reached the max number of produce_db entries (%d), consider raising the value of MAX_SKILL_PRODUCE_DB and recompile.\n", MAX_SKILL_PRODUCE_DB);
 				break;
+			}
 		}
 		fclose(fp);
 		ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",k,path);