Some generic code cleanups (unused struct, user counting, code comment).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14254 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2010-02-27 18:01:09 +00:00
parent 117782c900
commit 339022cd20
4 changed files with 2 additions and 23 deletions

View File

@ -1501,13 +1501,7 @@ int send_users_tochar(void)
chrif_check(-1);
// get user count (TODO: improve this)
iter = mapit_getallusers();
for( mapit_first(iter); mapit_exists(iter); mapit_next(iter) )
users++;
mapit_free(iter);
// build the packet
users = map_usercount();
WFIFOHEAD(char_fd, 6+8*users);
WFIFOW(char_fd,0) = 0x2aff;
iter = mapit_getallusers();

View File

@ -179,15 +179,6 @@ int map_getusers(void)
*------------------------------------------*/
int map_usercount(void)
{
/*
int count = 0;
struct s_mapiterator* iter = mapit_getallusers();
for( mapit_first(iter); mapit_exists(iter); mapit_next(iter) )
count++;
mapit_free(iter);
return count;
*/
// since pc_db now only holds fully authed players, this approach is equivalent:
return pc_db->size(pc_db);
}

View File

@ -99,12 +99,6 @@ struct s_skill_db {
};
extern struct s_skill_db skill_db[MAX_SKILL_DB];
struct skill_name_db {
int id; // skill id
char *name; // search strings
char *desc; // description that shows up for searches
};
#define MAX_SKILL_UNIT_LAYOUT 50
#define MAX_SQUARE_LAYOUT 5 // 11*11のユニット配置が最大
#define MAX_SKILL_UNIT_COUNT ((MAX_SQUARE_LAYOUT*2+1)*(MAX_SQUARE_LAYOUT*2+1))

View File

@ -6218,7 +6218,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
}
if( opt_flag&2 && sd && sd->touching_id )
npc_touchnext_areanpc(sd,false);
npc_touchnext_areanpc(sd,false); // run OnTouch_ on next char in range
return 1;
}