Initialize native mode schema synchronously before reading it
Core tests / core (push) Successful in 2m7s
Core tests / core (push) Successful in 2m7s
This commit is contained in:
@@ -20,7 +20,9 @@ function player(guid,name,account,level,dead)
|
||||
players[name]=p; return p
|
||||
end
|
||||
function AuthDBQuery(sql)
|
||||
if string.find(sql,"azerothai_realm_rules",1,true) then return {GetUInt32=function()return mode or 1 end} end
|
||||
if string.find(sql,"CREATE TABLE IF NOT EXISTS azerothai_realm_rules",1,true) then rulesReady=true;return nil end
|
||||
if string.find(sql,"INSERT IGNORE INTO azerothai_realm_rules",1,true) then assert(rulesReady);return nil end
|
||||
if string.find(sql,"SELECT hardcore FROM azerothai_realm_rules",1,true) then assert(rulesReady,'Schema must exist before synchronous mode reads');return {GetUInt32=function()return mode or 1 end} end
|
||||
if string.find(sql,'SELECT id FROM account',1,true) then
|
||||
if string.find(sql,'id=99 ',1,true) then return nil end
|
||||
return {GetUInt32=function() return 2 end}
|
||||
|
||||
Reference in New Issue
Block a user