mirror of
https://github.com/HerculesWS/Hercules
synced 2026-08-15 12:23:13 -04:00
Updated some aegis(item, monster, resetstate & resetskill) command to work properly in Hercules.
This commit is contained in:
parent
5de6aabb0a
commit
94d75f867a
1 changed files with 13 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue