summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-17 20:36:05 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-17 20:36:05 +0000
commit05ba06503dc75b58046331d292e557624688bc7f (patch)
tree901dbcbb9b8499103ac953fe16c4831438077f0a
parent055c7a233509bbb724df98c049ffe65addffc97d (diff)
downloadhercules-05ba06503dc75b58046331d292e557624688bc7f.tar.gz
hercules-05ba06503dc75b58046331d292e557624688bc7f.tar.bz2
hercules-05ba06503dc75b58046331d292e557624688bc7f.tar.xz
hercules-05ba06503dc75b58046331d292e557624688bc7f.zip
Removed the optional target parameter from atcommand_homshuffle, since the standard #-charcommand mechanism exists for this very purpose (code from r9671).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13788 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/atcommand.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 48e8b2464..a7334130f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7325,35 +7325,16 @@ int atcommand_homstats(const int fd, struct map_session_data* sd, const char* co
int atcommand_homshuffle(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
- TBL_PC* tsd = sd;
-
nullpo_retr(-1, sd);
- if ((!message || !*message) && !sd->hd)
- {
- clif_displaymessage(fd, "usage: @homshuffle <Alchemist's name>");
- clif_displaymessage(fd, "Use this to recalculate your (or someone else's) homunculus growth data");
- return -1;
- }
- if (message && *message) {
- tsd = map_nick2sd((char*)message);
- if (!tsd) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
- return -1;
- }
- if (pc_isGM(tsd) > pc_isGM(sd)) {
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
- return -1;
- }
- }
+ if(!sd->hd)
+ return -1; // nothing to do
- if(!merc_hom_shuffle(tsd->hd))
+ if(!merc_hom_shuffle(sd->hd))
return -1;
clif_displaymessage(sd->fd, "[Homunculus Stats Altered]");
- //Print out the new stats
- //This will send the commands to the invoker since they all use this fd regardless of sd value.
- atcommand_homstats(fd, tsd, command, message);
+ atcommand_homstats(fd, sd, command, message); //Print out the new stats
return 0;
}