summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-14 19:17:31 -0200
committershennetsind <ind@henn.et>2013-12-14 19:17:31 -0200
commitee1290403076d39d25def09753cf20c1dd157d09 (patch)
tree32a8b66dff44752551577bbd77e7c6bdd76224d4 /src/map/script.c
parent5c4f7b9047ff14018b7c46bf1ead71765d1ff869 (diff)
downloadhercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.gz
hercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.bz2
hercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.xz
hercules-ee1290403076d39d25def09753cf20c1dd157d09.zip
Replaced pc->get_group_level with a macro (pc_get_group_level)
Because 2 jumps to get a single value is just awful. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index b1c4d8d6b..bc150b6ee 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7991,7 +7991,7 @@ BUILDIN(getgmlevel)
if( sd == NULL )
return true;// no player attached, report source
- script_pushint(st, pc->get_group_level(sd));
+ script_pushint(st, pc_get_group_level(sd));
return true;
}
@@ -9485,11 +9485,11 @@ BUILDIN(getusersname)
sd = script->rid2sd(st);
if (!sd) return true;
- group_level = pc->get_group_level(sd);
+ group_level = pc_get_group_level(sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
- if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc->get_group_level(pl_sd) > group_level)
+ if (pc->has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level)
continue; // skip hidden sessions
/* Temporary fix for bugreport:1023.