|
@@ -283,7 +283,7 @@ static bool account_db_txt_create(AccountDB* self, struct mmo_account* acc)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
// check if the account_id is free
|
|
// check if the account_id is free
|
|
- tmp = idb_get(accounts, account_id);
|
|
|
|
|
|
+ tmp = (struct mmo_account*)idb_get(accounts, account_id);
|
|
if( tmp != NULL )
|
|
if( tmp != NULL )
|
|
{// error condition - entry already present
|
|
{// error condition - entry already present
|
|
ShowError("account_db_txt_create: cannot create account %d:'%s', this id is already occupied by %d:'%s'!\n", account_id, acc->userid, account_id, tmp->userid);
|
|
ShowError("account_db_txt_create: cannot create account %d:'%s', this id is already occupied by %d:'%s'!\n", account_id, acc->userid, account_id, tmp->userid);
|
|
@@ -316,7 +316,7 @@ static bool account_db_txt_remove(AccountDB* self, const int account_id)
|
|
DBMap* accounts = db->accounts;
|
|
DBMap* accounts = db->accounts;
|
|
|
|
|
|
//TODO: find out if this really works
|
|
//TODO: find out if this really works
|
|
- struct mmo_account* tmp = idb_remove(accounts, account_id);
|
|
|
|
|
|
+ struct mmo_account* tmp = (struct mmo_account*)idb_remove(accounts, account_id);
|
|
if( tmp == NULL )
|
|
if( tmp == NULL )
|
|
{// error condition - entry not present
|
|
{// error condition - entry not present
|
|
ShowError("account_db_txt_remove: no such account with id %d\n", account_id);
|
|
ShowError("account_db_txt_remove: no such account with id %d\n", account_id);
|
|
@@ -337,7 +337,7 @@ static bool account_db_txt_save(AccountDB* self, const struct mmo_account* acc)
|
|
int account_id = acc->account_id;
|
|
int account_id = acc->account_id;
|
|
|
|
|
|
// retrieve previous data
|
|
// retrieve previous data
|
|
- struct mmo_acount* tmp = idb_get(accounts, account_id);
|
|
|
|
|
|
+ struct mmo_account* tmp = (struct mmo_account*)idb_get(accounts, account_id);
|
|
if( tmp == NULL )
|
|
if( tmp == NULL )
|
|
{// error condition - entry not found
|
|
{// error condition - entry not found
|
|
return false;
|
|
return false;
|
|
@@ -360,7 +360,7 @@ static bool account_db_txt_load_num(AccountDB* self, struct mmo_account* acc, co
|
|
DBMap* accounts = db->accounts;
|
|
DBMap* accounts = db->accounts;
|
|
|
|
|
|
// retrieve data
|
|
// retrieve data
|
|
- struct mmo_account* tmp = idb_get(accounts, account_id);
|
|
|
|
|
|
+ struct mmo_account* tmp = (struct mmo_account*)idb_get(accounts, account_id);
|
|
if( tmp == NULL )
|
|
if( tmp == NULL )
|
|
{// entry not found
|
|
{// entry not found
|
|
return false;
|
|
return false;
|