diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-31 18:37:00 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-31 18:37:00 +0000 |
commit | 690ef2ae18deedd44bf4670eaf751c3888cb5a37 (patch) | |
tree | b062e4bbb763f3a1cec82ed85e84ceb8550f256d /src/map/mercenary.c | |
parent | f1f46c5b4ba04d590ff2ffbf28d84c3888ff3399 (diff) | |
download | hercules-690ef2ae18deedd44bf4670eaf751c3888cb5a37.tar.gz hercules-690ef2ae18deedd44bf4670eaf751c3888cb5a37.tar.bz2 hercules-690ef2ae18deedd44bf4670eaf751c3888cb5a37.tar.xz hercules-690ef2ae18deedd44bf4670eaf751c3888cb5a37.zip |
* More mercenary updates.
- Implemented Mercenary Die, Damage, Run Away when master dies.
- Log mercenary damage and gives exp to Master.
- Some little bugs.
* Fixed Bubble Gums effect works on mvp_sd not sd (according to Doddler).
NOTE: Now you can summon a mercenary, make it attack (not skills), follow you even on map change.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13158 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r-- | src/map/mercenary.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c index dc49f5e21..740b8d85e 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -132,10 +132,10 @@ int merc_delete(struct mercenary_data *md, int reply) merc_contract_stop(md); if( !sd ) - return unit_free(&md->bl, 1); + return unit_free(&md->bl, 0); clif_mercenary_message(sd->fd, reply); - return unit_remove_map(&md->bl, 1); + return unit_remove_map(&md->bl, 0); } void merc_contract_stop(struct mercenary_data *md) @@ -213,6 +213,17 @@ int merc_data_received(struct s_mercenary *merc, bool flag) return 1; } +void mercenary_damage(struct mercenary_data *md, struct block_list *src, int hp, int sp) +{ + clif_mercenary_updatestatus(md->master, SP_HP); +} + +int mercenary_dead(struct mercenary_data *md, struct block_list *src) +{ + merc_delete(md, 1); + return 0; +} + int read_mercenarydb(void) { FILE *fp; @@ -292,6 +303,7 @@ int read_mercenarydb(void) status->ele_lv = 1; } + status->aspd_rate = 1000; status->speed = atoi(str[22]); status->adelay = atoi(str[23]); status->amotion = atoi(str[24]); |