diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-07 23:15:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-10 23:06:09 +0300 |
commit | 30bb5f0fb8c45b518993527fad628754c2723581 (patch) | |
tree | ae7b0364ce80f7a479b3a10b6221b925f6e709ed /src | |
parent | 6d55379d57a9b9dea689ddf8e711e0cdfa0c9dbe (diff) | |
download | hercules-30bb5f0fb8c45b518993527fad628754c2723581.tar.gz hercules-30bb5f0fb8c45b518993527fad628754c2723581.tar.bz2 hercules-30bb5f0fb8c45b518993527fad628754c2723581.tar.xz hercules-30bb5f0fb8c45b518993527fad628754c2723581.zip |
Add script interface function run_pet. It do same thing as run.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pet.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 1 | ||||
-rw-r--r-- | src/map/script.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 2379ec984..b612a9505 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -367,7 +367,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) pd->state.skillbonus = 0; if( battle_config.pet_status_support ) - script->run(pet->db[i].pet_script,0,sd->bl.id,0); + script->run_pet(pet->db[i].pet_script,0,sd->bl.id,0); if( pd->petDB ) { if( pd->petDB->equip_script ) diff --git a/src/map/script.c b/src/map/script.c index ca776ead0..23c6af0f8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -20662,6 +20662,7 @@ void script_defaults(void) { script->label_add = script_label_add; script->run = run_script; script->run_npc = run_script; + script->run_pet = run_script; script->run_main = run_script_main; script->run_timer = run_script_timer; script->set_var = set_var; diff --git a/src/map/script.h b/src/map/script.h index f85ebfd79..b3d2a3c8a 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -639,6 +639,7 @@ struct script_interface { void (*label_add)(int key, int pos); void (*run) (struct script_code *rootscript, int pos, int rid, int oid); void (*run_npc) (struct script_code *rootscript, int pos, int rid, int oid); + void (*run_pet) (struct script_code *rootscript, int pos, int rid, int oid); void (*run_main) (struct script_state *st); int (*run_timer) (int tid, int64 tick, int id, intptr_t data); int (*set_var) (struct map_session_data *sd, char *name, void *val); |