summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-16 21:42:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-16 21:42:07 +0000
commitfe36467baa9508d99e166ca8c07509551215469c (patch)
tree8017f7703cf52caf8edcddc2e91da141b9ae3c30 /src/map/atcommand.c
parent9a274a0fdb76313ff46861682d1eda67898548e6 (diff)
downloadhercules-fe36467baa9508d99e166ca8c07509551215469c.tar.gz
hercules-fe36467baa9508d99e166ca8c07509551215469c.tar.bz2
hercules-fe36467baa9508d99e166ca8c07509551215469c.tar.xz
hercules-fe36467baa9508d99e166ca8c07509551215469c.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9663 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c64
1 files changed, 62 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 66cb74141..f408a2644 100644
--- a/src/map/atcommand.c
+++ b/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