summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-03 20:41:37 +0200
committerGitHub <noreply@github.com>2020-05-03 20:41:37 +0200
commit754ab3c4f1031ebe924477d20b51ed5b0e814fd4 (patch)
tree5d0ccbcda0dded754f3090225e2d55a7d2e17f3e
parentf40cc839413cc82aed445d39cc3aa204dce87780 (diff)
parentc4c55ca75a2f9f8390090e063f67b32c727416ed (diff)
downloadhercules-754ab3c4f1031ebe924477d20b51ed5b0e814fd4.tar.gz
hercules-754ab3c4f1031ebe924477d20b51ed5b0e814fd4.tar.bz2
hercules-754ab3c4f1031ebe924477d20b51ed5b0e814fd4.tar.xz
hercules-754ab3c4f1031ebe924477d20b51ed5b0e814fd4.zip
Merge pull request #2686 from Kenpachi2k13/unknown_sc_fix
Fix status changes falsely being recognized as unknown
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 51a32abd9..262d5e26d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -446,6 +446,9 @@ static bool mob_ksprotected(struct block_list *src, struct block_list *target)
if( !battle_config.ksprotection )
return false; // KS Protection Disabled
+ if (status->isdead(target) != 0)
+ return false; // Target is dead.
+
if( !(md = BL_CAST(BL_MOB,target)) )
return false; // Target is not MOB
diff --git a/src/map/skill.c b/src/map/skill.c
index 3dccf7a9e..cc769108e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11296,7 +11296,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill
FALLTHROUGH
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
if ( skill_id == WM_SEVERE_RAINSTORM )
- sc_start(src,src,SC_NO_SWITCH_EQUIP,100,0,skill->get_time(skill_id,skill_lv));
+ sc_start(src, src, type, 100, 0, skill->get_time(skill_id, skill_lv));
skill->unitsetting(src,skill_id,skill_lv,x,y,0);
break;
case WZ_ICEWALL:
diff --git a/src/map/status.c b/src/map/status.c
index d3e85e5be..d2d65ce37 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -696,6 +696,7 @@ static void initChangeTables(void)
status->set_sc( WM_BEYOND_OF_WARCRY , SC_BEYOND_OF_WARCRY , SCB_STR|SCB_CRI|SCB_MAXHP );
status->set_sc( WM_UNLIMITED_HUMMING_VOICE, SC_UNLIMITED_HUMMING_VOICE, SCB_NONE );
status->set_sc( WM_FRIGG_SONG , SC_FRIGG_SONG , SCB_MAXHP );
+ status->set_sc( WM_SEVERE_RAINSTORM , SC_NO_SWITCH_EQUIP , SCB_NONE );
/**
* Sorcerer
@@ -7808,6 +7809,9 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl
calc_flag = status->dbs->ChangeFlagTable[type];
if(!(flag&SCFLAG_LOADED)) { // Do not parse val settings when loading SCs
switch(type) {
+ case SC_AUTOTRADE:
+ case SC_KSPROTECTED:
+ break; // Prevent calling status_change_start_unknown_sc().
case SC_ADORAMUS:
sc_start(src,bl,SC_BLIND,100,val1,skill->get_time(status->sc2skill(type),val1));
// Fall through to SC_INC_AGI