summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-11 14:32:05 -0300
committershennetsind <ind@henn.et>2013-07-11 14:32:05 -0300
commit0a1c06b267e549877e0617fe19963b5b7c8c937c (patch)
tree228ab350473b07154d4bcf0ead0d93f163f6d6a8 /src/map/clif.c
parente3761a81ba4c941ba04a2b6b1f161a6e1402ebe9 (diff)
parent0683c5f38cdefa3735c3d0abc1b74abaa68cf5c4 (diff)
downloadhercules-0a1c06b267e549877e0617fe19963b5b7c8c937c.tar.gz
hercules-0a1c06b267e549877e0617fe19963b5b7c8c937c.tar.bz2
hercules-0a1c06b267e549877e0617fe19963b5b7c8c937c.tar.xz
hercules-0a1c06b267e549877e0617fe19963b5b7c8c937c.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 0000633bc..1b96d45fb 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11862,9 +11862,9 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) {
char cmd[15];
if( RFIFOW(fd,2) )
- sprintf(cmd,"%cresetskill",atcommand->at_symbol);
+ sprintf(cmd,"%cskreset",atcommand->at_symbol);
else
- sprintf(cmd,"%cresetstat",atcommand->at_symbol);
+ sprintf(cmd,"%cstreset",atcommand->at_symbol);
atcommand->parse(fd, sd, cmd, 1);
}
@@ -13379,23 +13379,25 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd)
void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
{
char *monster_item_name;
+ struct mob_db *mob_data;
+ struct item_data *item_data;
char command[NAME_LENGTH+10];
monster_item_name = (char*)RFIFOP(fd,2);
monster_item_name[NAME_LENGTH-1] = '\0';
- // FIXME: Should look for item first, then for monster.
- // FIXME: /monster takes mob_db Sprite_Name as argument
- if( mobdb_searchname(monster_item_name) ) {
- snprintf(command, sizeof(command)-1, "%cmonster %s", atcommand->at_symbol, monster_item_name);
+ if( (item_data=itemdb->search_name(monster_item_name)) != NULL
+ && strcmp(item_data->name, monster_item_name) != 0 ) { // It only accepts aegis name
+ if( item_data->type == IT_WEAPON || item_data->type == IT_ARMOR ) // nonstackable
+ snprintf(command, sizeof(command)-1, "%citem2 %d 1 0 0 0 0 0 0 0", atcommand->at_symbol, item_data->nameid);
+ else
+ snprintf(command, sizeof(command)-1, "%citem %d 20", atcommand->at_symbol, item_data->nameid);
atcommand->parse(fd, sd, command, 1);
return;
}
- // FIXME: Stackables have a quantity of 20.
- // FIXME: Equips are supposed to be unidentified.
-
- if( itemdb->search_name(monster_item_name) ) {
- snprintf(command, sizeof(command)-1, "%citem %s", atcommand->at_symbol, monster_item_name);
+ if( (mob_data=mob_db(mobdb_searchname(monster_item_name)))
+ && strcmp(mob_data->sprite, monster_item_name) != 0 ) { // It only accepts sprite name
+ snprintf(command, sizeof(command)-1, "%cmonster %s", atcommand->at_symbol, mob_data->name);
atcommand->parse(fd, sd, command, 1);
return;
}