diff options
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/map/status.c b/src/map/status.c index 649cfa1ae..8a173f611 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2995,6 +2995,10 @@ int status_calc_pc_(struct map_session_data* sd, bool first) sd->subele[ELE_NEUTRAL] += skill; sd->subele[ELE_FIRE] += skill*4; } + if((skill=pc_checkskill(sd,NC_RESEARCHFE))>0) { + sd->subele[ELE_EARTH] += skill*10; + sd->subele[ELE_FIRE] += skill*10; + } if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ skill = skill*4; sd->right_weapon.addrace[RC_DRAGON]+=skill; @@ -3246,7 +3250,7 @@ int status_calc_npc_(struct npc_data *nd, bool first) { status->race = RC_DEMIHUMAN; status->size = nd->size; status->rhw.range = 1 + status->size; - status->mode = MD_CANMOVE|MD_CANATTACK; + status->mode = (MD_CANMOVE|MD_CANATTACK); status->speed = nd->speed; } @@ -3700,7 +3704,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) else status->def2 = status_calc_def2(bl, sc, b_status->def2 #ifdef RENEWAL - + (int)( ((float)status->vit/2 + (float)b_status->vit/2) + ((float)status->agi/5 + (float)b_status->agi/5) ) + + (int)( ((float)status->vit/2 - (float)b_status->vit/2) + ((float)status->agi/5 - (float)b_status->agi/5) ) #else + (status->vit - b_status->vit) #endif @@ -3725,7 +3729,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) else status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_) #ifdef RENEWAL - + (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 + (float)b_status->vit/5) ) + + (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 - (float)b_status->vit/5) ) #else + ((status->vit - b_status->vit)>>1) #endif @@ -4978,8 +4982,6 @@ static signed short status_calc_def2(struct block_list *bl, struct status_change def2 -= def2 * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100; if( sc->data[SC_ECHOSONG] ) def2 += def2 * sc->data[SC_ECHOSONG]->val2/100; - if( sc->data[SC_GT_REVITALIZE] && sc->data[SC_GT_REVITALIZE]->val4) - def2 += def2 * sc->data[SC_GT_REVITALIZE]->val4 / 100; if(sc->data[SC_ASH] && (bl->type==BL_MOB)){ if(status_get_race(bl)==RC_PLANT) def2 /= 2; @@ -5791,7 +5793,7 @@ struct status_data *status_get_status_data(struct block_list *bl) case BL_HOM: return &((TBL_HOM*)bl)->battle_status; case BL_MER: return &((TBL_MER*)bl)->battle_status; case BL_ELEM: return &((TBL_ELEM*)bl)->battle_status; - case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status); + case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status); default: return &dummy_status; } @@ -5807,7 +5809,7 @@ struct status_data *status_get_base_status(struct block_list *bl) case BL_HOM: return &((TBL_HOM*)bl)->base_status; case BL_MER: return &((TBL_MER*)bl)->base_status; case BL_ELEM: return &((TBL_ELEM*)bl)->base_status; - case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL); + case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL); default: return NULL; } @@ -5825,8 +5827,8 @@ defType status_get_def(struct block_list *bl) { unsigned short status_get_speed(struct block_list *bl) { - if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex] - return ((struct npc_data *)bl)->speed; + if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex] + return ((struct npc_data *)bl)->speed; return status_get_status_data(bl)->speed; } @@ -7587,7 +7589,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_JOINTBEAT: if( val2&BREAK_NECK ) - sc_start(bl,SC_BLEEDING,100,val1,skill_get_time2(status_sc2skill(type),val1)); + sc_start2(bl,SC_BLEEDING,100,val1,val3,skill_get_time2(status_sc2skill(type),val1)); break; case SC_BERSERK: @@ -9948,8 +9950,9 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) case SC_BLEEDING: if (--(sce->val4) >= 0) { int hp = rnd()%600 + 200; + struct block_list* src = map_id2bl(sce->val2); map_freeblock_lock(); - status_fix_damage(NULL, bl, sd||hp<status->hp?hp:status->hp-1, 1); + status_fix_damage(src, bl, sd||hp<status->hp?hp:status->hp-1, 1); if( sc->data[type] ) { if( status->hp == 1 ) { map_freeblock_unlock(); |