* Add support for different gmlevel's for different realms.

*
* Using the value -1 will add the same value for all realms.
* Make sure to apply the updates.
* Information regarding this patch will be posted on the database forums soon.
*
* Thanks to Sundark and the Ilixiuemu team(for original patch)

--HG--
branch : trunk
This commit is contained in:
p0wer
2009-12-21 21:08:29 -06:00
parent cad203e680
commit 7590479186
14 changed files with 158 additions and 41 deletions
+2 -1
View File
@@ -95,6 +95,7 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accid)
bool res =
loginDatabase.PExecute("DELETE FROM account WHERE id='%d'", accid) &&
loginDatabase.PExecute("DELETE FROM account_access WHERE id ='%d'", accid) &&
loginDatabase.PExecute("DELETE FROM realmcharacters WHERE acctid='%d'", accid);
loginDatabase.CommitTransaction();
@@ -167,7 +168,7 @@ uint32 AccountMgr::GetId(std::string username)
uint32 AccountMgr::GetSecurity(uint32 acc_id)
{
QueryResult *result = loginDatabase.PQuery("SELECT gmlevel FROM account WHERE id = '%u'", acc_id);
QueryResult *result = loginDatabase.PQuery("SELECT gmlevel FROM account_access WHERE id = '%u'", acc_id);
if(result)
{
uint32 sec = (*result)[0].GetUInt32();