diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-18 19:47:51 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-18 19:47:51 +0000 |
commit | cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc (patch) | |
tree | b202ca2859b92e0b13eeff9c7678d3567f3dc4a8 /src/map/pc.h | |
parent | aef1f6939ed8f235ba91afbcc69cdfcc5571988b (diff) | |
download | hercules-cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc.tar.gz hercules-cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc.tar.bz2 hercules-cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc.tar.xz hercules-cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc.zip |
Super performance improvement to groups system, caching permissions levels and atcommand permissions saving thousands of thousands of dbmap lookups.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16443 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index 6352d362c..2cb859e5b 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -158,7 +158,8 @@ struct map_session_data { } special_state; int login_id1, login_id2; unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex] - int group_id; + int group_id, group_pos, group_level; + unsigned int permissions;/* group permissions */ int packet_ver; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04, 11: 21sept04, 12: 18oct04, 13: 25oct04 ... 18 struct mmo_charstatus status; @@ -669,7 +670,7 @@ int pc_getrefinebonus(int lv,int type); bool pc_can_give_items(struct map_session_data *sd); bool pc_can_use_command(struct map_session_data *sd, const char *command, AtCommandType type); -bool pc_has_permission(struct map_session_data *sd, int permission); +#define pc_has_permission(sd, permission) ( ((sd)->permissions&permission) != 0 ) bool pc_should_log_commands(struct map_session_data *sd); int pc_setrestartvalue(struct map_session_data *sd,int type); |