/** * @see DBCreateData */ static DBData create_guildstorage(DBKey key, va_list args) { struct guild_storage *gs = NULL; gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1); gs->guild_id=key.i; return db_ptr2data(gs); }
/** * Sub function to create an online_login_data and save it to db. * @param key: Key of the database entry * @param ap: args * @return : Data identified by the key to be put in the database * @see DBCreateData */ DBData login_create_online_user(DBKey key, va_list args) { struct online_login_data* p; CREATE(p, struct online_login_data, 1); p->account_id = key.i; p->char_server = -1; p->waiting_disconnect = INVALID_TIMER; return db_ptr2data(p); }
/** * Create a guild_storage stucture and add it into the db * @see DBCreateData * @param key * @param args * @return */ static DBData create_guildstorage(DBKey key, va_list args) { struct s_storage *gs = NULL; gs = (struct s_storage *) aCalloc(sizeof(struct s_storage), 1); gs->type = TABLE_GUILD_STORAGE; gs->id = key.i; return db_ptr2data(gs); }