diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-02 04:52:55 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-02 16:51:04 +0200 |
commit | 8194350f0bad88086edf0e7a001b9f41df904099 (patch) | |
tree | 4c3739f21a6ace41db9090bf1632a35d4f59e08b | |
parent | 776755bd02919ea4a5101671c0d86534a2ce8674 (diff) | |
download | hercules-8194350f0bad88086edf0e7a001b9f41df904099.tar.gz hercules-8194350f0bad88086edf0e7a001b9f41df904099.tar.bz2 hercules-8194350f0bad88086edf0e7a001b9f41df904099.tar.xz hercules-8194350f0bad88086edf0e7a001b9f41df904099.zip |
Implement SC_RESIST_PROPERTY_WATER logic
-rw-r--r-- | src/map/status.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c index c502086cf..4f2ebe3db 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -865,6 +865,7 @@ static void initChangeTables(void) status->dbs->ChangeFlagTable[SC_WEDDING] |= SCB_SPEED; status->dbs->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_RESIST_PROPERTY_WATER] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED; status->dbs->ChangeFlagTable[SC_TARGET_BLOOD] |= SCB_ALL; @@ -3029,6 +3030,10 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o sd->subele[ELE_FIRE] += sc->data[SC_ARMOR_RESIST]->val3; sd->subele[ELE_WIND] += sc->data[SC_ARMOR_RESIST]->val4; } + if (sc->data[SC_RESIST_PROPERTY_WATER] != NULL) { // Coldproof Potion + sd->subele[ELE_WATER] += sc->data[SC_RESIST_PROPERTY_WATER]->val1; + sd->subele[ELE_WIND] += sc->data[SC_RESIST_PROPERTY_WATER]->val2; + } if (sc->data[SC_FIRE_CLOAK_OPTION]) { i = sc->data[SC_FIRE_CLOAK_OPTION]->val2; sd->subele[ELE_FIRE] += i; @@ -7753,6 +7758,7 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl case SC_ENCHANTARMS: case SC_ARMORPROPERTY: case SC_ARMOR_RESIST: + case SC_RESIST_PROPERTY_WATER: break; case SC_GOSPEL: //Must not override a casting gospel char. @@ -8725,6 +8731,11 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl } break; + case SC_RESIST_PROPERTY_WATER: + if (val1 <= 0) + flag |= SCFLAG_NOICON; + + break; case SC_MER_FLEE: case SC_MER_ATK: case SC_MER_HIT: |