From 248f245f078ddba531cf771dcd42ad9e0bd0f7c7 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 15:27:20 +0800 Subject: Item Update: - Added official effect for Rapid Life Water. - Added new items: - Fruit Salad (http://www.divine-pride.net/database/item/11715) - Shepherd Salad (http://www.divine-pride.net/database/item/11716) - Yogurt (http://www.divine-pride.net/database/item/11717) - Bisket Dessert (http://www.divine-pride.net/database/item/11718) --- src/map/skill.c | 2 +- src/map/status.c | 20 ++++++++++++++------ src/map/status.h | 2 ++ 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index f82cdee71..f870524fa 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7623,7 +7623,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // Slim Pitcher case CR_SLIMPITCHER: // Updated to block Slim Pitcher from working on barricades and guardian stones. - if( dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARDIAN_STONE2)) ) + if (dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARDIAN_STONE2))) break; if (script->potion_hp || script->potion_sp) { int hp = script->potion_hp, sp = script->potion_sp; diff --git a/src/map/status.c b/src/map/status.c index 108f3d72d..5c2d1d2f5 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -859,6 +859,8 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_INT_SCROLL] = SI_INT_SCROLL; status->dbs->IconChangeTable[SC_STEAMPACK] = SI_STEAMPACK; status->dbs->IconChangeTable[SC_MAGIC_CANDY] = SI_MAGIC_CANDY; + status->dbs->IconChangeTable[SC_M_LIFEPOTION] = SI_M_LIFEPOTION; + status->dbs->IconChangeTable[SC_G_LIFEPOTION] = SI_G_LIFEPOTION; // Eden Crystal Synthesis status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1; @@ -7751,6 +7753,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t break; case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: case SC_CASH_BOSS_ALARM: case SC_STUN: case SC_SLEEP: @@ -8135,12 +8139,14 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t break; case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: - if( val1 == 0 ) return 0; + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: + if (val1 == 0) return 0; // val1 = heal percent/amout // val2 = seconds between heals // val4 = total of heals - if( val2 < 1 ) val2 = 1; - if( (val4 = tick/(val2 * 1000)) < 1 ) + if (val2 < 1) val2 = 1; + if ((val4 = tick / (val2 * 1000)) < 1) val4 = 1; tick_time = val2 * 1000; // [GodLesZ] tick time break; @@ -10982,10 +10988,12 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: - if( sd && --(sce->val4) >= 0 ) { + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: + if (sd && --(sce->val4) >= 0) { // val1 < 0 = per max% | val1 > 0 = exact amount int hp = 0; - if( st->hp < st->max_hp ) + if (st->hp < st->max_hp) hp = (sce->val1 < 0) ? (int)(sd->status.max_hp * -1 * sce->val1 / 100.) : sce->val1 ; status->heal(bl, hp, 0, 2); sc_timer_next((sce->val2 * 1000) + tick, status->change_timer, bl->id, data); @@ -11600,7 +11608,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { break; case SC_MAGIC_CANDY: if (--(sce->val4) > 0) { - status->charge(bl, 0, sce->val3); // Reduce 100 SP every 10 seconds. + status->charge(bl, 0, sce->val3); // Reduce 90 SP every 10 seconds. sc_timer_next(10000 + tick, status->change_timer, bl->id, data); } break; diff --git a/src/map/status.h b/src/map/status.h index dfc914849..b5597dd45 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -822,6 +822,8 @@ typedef enum sc_type { SC_PROMOTE_HEALTH_RESERCH, SC_ENERGY_DRINK_RESERCH, SC_MAGIC_CANDY, + SC_M_LIFEPOTION, + SC_G_LIFEPOTION, // 640 SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-70-g09d2