summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-01 15:26:53 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-01 15:26:53 +0000
commitbdfce85b67dd0e63f34ddf9bed05d94b79dd9d05 (patch)
tree8a5660f98c2af5a8456e801e5d11f17a31bb6e1d /src/map/map.c
parente8268e93edc3fe17abb22b870a66eecaf5ba1e13 (diff)
downloadhercules-bdfce85b67dd0e63f34ddf9bed05d94b79dd9d05.tar.gz
hercules-bdfce85b67dd0e63f34ddf9bed05d94b79dd9d05.tar.bz2
hercules-bdfce85b67dd0e63f34ddf9bed05d94b79dd9d05.tar.xz
hercules-bdfce85b67dd0e63f34ddf9bed05d94b79dd9d05.zip
Cleaned up some parts of the code.
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 51ff269b8..c7173dfdb 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -792,7 +792,7 @@ int map_foreachinarea(int (*func)(struct block_list*,va_list),int m,int x0,int y
if (type&~BL_MOB)
for (by = y0 / BLOCK_SIZE; by <= y1 / BLOCK_SIZE; by++) {
- for(bx=x0/BLOCK_SIZE;bx<=x1/BLOCK_SIZE;bx++){
+ for(bx = x0 / BLOCK_SIZE; bx <= x1 / BLOCK_SIZE; bx++) {
bl = map[m].block[bx+by*map[m].bxs];
c = map[m].block_count[bx+by*map[m].bxs];
for(i=0;i<c && bl;i++,bl=bl->next){
@@ -1597,19 +1597,19 @@ static void* create_charid2nick(DBKey key, va_list args)
/*==========================================
* charid_dbへ追加(返信待ちがあれば返信)
*------------------------------------------*/
-void map_addchariddb(int charid, char *name)
+void map_addchariddb(int charid, char* name)
{
- struct charid2nick *p;
+ struct charid2nick* p;
int req = 0;
- p = idb_ensure(charid_db,charid,create_charid2nick);
+ p = idb_ensure(charid_db, charid, create_charid2nick);
req = p->req_id;
p->req_id = 0;
//We overwrite the nick anyway in case a different one arrived.
memcpy(p->nick, name, NAME_LENGTH);
if (req) {
- struct map_session_data *sd = map_id2sd(req);
+ struct map_session_data* sd = map_id2sd(req);
if (sd) clif_solved_charname(sd,charid);
}
}
@@ -2775,8 +2775,8 @@ int map_config_read(char *cfgName)
fp = fopen(cfgName,"r");
if (fp == NULL) {
- ShowFatalError("Map configuration file not found at: %s\n", cfgName);
- exit(1);
+ ShowError("Map configuration file not found at: %s\n", cfgName);
+ return 1;
}
while(fgets(line, sizeof(line), fp))
{
@@ -3244,7 +3244,7 @@ static int map_abort_sub(DBKey key,void * data,va_list ap)
void do_abort(void)
{
//Save all characters and then flush the inter-connection.
- if (!chrif_isconnect())
+ if (!chrif_isconnected())
{
if (pc_db->size(pc_db))
ShowFatalError("Server has crashed without a connection to the char-server, character data can't be saved!\n");