summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorSusu <susu-@live.fr>2013-05-17 11:10:30 +0200
committerSusu <susu-@live.fr>2013-05-17 11:10:30 +0200
commit25e848f1a0f9317d63106cae048a1ef838411cb2 (patch)
tree0c1dc751af9f06e1ce3729d271de301f78a4e611 /src/char/char.c
parent3820bd7e7715bc84f458cf1bf466e6377a2d2e46 (diff)
downloadhercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.gz
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.bz2
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.xz
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.zip
- Made DB and malloc lib HPM-friendly
- Also fixed a bug preventing the plugins to be loeaded because HPMI and HPMI_s weren't HPExport
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 6e0f5363e..00fc633df 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -187,7 +187,7 @@ static DBData create_online_char_data(DBKey key, va_list args)
character->pincode_enable = -1;
character->fd = -1;
character->waiting_disconnect = INVALID_TIMER;
- return db_ptr2data(character);
+ return DB->ptr2data(character);
}
void set_char_charselect(int account_id)
@@ -321,7 +321,7 @@ void set_char_offline(int char_id, int account_id)
*/
static int char_db_setoffline(DBKey key, DBData *data, va_list ap)
{
- struct online_char_data* character = (struct online_char_data*)db_data2ptr(data);
+ struct online_char_data* character = (struct online_char_data*)DB->data2ptr(data);
int server = va_arg(ap, int);
if (server == -1) {
character->char_id = -1;
@@ -340,7 +340,7 @@ static int char_db_setoffline(DBKey key, DBData *data, va_list ap)
*/
static int char_db_kickoffline(DBKey key, DBData *data, va_list ap)
{
- struct online_char_data* character = (struct online_char_data*)db_data2ptr(data);
+ struct online_char_data* character = (struct online_char_data*)DB->data2ptr(data);
int server_id = va_arg(ap, int);
if (server_id > -1 && character->server != server_id)
@@ -392,7 +392,7 @@ static DBData create_charstatus(DBKey key, va_list args)
struct mmo_charstatus *cp;
cp = (struct mmo_charstatus *) aCalloc(1,sizeof(struct mmo_charstatus));
cp->char_id = key.i;
- return db_ptr2data(cp);
+ return DB->ptr2data(cp);
}
int inventory_to_sql(const struct item items[], int max, int id);
@@ -4450,7 +4450,7 @@ int broadcast_user_count(int tid, unsigned int tick, int id, intptr_t data)
*/
static int send_accounts_tologin_sub(DBKey key, DBData *data, va_list ap)
{
- struct online_char_data* character = db_data2ptr(data);
+ struct online_char_data* character = DB->data2ptr(data);
int* i = va_arg(ap, int*);
if(character->server > -1)
@@ -4532,7 +4532,7 @@ static int chardb_waiting_disconnect(int tid, unsigned int tick, int id, intptr_
*/
static int online_data_cleanup_sub(DBKey key, DBData *data, va_list ap)
{
- struct online_char_data *character= db_data2ptr(data);
+ struct online_char_data *character= DB->data2ptr(data);
if (character->fd != -1)
return 0; //Character still connected
if (character->server == -2) //Unknown server.. set them offline