diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-02 14:27:17 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-02 14:27:17 +0000 |
commit | f49effe3403a77b3fb69078465a2906836547041 (patch) | |
tree | 7073c6a028721f9edae7ecd126344a3440f007d5 /src/map/skill.c | |
parent | 9575f26807e2e508af9108d3c69c0e332a7f61cc (diff) | |
download | hercules-f49effe3403a77b3fb69078465a2906836547041.tar.gz hercules-f49effe3403a77b3fb69078465a2906836547041.tar.bz2 hercules-f49effe3403a77b3fb69078465a2906836547041.tar.xz hercules-f49effe3403a77b3fb69078465a2906836547041.zip |
- Updated battle_check_target so that all alchemist summoned mobs can be target by everyone.
- Cleaned up skill_check_condition_mob_master_sub, it will now count both total number of summoned mobs and amount that belong to the same type.
- Corrected AM_CANNIBALIZE so it will fail if you already have plants of another type out.
- Using NPC_SELFDESTRUCTION no longer will make the caster stop walking.
- Removed SI_GUILDAURA, and replaced it with SI_LANDENDOW, now Volcano/Deluge/V. Gale will get that funky icon instead.
- Changed clif_hominfo to receive both sd and hd as parameters
- Some redundancy cleaning in mercenary.c
- Moved updating of sd->mercenary.hp from merc_damage to pc_makesavestatus.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8048 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 678461ae0..605a02006 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5520,7 +5520,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in { if (sd->hd && ( sd->hd->battle_status.hp >= (sd->hd->battle_status.max_hp * 80 / 100 ) ) ) { sd->homunculus.vaporize = 1; - clif_hominfo(sd, 0); + clif_hominfo(sd, sd->hd, 0); merc_hom_delete(sd->hd, 0) ; } clif_skill_fail(sd,skillid,0,0); @@ -7751,19 +7751,23 @@ int skill_check_pc_partner (struct map_session_data *sd, int skill_id, int* skil static int skill_check_condition_mob_master_sub (struct block_list *bl, va_list ap) { - int *c,src_id=0,mob_class=0; + int *c,src_id,mob_class,skill; struct mob_data *md; - nullpo_retr(0, bl); - nullpo_retr(0, ap); - nullpo_retr(0, md=(struct mob_data*)bl); - nullpo_retr(0, src_id=va_arg(ap,int)); - nullpo_retr(0, mob_class=va_arg(ap,int)); - nullpo_retr(0, c=va_arg(ap,int *)); + md=(struct mob_data*)bl; + src_id=va_arg(ap,int); + mob_class=va_arg(ap,int); + skill=va_arg(ap,int); + c=va_arg(ap,int *); + + if(md->master_id != src_id || + md->special_state.ai != (skill == AM_SPHEREMINE?2:3)) + return 0; //Non alchemist summoned mobs have nothing to do here. - if(md->class_==mob_class && md->master_id==src_id) + if(md->class_==mob_class) (*c)++; - return 0; + + return 1; } static int skill_check_condition_hermod_sub(struct block_list *bl,va_list ap) @@ -8142,8 +8146,9 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t int maxcount = (skill==AM_CANNIBALIZE)? 6-lv : skill_get_maxcount(skill); int mob_class = (skill==AM_CANNIBALIZE)? summons[lv-1] :1142; if(battle_config.land_skill_limit && maxcount>0 && (battle_config.land_skill_limit&BL_PC)) { - map_foreachinmap(skill_check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class,&c ); - if(c >= maxcount){ + i = map_foreachinmap(skill_check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill, &c); + if(c >= maxcount || (skill==AM_CANNIBALIZE && c != i)) + { //Fails when: exceed max limit. There are other plant types already out. clif_skill_fail(sd,skill,0,0); return 0; } |