summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-21 00:13:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-21 00:13:56 +0000
commitfd665092bbcd4be32f9d8319ffbb4aad30b40d08 (patch)
tree96fbf399d2704c89a5254a91994dd07a40fdfe39 /src/map/map.h
parent5870b45487fde3bc3fef54062aab5fcce4ce39ca (diff)
downloadhercules-fd665092bbcd4be32f9d8319ffbb4aad30b40d08.tar.gz
hercules-fd665092bbcd4be32f9d8319ffbb4aad30b40d08.tar.bz2
hercules-fd665092bbcd4be32f9d8319ffbb4aad30b40d08.tar.xz
hercules-fd665092bbcd4be32f9d8319ffbb4aad30b40d08.zip
- Fixed new guilds displaying online-connect member count at 0 rather than 1, and the guild master not knowing it is one (eg: it cannot edit the guild notice of a newly created guild until relogging).
- Fixed acc_reg2 parsing screwing up the char_id and subtracting 2 from it rather than passing it as it is. - Extended the auth_node/auth_db system in chrif.c to handle log in/out and mapserver-change procedures. This way players are not in the main dbs when they are not "active", which blocks potential invalid accesses to them. - Replaced states auth, waiting_disconnect and finalsave with active. - Cleaned some the party/guild login and creation procedures, removed the party_sent/guild_sent states. - Removed a redundant guild_check_member call which is beyond not-needed and into the realm of wasting resources. - clif_parse will no longer process packets from !sd->state.active players, this also makes checking for finalsave uneccessary (since players re already removed from the maps and dbs by this point, so you can't access them in any other way) - Separated the roles of unit_free and map_quit, the former will handle cleaning structures from the player so it can be free'd safely, while the latter performs additional routines which are unique to characters logging out normally (map-server changes will invoke unit_free and bypass map_quit). - Removed pc_isplaying, quit_db, map_knowsaccount, MAPIT_PCISPLAYING among other functions/defines which are no longer needed due to the new login scheme. - Cleand up a bit some code in the clif_send(_sub) functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 81b55bb7a..269319ab8 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -514,10 +514,9 @@ struct map_session_data {
//NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
//status_calc_pc, while special_state is recalculated in each call. [Skotlex]
struct {
- unsigned auth : 1;
+ unsigned active : 1; //Marks active player (not active is logging in/out, or changing map servers)
unsigned menu_or_input : 1;// if a script is waiting for feedback from the player
unsigned dead_sit : 2;
- unsigned waitingdisconnect : 1;
unsigned lr_flag : 2;
unsigned connect_new : 1;
unsigned arrow_atk : 1;
@@ -537,12 +536,9 @@ struct map_session_data {
unsigned noask :1; // [LuzZza]
unsigned trading :1; //[Skotlex] is 1 only after a trade has started.
unsigned deal_locked :2; //1: Clicked on OK. 2: Clicked on TRADE
- unsigned party_sent :1;
- unsigned guild_sent :1;
unsigned monster_ignore :1; // for monsters to ignore a character [Valaris] [zzo]
unsigned size :2; // for tiny/large types
unsigned night :1; //Holds whether or not the player currently has the SI_NIGHT effect on. [Skotlex]
- unsigned finalsave :1; //Signals whether the final save for the char was done or not yet. Meant to prevent exploits and the like. [Skotlex]
unsigned blockedmove :1;
unsigned using_fake_npc :1;
unsigned rewarp :1; //Signals that a player should warp as soon as he is done loading a map. [Skotlex]
@@ -1295,9 +1291,7 @@ int map_delobjectnofree(int id);
void map_foreachobject(int (*)(struct block_list*,va_list),int,...);
int map_search_freecell(struct block_list *src, int m, short *x, short *y, int rx, int ry, int flag);
//
-bool map_knowsaccount(int account_id);
int map_quit(struct map_session_data *);
-void map_quit_ack(int account_id, int char_id);
// npc
bool map_addnpc(int,struct npc_data *);
@@ -1338,7 +1332,7 @@ struct map_session_data * map_nick2sd(const char*);
enum e_mapitflags
{
MAPIT_NORMAL = 0,
- MAPIT_PCISPLAYING = 1,// player is authed, not waiting disconnect and not in final save
+// MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players.
};
struct s_mapiterator;
struct s_mapiterator* mapit_alloc(enum e_mapitflags flags, enum bl_type types);
@@ -1348,7 +1342,7 @@ struct block_list* mapit_last(struct s_mapiterator* mapit);
struct block_list* mapit_next(struct s_mapiterator* mapit);
struct block_list* mapit_prev(struct s_mapiterator* mapit);
bool mapit_exists(struct s_mapiterator* mapit);
-#define mapit_getallusers() mapit_alloc(MAPIT_PCISPLAYING,BL_PC)
+#define mapit_getallusers() mapit_alloc(MAPIT_NORMAL,BL_PC)
#define mapit_geteachpc() mapit_alloc(MAPIT_NORMAL,BL_PC)
#define mapit_geteachmob() mapit_alloc(MAPIT_NORMAL,BL_MOB)
#define mapit_geteachiddb() mapit_alloc(MAPIT_NORMAL,BL_ALL)