Просмотр исходного кода

- Added atcommand @homstats so you can check your homunculus stats and compare them to the minimum/maximum values that you could have at your current level. This command is meant to help figure out if homuncs are indeed getting a faster stat growth than they should have.
- Fixed some of the default @ levels for hom related commands.


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

skotlex 18 лет назад
Родитель
Сommit
07b63243a3
4 измененных файлов с 71 добавлено и 3 удалено
  1. 4 0
      Changelog-Trunk.txt
  2. 4 1
      conf-tmpl/atcommand_athena.conf
  3. 62 2
      src/map/atcommand.c
  4. 1 0
      src/map/atcommand.h

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ 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/01/16
+	* Added atcommand @homstats so you can check your homunculus stats and
+	  compare them to the minimum/maximum values that you could have at your
+	  current level. This command is meant to help figure out if homuncs are
+	  indeed getting a faster stat growth than they should have.
 	* Fixed the next invoked skill after AbraCadabra not having requirements
 	  even when it is a different skill than the one chosen by AbraCadabra.
 	* Implemented Intravision as it should be. Thanks to HelloKitty2 for the

+ 4 - 1
conf-tmpl/atcommand_athena.conf

@@ -126,8 +126,8 @@ noask: 1
 jailtime: 1
 
 //Homunculus commands for players
-homtalk: 1
 hominfo: 1
+homstats: 1
 
 //---------------------------
 // 10: Super player+ commands
@@ -160,6 +160,9 @@ partyoption: 10
 // Command what the player's pet will say.
 pettalk: 10
 
+// Command what the player's homunculus will say.
+homtalk: 10
+
 // Locates and displays the position of a certain mob on the current map.
 mobsearch: 10
 // Locates and displays the position of a certain mob on your mini-map

+ 62 - 2
src/map/atcommand.c

@@ -311,6 +311,7 @@ ACMD_FUNC(homfriendly);	//[orn]
 ACMD_FUNC(homhungry);	//[orn]
 ACMD_FUNC(homtalk);	//[orn]
 ACMD_FUNC(hominfo);	//[Toms]
+ACMD_FUNC(homstats);	//[Skotlex]
 ACMD_FUNC(showmobs); //KarLaeda
 
 /*==========================================
@@ -640,8 +641,9 @@ static AtCommandInfo atcommand_info[] = {
 	{ AtCommand_MakeHomun,				"@makehomun",	60, atcommand_makehomun	},
 	{ AtCommand_HomFriendly,			"@homfriendly",		60, atcommand_homfriendly },
 	{ AtCommand_HomHungry,			"@homhungry",		60, atcommand_homhungry },
-	{ AtCommand_HomTalk,			"@homtalk",		0, atcommand_homtalk },
-	{ AtCommand_HomInfo,			"@hominfo",		0, atcommand_hominfo },
+	{ AtCommand_HomTalk,			"@homtalk",		10, atcommand_homtalk },
+	{ AtCommand_HomInfo,			"@hominfo",		1, atcommand_hominfo },
+	{ AtCommand_HomStats,			"@homstats",		1, atcommand_homstats },
 	{ AtCommand_ShowMobs,			"@showmobs",		10, atcommand_showmobs },  //KarLaeda
 // add new commands before this line
 	{ AtCommand_Unknown,			NULL,				 1, NULL }
@@ -9944,6 +9946,64 @@ int atcommand_hominfo(
 	return 0;
 }
 
+int atcommand_homstats(
+	const int fd, struct map_session_data* sd,
+	const char* command, const char* message)
+{
+	struct homun_data *hd;
+	struct homunculus_db *db;
+	struct s_homunculus *hom;
+	int lv;
+
+	nullpo_retr(-1, sd);
+
+	if(!merc_is_hom_active(sd->hd))
+		return -1;
+	hd = sd->hd;
+	
+	hom = &hd->homunculus;
+	db = hd->homunculusDB;
+	lv = hom->level;
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,
+		"Homunculus growth stats (Lv %d %s):", lv, db->name);
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Max HP: %d (%d~%d)",
+		hom->max_hp, lv*db->gminHP, lv*db->gmaxHP);
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Max SP: %d (%d~%d)",
+		hom->max_sp, lv*db->gminSP, lv*db->gmaxSP);
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Str: %d (%d~%d)",
+		hom->str/10, lv*db->gminSTR/10, lv*db->gmaxSTR/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Agi: %d (%d~%d)",
+		hom->agi/10, lv*db->gminAGI/10, lv*db->gmaxAGI/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Vit: %d (%d~%d)",
+		hom->vit/10, lv*db->gminVIT/10, lv*db->gmaxVIT/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Int: %d (%d~%d)",
+		hom->int_/10, lv*db->gminINT/10, lv*db->gmaxINT/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Dex: %d (%d~%d)",
+		hom->dex/10, lv*db->gminDEX/10, lv*db->gmaxDEX/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	snprintf(atcmd_output, sizeof(atcmd_output) ,"Luk: %d (%d~%d)",
+		hom->luk/10, lv*db->gminLUK/10, lv*db->gmaxLUK/10); 
+	clif_displaymessage(fd, atcmd_output);
+
+	return 0;
+}
+
 /*==========================================
  * Show Items DB Info   v 1.0
  * originally by [Lupus] eAthena

+ 1 - 0
src/map/atcommand.h

@@ -282,6 +282,7 @@ enum AtCommandType {
 	AtCommand_HomHungry, //[orn]
 	AtCommand_HomTalk, //[orn]
 	AtCommand_HomInfo, //[Toms]
+	AtCommand_HomStats, //[Skotlex]
 	AtCommand_ShowMobs, //KarLaeda
 	// end <- Ahem, guys, don't place AtCommands after AtCommand_Unknown! [Skotlex]
 	AtCommand_Unknown,