summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
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 f17766f50..18aa476ff 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11859,9 +11859,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,"%streset",atcommand->at_symbol);
atcommand->parse(fd, sd, cmd, 1);
}
@@ -13376,23 +13376,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;
}