db connection checks for player age and job exp (#43667)

This commit is contained in:
Jordie
2019-04-25 12:13:48 -04:00
committed by moo
parent cb489e2288
commit 37edab7b9a
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -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))
+2 -2
View File
@@ -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