|
@@ -18326,6 +18326,10 @@ BUILDIN_FUNC(setunitdata)
|
|
|
case UMOB_ADELAY: md->base_status->adelay = (short)value; calc_status = true; break;
|
|
|
case UMOB_DMOTION: md->base_status->dmotion = (short)value; calc_status = true; break;
|
|
|
case UMOB_TARGETID: {
|
|
|
+ if (value==0) {
|
|
|
+ mob_unlocktarget(md,gettick());
|
|
|
+ break;
|
|
|
+ }
|
|
|
struct block_list* target = map_id2bl(value);
|
|
|
if (!target) {
|
|
|
ShowWarning("buildin_setunitdata: Error in finding target for BL_MOB!\n");
|
|
@@ -18391,6 +18395,10 @@ BUILDIN_FUNC(setunitdata)
|
|
|
case UHOM_ADELAY: hd->base_status.adelay = (short)value; calc_status = true; break;
|
|
|
case UHOM_DMOTION: hd->base_status.dmotion = (short)value; calc_status = true; break;
|
|
|
case UHOM_TARGETID: {
|
|
|
+ if (value==0) {
|
|
|
+ unit_stop_attack(&hd->bl);
|
|
|
+ break;
|
|
|
+ }
|
|
|
struct block_list* target = map_id2bl(value);
|
|
|
if (!target) {
|
|
|
ShowWarning("buildin_setunitdata: Error in finding target for BL_HOM!\n");
|
|
@@ -18501,6 +18509,10 @@ BUILDIN_FUNC(setunitdata)
|
|
|
case UMER_ADELAY: mc->base_status.adelay = (short)value; calc_status = true; break;
|
|
|
case UMER_DMOTION: mc->base_status.dmotion = (short)value; calc_status = true; break;
|
|
|
case UMER_TARGETID: {
|
|
|
+ if (value==0) {
|
|
|
+ unit_stop_attack(&mc->bl);
|
|
|
+ break;
|
|
|
+ }
|
|
|
struct block_list* target = map_id2bl(value);
|
|
|
if (!target) {
|
|
|
ShowWarning("buildin_setunitdata: Error in finding target for BL_MER!\n");
|
|
@@ -18563,6 +18575,10 @@ BUILDIN_FUNC(setunitdata)
|
|
|
case UELE_ADELAY: ed->base_status.adelay = (short)value; calc_status = true; break;
|
|
|
case UELE_DMOTION: ed->base_status.dmotion = (short)value; calc_status = true; break;
|
|
|
case UELE_TARGETID: {
|
|
|
+ if (value==0) {
|
|
|
+ unit_stop_attack(&ed->bl);
|
|
|
+ break;
|
|
|
+ }
|
|
|
struct block_list* target = map_id2bl(value);
|
|
|
if (!target) {
|
|
|
ShowWarning("buildin_setunitdata: Error in finding target for BL_ELEM!\n");
|