diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-31 16:40:37 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-31 16:40:37 +0000 |
commit | c23aea66ad78acff3914f7b865eeba3adb159b0d (patch) | |
tree | f3eafde9cd91e643336bf6d1bff7cbae27872858 /src/map/skill.c | |
parent | 693613de2eda402fe459809cbe7ea22cbd052218 (diff) | |
download | hercules-c23aea66ad78acff3914f7b865eeba3adb159b0d.tar.gz hercules-c23aea66ad78acff3914f7b865eeba3adb159b0d.tar.bz2 hercules-c23aea66ad78acff3914f7b865eeba3adb159b0d.tar.xz hercules-c23aea66ad78acff3914f7b865eeba3adb159b0d.zip |
- Moved the intimacy penalty of HFLI_SBR44 and HVAN_EXPLOSION to skill_counter_additional_effect
- Simplified skillnotok_hom by using an invocation to skillnotok
- Hopefully fixed BD_ADAPTATION
- Homun won't lose any intimacy on death now.
- Homun will be saved together with the master now (as long as the homun is active)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8564 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 9d5f360f2..0fd01aac1 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -928,10 +928,6 @@ int skillnotok_hom (int skillid, struct homun_data *hd) { int i = skillid; nullpo_retr (1, hd); - //if (sd == 0) - //return 0; - //return 1; - // I think it was meant to be "no skills allowed when not a valid sd" if (skillid >= GD_SKILLRANGEMIN && skillid <= GD_SKILLRANGEMAX) return 1; @@ -947,23 +943,8 @@ int skillnotok_hom (int skillid, struct homun_data *hd) if (hd->blockskill[i] > 0) return 1; - // Check skill restrictions [Celest] - if(!map_flag_vs(hd->bl.m) && skill_get_nocast (skillid) & 1) - return 1; - if(map[hd->bl.m].flag.pvp) { - if(!battle_config.pk_mode && skill_get_nocast (skillid) & 2) - return 1; - if(battle_config.pk_mode && skill_get_nocast (skillid) & 16) - return 1; - } - if(map_flag_gvg(hd->bl.m) && skill_get_nocast (skillid) & 4) - return 1; - if(agit_flag && skill_get_nocast (skillid) & 8) - return 1; - if(map[hd->bl.m].flag.restricted && map[hd->bl.m].zone && skill_get_nocast (skillid) & (8*map[hd->bl.m].zone)) - return 1; - - return (map[hd->bl.m].flag.noskill); + //Use master's criteria. + return skillnotok(skillid, hd->master); } struct skill_unit_layout skill_unit_layout[MAX_SKILL_UNIT_LAYOUT]; @@ -1526,6 +1507,16 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * case GS_FULLBUSTER: status_change_start(src,SC_BLIND,200*skilllv,skilllv,0,0,0,skill_get_time2(skillid,skilllv),10); break; + case HFLI_SBR44: //[orn] + case HVAN_EXPLOSION: + if(src->type == BL_HOM){ + TBL_HOM *hd = (TBL_HOM*)src; + if (hd->master) { + hd->master->homunculus.intimacy = 200; + clif_send_homdata(hd->master,0x100,hd->master->homunculus.intimacy/100); + } + } + break; } if(sd && skillid && attack_type&BF_MAGIC && status_isdead(bl) && @@ -2421,10 +2412,10 @@ static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv, } } + if (!type) //States are only checked on begin casting. switch(state) { case ST_MOVE_ENABLE: - //Check only on begin casting. [Skotlex] - if(!type && !unit_can_move(&hd->bl)) { + if(!unit_can_move(&hd->bl)) { clif_skill_fail(sd,skill,0,0); return 0; } @@ -4050,10 +4041,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case HVAN_EXPLOSION: //[orn] - if(hd){ - hd->master->homunculus.intimacy = 200; - clif_send_homdata(hd->master,0x100,hd->master->homunculus.intimacy/100); - } case NPC_SELFDESTRUCTION: //Self Destruction hits everyone in range (allies+enemies) //Except for Summoned Marine spheres on non-versus maps, where it's just enemy. @@ -8120,7 +8107,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t } group=(struct skill_unit_group*)sc->data[SC_DANCING].val2; time = 1000*(sc->data[SC_DANCING].val3>>16); - if (!group || (skill_get_time(sc->data[SC_DANCING].val1,group->skill_lv) - time <= skill_get_time2(skill,lv))) + if (!group || + (skill_get_time(group->skill_id,group->skill_lv) - time <= skill_get_time2(skill,lv))) { clif_skill_fail(sd,skill,0,0); return 0; |