mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
db connection checks for player age and job exp (#43667)
This commit is contained in:
@@ -8,6 +8,8 @@ GLOBAL_PROTECT(exp_to_update)
|
||||
return 0
|
||||
if(!CONFIG_GET(flag/use_exp_tracking))
|
||||
return 0
|
||||
if(!SSdbcore.Connect())
|
||||
return 0
|
||||
if(!exp_requirements || !exp_type)
|
||||
return 0
|
||||
if(!job_is_xp_locked(src.title))
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
return 0
|
||||
if(!CONFIG_GET(flag/use_age_restriction_for_jobs))
|
||||
return 0
|
||||
if(!isnum(C.player_age))
|
||||
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
|
||||
if(!SSdbcore.Connect())
|
||||
return 0 //Without a database connection we can't get a player's age so we'll assume they're old enough for all jobs
|
||||
if(!isnum(minimal_player_age))
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user