summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-21 11:52:29 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-21 11:52:29 +0000
commit7dad7b08f60bfdf10802ff2e865031029844042a (patch)
treecd4a03d63848cbe65e64259d10794f23b346d17b /src/map
parent99bcbe6eedb5ed47f6aa4a7188fb4e616bd2cd67 (diff)
downloadhercules-7dad7b08f60bfdf10802ff2e865031029844042a.tar.gz
hercules-7dad7b08f60bfdf10802ff2e865031029844042a.tar.bz2
hercules-7dad7b08f60bfdf10802ff2e865031029844042a.tar.xz
hercules-7dad7b08f60bfdf10802ff2e865031029844042a.zip
Added VS9 project files. Removed redundant map_getallusers() function
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c40
-rw-r--r--src/map/map.h1
2 files changed, 0 insertions, 41 deletions
diff --git a/src/map/map.c b/src/map/map.c
index a956952b8..06b39129e 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1739,44 +1739,6 @@ struct block_list * map_id2bl(int id)
return bl;
}
-/*==========================================
- * Returns an array of all players in the server (includes non connected ones) [Skotlex]
- * The int pointer given returns the count of elements in the array.
- * If null is passed, it is requested that the memory be freed (for shutdown), and null is returned.
- *------------------------------------------*/
-struct map_session_data** map_getallusers(int *users)
-{
- static struct map_session_data **all_sd=NULL;
- static unsigned int all_count = 0;
-
- if (users == NULL)
- { //Free up data
- if (all_sd) aFree(all_sd);
- all_sd = NULL;
- return NULL;
- }
-
- if (all_sd == NULL)
- { //Init data
- all_count = pc_db->size(pc_db); //This is the real number of chars in the db, better use this than the actual "online" count.
- if (all_count < 1)
- all_count = 10; //Allow room for at least 10 chars.
- CREATE(all_sd, struct map_session_data*, all_count);
- }
-
- if (all_count < pc_db->size(pc_db))
- {
- all_count = pc_db->size(pc_db)+10; //Give some room to prevent doing reallocs often.
- RECREATE(all_sd, struct map_session_data*, all_count);
- }
-
- *users = pc_db->getall(pc_db,(void**)all_sd,all_count,NULL);
- if (*users > (signed int)all_count) //Which should be impossible...
- *users = all_count;
-
- return all_sd;
-}
-
void map_foreachpc(int (*func)(DBKey,void*,va_list),...)
{
va_list ap;
@@ -3126,8 +3088,6 @@ void do_final(void)
do_final_unit();
if(use_irc)
do_final_irc();
-
- map_getallusers(NULL); //Clear the memory allocated for this array.
map_db->destroy(map_db, map_db_final);
diff --git a/src/map/map.h b/src/map/map.h
index c0e0b8d7a..11e7a3731 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1337,7 +1337,6 @@ int map_eraseipport(unsigned short map, uint32 ip, uint16 port);
int map_eraseallipport(void);
void map_addiddb(struct block_list *);
void map_deliddb(struct block_list *bl);
-struct map_session_data** map_getallusers(int *users);
void map_foreachpc(int (*func)(DBKey,void*,va_list),...);
void map_foreachmob(int (*func)(DBKey,void*,va_list),...);
int map_foreachiddb(int (*)(DBKey,void*,va_list),...);