Fixed @showmobs not working due to a mistake in r12436 (bugreport:1487)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12699 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
14017b0f8a
commit
47cb29c556
@ -3,6 +3,8 @@ Date Added
|
||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2008/05/10
|
||||
* Fixed @showmobs not working (bugreport:1487)
|
||||
2008/05/09
|
||||
* Added correct extended info packets for items that are being moved
|
||||
into storage or cart. This caused items to visually lose their
|
||||
|
@ -6990,12 +6990,14 @@ int atshowmobs_timer(int tid, unsigned int tick, int id, intptr data)
|
||||
if( sd == NULL )
|
||||
return 0;
|
||||
|
||||
// remove indicator
|
||||
clif_viewpoint(sd, 1, 2, 0, 0, (int)data, 0xFFFFFF);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int atshowmobs_sub(struct block_list *bl,va_list ap)
|
||||
{
|
||||
int mob_id,fd;
|
||||
int mob_id;
|
||||
struct map_session_data* sd;
|
||||
static int number=0;
|
||||
struct mob_data *md;
|
||||
@ -7005,7 +7007,6 @@ static int atshowmobs_sub(struct block_list *bl,va_list ap)
|
||||
return 0;
|
||||
}
|
||||
mob_id = va_arg(ap,int);
|
||||
fd = va_arg(ap,int);
|
||||
sd = va_arg(ap,struct map_session_data*);
|
||||
|
||||
md = (struct mob_data *)bl;
|
||||
@ -7013,12 +7014,13 @@ static int atshowmobs_sub(struct block_list *bl,va_list ap)
|
||||
if(md->special_state.ai || md->master_id)
|
||||
return 0; //Hide slaves and player summoned mobs. [Skotlex]
|
||||
|
||||
if(fd && (mob_id==-1 || (md->class_==mob_id))){
|
||||
if(mob_id==-1 || md->class_==mob_id){
|
||||
clif_viewpoint(sd, 1, 1, bl->x, bl->y, ++number, 0xFFFFFF);
|
||||
add_timer(gettick()+5000, atshowmobs_timer, fd, number);
|
||||
add_timer(gettick()+5000, atshowmobs_timer, sd->bl.id, number);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* command, const char* message)
|
||||
{
|
||||
char mob_name[100];
|
||||
@ -7026,10 +7028,10 @@ int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* co
|
||||
|
||||
nullpo_retr(-1, sd);
|
||||
|
||||
if (sscanf(message, "%99[^\n]", mob_name) < 0)
|
||||
if(sscanf(message, "%99[^\n]", mob_name) < 0)
|
||||
return -1;
|
||||
|
||||
if ((mob_id = atoi(mob_name)) == 0)
|
||||
if((mob_id = atoi(mob_name)) == 0)
|
||||
mob_id = mobdb_searchname(mob_name);
|
||||
if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
|
||||
snprintf(atcmd_output, sizeof atcmd_output, "Invalid mob id %s!",mob_name);
|
||||
@ -7047,7 +7049,7 @@ int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* co
|
||||
#endif
|
||||
if(mob_id == atoi(mob_name) && mob_db(mob_id)->jname)
|
||||
strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
|
||||
// strcpy(mob_name,mob_db(mob_id)->name); // --en--
|
||||
//strcpy(mob_name,mob_db(mob_id)->name); // --en--
|
||||
|
||||
map_id = sd->bl.m;
|
||||
|
||||
@ -7055,7 +7057,7 @@ int atcommand_showmobs(const int fd, struct map_session_data* sd, const char* co
|
||||
mob_name, mapindex_id2name(sd->mapindex));
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
|
||||
map_foreachinmap(atshowmobs_sub, map_id, BL_MOB, mob_id, fd, sd);
|
||||
map_foreachinmap(atshowmobs_sub, map_id, BL_MOB, mob_id, sd);
|
||||
|
||||
atshowmobs_sub(&sd->bl,0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user