summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-18 13:09:08 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-18 13:09:08 +0000
commitaef1f6939ed8f235ba91afbcc69cdfcc5571988b (patch)
tree9bd790f4aac51ab08c4023d1b484eb94610351b9 /src
parentb6404c70b6ae803d87e6ec6857515e3b927fe2dd (diff)
downloadhercules-aef1f6939ed8f235ba91afbcc69cdfcc5571988b.tar.gz
hercules-aef1f6939ed8f235ba91afbcc69cdfcc5571988b.tar.bz2
hercules-aef1f6939ed8f235ba91afbcc69cdfcc5571988b.tar.xz
hercules-aef1f6939ed8f235ba91afbcc69cdfcc5571988b.zip
Reverted r16439 that cause bugreport:6182 again and proper fix for bugreport:6261.
Fixed bugreport:6240 WM_VOICEOFSIREN should now effect all target except caster. Fixed bugreport:6264 where repeated entry in the 'produce_db.txt' are not process properly. Added a proper message for casting restricted skills in a certain map flag same with official servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16442 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c42
-rw-r--r--src/map/status.c9
2 files changed, 30 insertions, 21 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 969c8c007..3c99dc74a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -496,16 +496,14 @@ int skillnotok (int skillid, struct map_session_data *sd)
if( sd->skillitem == skillid )
return 0;
// Check skill restrictions [Celest]
- if(!map_flag_vs(m) && skill_get_nocast (skillid) & 1)
- return 1;
- if(map[m].flag.pvp && skill_get_nocast (skillid) & 2)
- return 1;
- if(map_flag_gvg(m) && skill_get_nocast (skillid) & 4)
- return 1;
- if(map[m].flag.battleground && skill_get_nocast (skillid) & 8)
- return 1;
- if(map[m].flag.restricted && map[m].zone && skill_get_nocast (skillid) & (8*map[m].zone))
- return 1;
+ if( (!map_flag_vs(m) && skill_get_nocast (skillid) & 1) ||
+ (map[m].flag.pvp && skill_get_nocast (skillid) & 2) ||
+ (map_flag_gvg(m) && skill_get_nocast (skillid) & 4) ||
+ (map[m].flag.battleground && skill_get_nocast (skillid) & 8) ||
+ (map[m].flag.restricted && map[m].zone && skill_get_nocast (skillid) & (8*map[m].zone)) ){
+ clif_msgtable(sd->fd,0x536); // This skill cannot be used within this area
+ return 1;
+ }
if( sd->sc.option&OPTION_MOUNTING )
return 1;//You can't use skills while in the new mounts (The client doesn't let you, this is to make cheat-safe)
@@ -8196,8 +8194,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case WM_SIRCLEOFNATURE:
- flag |= BCT_PARTY|BCT_SELF;
+ flag |= BCT_SELF|BCT_PARTY|BCT_GUILD;
case WM_VOICEOFSIREN:
+ if( skillid != WM_SIRCLEOFNATURE )
+ flag &= ~BCT_SELF;
if( flag&1 ) {
sc_start2(bl,type,(skillid==WM_VOICEOFSIREN)?20+10*skilllv:100,skilllv,(skillid==WM_VOICEOFSIREN)?src->id:0,skill_get_time(skillid,skilllv));
} else {
@@ -9065,6 +9065,16 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data)
if( !sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv) )
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
+ if( sd && skill_get_cooldown(ud->skillid,ud->skilllv) > 0 ){
+ int i, cooldown = skill_get_cooldown(ud->skillid, ud->skilllv);
+ for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses.
+ if (sd->skillcooldown[i].id == ud->skillid){
+ cooldown += sd->skillcooldown[i].val;
+ break;
+ }
+ }
+ skill_blockpc_start(sd, ud->skillid, cooldown);
+ }
if( battle_config.display_status_timers && sd )
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv), 0, 0, 0);
// if( sd )
@@ -9607,7 +9617,6 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
}
skill_addtimerskill(src,gettick() + (150 * i),0,sx,sy,skillid,skilllv,dir,flag&2);
}
- if(sd) skill_blockpc_start(sd, skillid, skill_get_cooldown(skillid, skilllv));
}
break;
/**
@@ -15050,8 +15059,12 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
return 0;
for(i=0;i<MAX_SKILL_PRODUCE_DB;i++){
- if(skill_produce_db[i].nameid == nameid )
+ if(skill_produce_db[i].nameid == nameid ){
+ if((j=skill_produce_db[i].req_skill)>0 &&
+ pc_checkskill(sd,j) < skill_produce_db[i].req_skill_lv)
+ continue; // must iterate again to check other skills that produce it. [malufett]
break;
+ }
}
if( i >= MAX_SKILL_PRODUCE_DB )
return 0;
@@ -15073,9 +15086,6 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
return 0;
}
}
- if((j=skill_produce_db[i].req_skill)>0 &&
- pc_checkskill(sd,j) < skill_produce_db[i].req_skill_lv)
- return 0;
for(j=0;j<MAX_PRODUCE_RESOURCE;j++){
int id,x,y;
diff --git a/src/map/status.c b/src/map/status.c
index e2a61f393..2ea6fffd0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -641,8 +641,8 @@ void initChangeTables(void) {
set_sc( MI_ECHOSONG , SC_ECHOSONG , SI_ECHOSONG , SCB_DEF2 );
set_sc( MI_HARMONIZE , SC_HARMONIZE , SI_HARMONIZE , SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK );
set_sc_with_vfx( WM_POEMOFNETHERWORLD , SC_NETHERWORLD , SI_NETHERWORLD , SCB_NONE );
- set_sc( WM_VOICEOFSIREN , SC_VOICEOFSIREN , SI_VOICEOFSIREN , SCB_NONE );
- set_sc( WM_LULLABY_DEEPSLEEP , SC_DEEPSLEEP , SI_DEEPSLEEP , SCB_NONE );
+ set_sc_with_vfx( WM_VOICEOFSIREN , SC_VOICEOFSIREN , SI_VOICEOFSIREN , SCB_NONE );
+ set_sc_with_vfx( WM_LULLABY_DEEPSLEEP , SC_DEEPSLEEP , SI_DEEPSLEEP , SCB_NONE );
set_sc( WM_SIRCLEOFNATURE , SC_SIRCLEOFNATURE , SI_SIRCLEOFNATURE , SCB_NONE );
set_sc( WM_GLOOMYDAY , SC_GLOOMYDAY , SI_GLOOMYDAY , SCB_FLEE|SCB_ASPD );
set_sc( WM_SONG_OF_MANA , SC_SONGOFMANA , SI_SONGOFMANA , SCB_NONE );
@@ -1679,9 +1679,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (pc_isinvisible(sd))
return 0;
if (tsc->option&hide_flag && !is_boss &&
- (sd->special_state.perfect_hiding || !is_detect) )
- return 0;
- if( tsc->data[SC_CLOAKINGEXCEED] && !(is_boss) && (status->mode&(RC_INSECT|RC_DEMON)) ) // Cloaking Exceed => undetected from insect & demon except bosses
+ ((sd->special_state.perfect_hiding || !is_detect) ||
+ (tsc->data[SC_CLOAKINGEXCEED] && is_detect)))
return 0;
if( tsc->data[SC_CAMOUFLAGE] && !(is_boss || is_detect) && !skill_num )
return 0;