summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorFlipp <mysteriousragnarok@hotmail.com>2013-05-17 15:18:51 -0700
committerFlipp <mysteriousragnarok@hotmail.com>2013-05-17 15:18:51 -0700
commitb3bc657a44a9fbdd1730f569855e25ccd0f8dd01 (patch)
treeba8dc9ee07be73d2cbb62e0a1f83d29d1fa6b7c8 /src/map/npc.c
parent4ef9258f0f618857ed5d9e2f9e07f33dc6d13559 (diff)
parent9afe7f28d0e3f4c9bc3abba22d8055ae7dc46f45 (diff)
downloadhercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.gz
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.bz2
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.tar.xz
hercules-b3bc657a44a9fbdd1730f569855e25ccd0f8dd01.zip
Merge pull request #26 from Earisu/master
HPM Update
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 913c13e0b..7d0d5c6e1 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -353,7 +353,7 @@ int npc_event_doall_sub(DBKey key, DBData *data, va_list ap)
const char* name;
int rid;
- nullpo_ret(ev = db_data2ptr(data));
+ nullpo_ret(ev = DB->data2ptr(data));
nullpo_ret(c = va_arg(ap, int *));
nullpo_ret(name = va_arg(ap, const char *));
rid = va_arg(ap, int);
@@ -381,7 +381,7 @@ static int npc_event_do_sub(DBKey key, DBData *data, va_list ap)
int* c;
const char* name;
- nullpo_ret(ev = db_data2ptr(data));
+ nullpo_ret(ev = DB->data2ptr(data));
nullpo_ret(c = va_arg(ap, int *));
nullpo_ret(name = va_arg(ap, const char *));
@@ -1785,7 +1785,7 @@ int npc_remove_map(struct npc_data* nd)
*/
static int npc_unload_ev(DBKey key, DBData *data, va_list ap)
{
- struct event_data* ev = db_data2ptr(data);
+ struct event_data* ev = DB->data2ptr(data);
char* npcname = va_arg(ap, char *);
if(strcmp(ev->nd->exname,npcname)==0){
@@ -2302,7 +2302,7 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
int npc_convertlabel_db(DBKey key, DBData *data, va_list ap)
{
const char* lname = (const char*)key.str;
- int lpos = db_data2i(data);
+ int lpos = DB->data2i(data);
struct npc_label_list** label_list;
int* label_list_num;
const char* filepath;
@@ -2972,9 +2972,9 @@ static const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, co
return end;
func_db = script_get_userfunc_db();
- if (func_db->put(func_db, db_str2key(w3), db_ptr2data(script), &old_data))
+ if (func_db->put(func_db, DB->str2key(w3), DB->ptr2data(script), &old_data))
{
- struct script_code *oldscript = (struct script_code*)db_data2ptr(&old_data);
+ struct script_code *oldscript = (struct script_code*)DB->data2ptr(&old_data);
ShowInfo("npc_parse_function: Overwriting user function [%s] (%s:%d)\n", w3, filepath, strline(buffer,start-buffer));
script_free_vars(oldscript->script_vars);
aFree(oldscript->script_buf);
@@ -3776,7 +3776,7 @@ void npc_read_event_script(void)
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) )
{
const char* p = key.str;
- struct event_data* ed = db_data2ptr(data);
+ struct event_data* ed = DB->data2ptr(data);
unsigned char count = script_event[i].event_count;
if( count >= ARRAYLENGTH(script_event[i].event) )