summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 1aed80716..c15369d7e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -278,7 +278,7 @@ void initChangeTables(void) {
add_sc(NPC_STOP, SC_STOP);
set_sc(NPC_BREAKWEAPON, SC_BROKENWEAPON, SI_BROKENWEAPON, SCB_NONE);
set_sc(NPC_BREAKARMOR, SC_BROKENARMOR, SI_BROKENARMOR, SCB_NONE);
- add_sc(NPC_CHANGEUNDEAD, SC_ELEMENTALCHANGE);
+ set_sc(NPC_CHANGEUNDEAD, SC_CHANGEUNDEAD, SI_UNDEAD, SCB_DEF_ELE);
set_sc(NPC_POWERUP, SC_INCDEXRATE, SI_BLANK, SCB_DEX);
set_sc(NPC_AGIUP, SC_INCFLEERATE, SI_BLANK, SCB_AGI);
add_sc(NPC_INVISIBLE, SC_CLOAKING);
@@ -421,7 +421,6 @@ void initChangeTables(void) {
//This seems wrong as it sets the same icon to all skills that change your
//element, but alas, all of them are mob-target only with the exception of
//NPC_CHANGEUNDEAD, so this should be alright. [Skotlex]
- StatusIconChangeTable[SC_ELEMENTALCHANGE] = SI_UNDEAD;
StatusIconChangeTable[SC_STRFOOD] = SI_FOODSTR;
StatusIconChangeTable[SC_AGIFOOD] = SI_FOODAGI;
StatusIconChangeTable[SC_VITFOOD] = SI_FOODVIT;
@@ -3871,6 +3870,8 @@ static unsigned char status_calc_element(struct block_list *bl, struct status_ch
return ELE_EARTH;
if( sc->data[SC_BENEDICTIO].timer!=-1 )
return ELE_HOLY;
+ if( sc->data[SC_CHANGEUNDEAD].timer!=-1)
+ return sc->data[SC_CHANGEUNDEAD].val3;
if( sc->data[SC_ELEMENTALCHANGE].timer!=-1)
return sc->data[SC_ELEMENTALCHANGE].val3;
return cap_value(element,0,UCHAR_MAX);
@@ -3886,6 +3887,8 @@ static unsigned char status_calc_element_lv(struct block_list *bl, struct status
return 1;
if( sc->data[SC_BENEDICTIO].timer!=-1 )
return 1;
+ if( sc->data[SC_CHANGEUNDEAD].timer!=-1)
+ return 1;
if(sc->data[SC_ELEMENTALCHANGE].timer!=-1)
return sc->data[SC_ELEMENTALCHANGE].val4;
return cap_value(lv,1,4);
@@ -4563,6 +4566,10 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (status->def_ele == ELE_DARK && !(flag&1))
return 0;
break;
+ case SC_CHANGEUNDEAD: //Undead/Dark are inmune to it.
+ if ((status->def_ele == ELE_DARK || undead_flag) && !(flag&1))
+ return 0;
+ break;
case SC_COMA:
//Dark elementals and Demons are inmune to coma.
if((status->def_ele == ELE_DARK || status->race == RC_DEMON) && !(flag&1))