summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 09:57:26 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 09:57:26 +0000
commit3b06b9a0e53e331621775afa0b6fe04ced300e51 (patch)
tree563ceace38b9803132e9ea9ddc1a4a99612eee32
parentffcebec91192484588b2a5853782d026e5370f0c (diff)
downloadhercules-3b06b9a0e53e331621775afa0b6fe04ced300e51.tar.gz
hercules-3b06b9a0e53e331621775afa0b6fe04ced300e51.tar.bz2
hercules-3b06b9a0e53e331621775afa0b6fe04ced300e51.tar.xz
hercules-3b06b9a0e53e331621775afa0b6fe04ced300e51.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6771 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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;
}
}