summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-17 00:15:33 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-17 00:15:33 +0000
commit7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b (patch)
tree34fb42eb5bf938c6c02b56e26931c6b1937e4c89 /src/map/script.c
parent5a064d5a6723601d08610082ab6c203bc94cdab0 (diff)
downloadhercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.gz
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.bz2
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.tar.xz
hercules-7b2f7c0503cb5be8bc45f57353d838a4dbf84d7b.zip
Orn's and Albator's Homunculus system, finally, YAY!!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 338a987a1..dbcf96be9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -36,6 +36,7 @@
#include "mob.h"
#include "npc.h"
#include "pet.h"
+#include "mercenary.h" //[orn]
#include "intif.h"
#include "skill.h"
#include "chat.h"
@@ -441,6 +442,7 @@ int buildin_getvariableofnpc(struct script_state *st);
// [blackhole89] -->
int buildin_warpportal(struct script_state *st);
// <-- [blackhole89]
+int buildin_homunculus_evolution(struct script_state *st) ; //[orn]
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -785,6 +787,7 @@ struct {
// [blackhole89] -->
{buildin_warpportal,"warpportal","iisii"},
// <--- [blackhole89]
+ {buildin_homunculus_evolution,"homevolution",""}, //[orn]
{NULL,NULL,NULL},
};
@@ -6517,6 +6520,21 @@ int buildin_catchpet(struct script_state *st)
}
/*==========================================
+ * [orn]
+ *------------------------------------------
+ */
+int buildin_homunculus_evolution(struct script_state *st)
+{
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ if ( sd->hd && sd->hd->homunculusDB->evo_class && sd->homunculus.intimacy > 91000 ) {
+ return merc_hom_evolution(sd->hd) ;
+ }
+ clif_emotion(&sd->hd->bl, 4) ; //swt
+ return 0;
+}
+
+/*==========================================
*Œg‘Ñ—‘›z‰»‹@Žg—p
*------------------------------------------
*/
@@ -10388,7 +10406,7 @@ int buildin_rid2name(struct script_state *st){
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);
+ push_str(st->stack,C_CONSTSTR,((struct homun_data *)bl)->master->homunculus.name);
break;
default:
ShowError("buildin_rid2name: BL type unknown.\n");
@@ -10810,7 +10828,7 @@ int buildin_unittalk(struct script_state *st)
memcpy(message, ((TBL_NPC *)bl)->name, NAME_LENGTH);
break;
case BL_HOMUNCULUS:
- memcpy(message, ((TBL_HOMUNCULUS *)bl)->name, NAME_LENGTH);
+ memcpy(message, ((TBL_HOMUNCULUS *)bl)->master->homunculus.name, NAME_LENGTH);
break;
case BL_PET:
memcpy(message, ((TBL_PET *)bl)->name, NAME_LENGTH);