summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/sample/monster_controller.cpp6
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/script.c7
3 files changed, 14 insertions, 3 deletions
diff --git a/npc/sample/monster_controller.cpp b/npc/sample/monster_controller.cpp
index 479320f2f..2c1c4acf4 100644
--- a/npc/sample/monster_controller.cpp
+++ b/npc/sample/monster_controller.cpp
@@ -53,15 +53,15 @@ prontera.gat,180,200,4 script Monster Controller 123,{
break;
case AI_ACTION_TAR_TYPE_MOB:
set .@action_from$, "Monster";
- set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ set .@action_name$, rid2name(.ai_action[AI_ACTION_TAR]);
break;
case AI_ACTION_TAR_TYPE_PET:
set .@action_from$, "Pet";
- set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ set .@action_name$, rid2name(.ai_action[AI_ACTION_TAR]);
break;
case AI_ACTION_TAR_TYPE_HOMUN:
set .@action_from$, "Homunculus";
- set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ set .@action_name$, rid2name(.ai_action[AI_ACTION_TAR]);
break;
default:
set .@action_from$, "Unknown";
diff --git a/src/map/battle.c b/src/map/battle.c
index 9bbcce01e..bde86cbe5 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3440,6 +3440,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(((TBL_PET *)t_bl)->msd->bl.id == md->master_id)
state |= BCT_PARTY;
break;
+ case BL_HOMUNCULUS:
+ if(((struct homun_data *)t_bl)->master->bl.id == md->master_id)
+ state |= BCT_PARTY;
+ break;
}
state |= BCT_ENEMY;
break;
diff --git a/src/map/script.c b/src/map/script.c
index 04f5532cc..b726e6b2f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10306,8 +10306,15 @@ int buildin_rid2name(struct script_state *st){
case BL_NPC:
push_str(st->stack,C_CONSTSTR,((struct npc_data *)bl)->exname);
break;
+ case BL_PET:
+ push_str(st->stack,C_CONSTSTR,((struct pet_data *)bl)->name);
+ break;
+ case BL_HOMUNCULUS:
+ push_str(st->stack,C_CONSTSTR,((struct homun_data *)bl)->name);
+ break;
default:
ShowError("buildin_rid2name: BL type unknown.\n");
+ push_str(st->stack,C_CONSTSTR,"");
break;
}
}