summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/script.c52
2 files changed, 28 insertions, 26 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 6b4ead64c..bad21b6fe 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/14
+ * Fixed buildin_getmobdata. It was trying to handle the first parameter as the
+ array to fill in. [blackhole89]
* Blocked again skill usage during marionette. [Skotlex]
* Fixed main.sql adding a key on char_id rather than account_id for the
char table. [Skotlex]
diff --git a/src/map/script.c b/src/map/script.c
index 05cc383c3..340daa228 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10606,33 +10606,33 @@ int buildin_getmobdata(struct script_state *st) {
return -1;
}
- num=st->stack->stack_data[st->start+2].u.num;
+ num=st->stack->stack_data[st->start+3].u.num;
name=(char *)(str_buf+str_data[num&0x00ffffff].str);
- setd_sub(st,sd,name,0,(void *)(int)md->class_,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,1,(void *)(int)md->level,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,2,(void *)(int)md->status.hp,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,3,(void *)(int)md->status.max_hp,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,4,(void *)(int)md->master_id,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,5,(void *)(int)md->bl.m,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,6,(void *)(int)md->bl.x,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,7,(void *)(int)md->bl.y,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,8,(void *)(int)md->status.speed,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,9,(void *)(int)md->status.mode,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,10,(void *)(int)md->special_state.ai,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,11,(void *)(int)md->sc.option,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,12,(void *)(int)md->vd->sex,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,13,(void *)(int)md->vd->class_,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,14,(void *)(int)md->vd->hair_style,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,15,(void *)(int)md->vd->hair_color,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,16,(void *)(int)md->vd->head_bottom,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,17,(void *)(int)md->vd->head_mid,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,18,(void *)(int)md->vd->head_top,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,19,(void *)(int)md->vd->cloth_color,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,20,(void *)(int)md->vd->shield,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,21,(void *)(int)md->vd->weapon,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,22,(void *)(int)md->vd->shield,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,23,(void *)(int)md->ud.dir,st->stack->stack_data[st->start+2].ref);
- setd_sub(st,sd,name,24,(void *)(int)md->state.killer,st->stack->stack_data[st->start+2].ref);
+ setd_sub(st,sd,name,0,(void *)(int)md->class_,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,1,(void *)(int)md->level,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,2,(void *)(int)md->status.hp,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,3,(void *)(int)md->status.max_hp,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,4,(void *)(int)md->master_id,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,5,(void *)(int)md->bl.m,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,6,(void *)(int)md->bl.x,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,7,(void *)(int)md->bl.y,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,8,(void *)(int)md->status.speed,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,9,(void *)(int)md->status.mode,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,10,(void *)(int)md->special_state.ai,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,11,(void *)(int)md->sc.option,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,12,(void *)(int)md->vd->sex,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,13,(void *)(int)md->vd->class_,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,14,(void *)(int)md->vd->hair_style,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,15,(void *)(int)md->vd->hair_color,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,16,(void *)(int)md->vd->head_bottom,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,17,(void *)(int)md->vd->head_mid,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,18,(void *)(int)md->vd->head_top,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,19,(void *)(int)md->vd->cloth_color,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,20,(void *)(int)md->vd->shield,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,21,(void *)(int)md->vd->weapon,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,22,(void *)(int)md->vd->shield,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,23,(void *)(int)md->ud.dir,st->stack->stack_data[st->start+3].ref);
+ setd_sub(st,sd,name,24,(void *)(int)md->state.killer,st->stack->stack_data[st->start+3].ref);
return 0;
}