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:
@@ -2,8 +2,9 @@
|
||||
-- from its factory-created, unused starting-level reserve; identities are never reset.
|
||||
-- Install only after deploy/playable/install-lifecycle.py has seeded the registry.
|
||||
-- The persisted mode is synchronized from dashboard settings by operations-agent.
|
||||
AuthDBExecute("CREATE TABLE IF NOT EXISTS azerothai_realm_rules (id TINYINT PRIMARY KEY,hardcore TINYINT NOT NULL)")
|
||||
AuthDBExecute("INSERT IGNORE INTO azerothai_realm_rules VALUES (1,1)")
|
||||
-- Schema setup must finish before the first synchronous mode read.
|
||||
AuthDBQuery("CREATE TABLE IF NOT EXISTS azerothai_realm_rules (id TINYINT PRIMARY KEY,hardcore TINYINT NOT NULL)")
|
||||
AuthDBQuery("INSERT IGNORE INTO azerothai_realm_rules VALUES (1,1)")
|
||||
function AzerothAIHardcoreEnabled()
|
||||
local q=AuthDBQuery("SELECT hardcore FROM azerothai_realm_rules WHERE id=1")
|
||||
return not q or q:GetUInt32(0)~=0
|
||||
|
||||
Reference in New Issue
Block a user