* Added the code for Field Manual (SC_BONUSEXP) and Bubble Gum (SC_BONUSDROP)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11351 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
383f017009
commit
63519ee3cf
@ -754,6 +754,8 @@ SC_JAILED 249
|
||||
SC_ENCHANTARMS 250
|
||||
SC_MAGICALATTACK 251
|
||||
SC_SUMMER 256
|
||||
SC_BONUSEXP 257
|
||||
SC_BONUSDROP 258
|
||||
|
||||
e_gasp 0
|
||||
e_what 1
|
||||
|
@ -2017,6 +2017,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
||||
if (sd && battle_config.pk_mode &&
|
||||
(int)(md->level - sd->status.base_level) >= 20)
|
||||
drop_rate = (int)(drop_rate*1.25); // pk_mode increase drops if 20 level difference [Valaris]
|
||||
if (sd && sd->sc.data[SC_BONUSDROP].timer != -1)
|
||||
drop_rate += (int)(0.5+drop_rate*sd->sc.data[SC_BONUSDROP].val1/100.);
|
||||
|
||||
// attempt to drop the item
|
||||
if (rand() % 10000 >= drop_rate)
|
||||
|
@ -4197,6 +4197,9 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi
|
||||
(int)(status_get_lv(src) - sd->status.base_level) >= 20)
|
||||
bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris]
|
||||
|
||||
if (sd->sc.data[SC_BONUSEXP].timer != -1)
|
||||
bonus += sd->sc.data[SC_BONUSEXP].val1;
|
||||
|
||||
if (!bonus)
|
||||
return;
|
||||
|
||||
|
@ -4825,6 +4825,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
||||
case SC_CARTBOOST: case SC_MELTDOWN: case SC_SAFETYWALL:
|
||||
case SC_SMA: case SC_SPEEDUP0: case SC_NOCHAT:
|
||||
case SC_ANKLE: case SC_SPIDERWEB: case SC_JAILED:
|
||||
case SC_BONUSDROP: case SC_BONUSEXP: // [ConvexMirror and FieldGuide]
|
||||
continue;
|
||||
}
|
||||
if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
|
||||
@ -5586,8 +5587,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
||||
for(i = 0; i < g->max_member; i++, j++) {
|
||||
if (j>8) j=0;
|
||||
if ((dstsd = g->member[i].sd) != NULL && sd != dstsd) {
|
||||
if (map[dstsd->bl.m].flag.nowarp && !map_flag_gvg(dstsd->bl.m))
|
||||
continue;
|
||||
if (map[dstsd->bl.m].flag.nowarp && !map_flag_gvg(dstsd->bl.m))
|
||||
continue;
|
||||
if(map_getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH))
|
||||
dx[j] = dy[j] = 0;
|
||||
pc_setpos(dstsd, map[src->m].index, src->x+dx[j], src->y+dy[j], 2);
|
||||
|
@ -5804,6 +5804,18 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
|
||||
//Place here SCs that have no SCB_* data, no skill associated, no ICON
|
||||
//associated, and yet are not wrong/unknown. [Skotlex]
|
||||
break;
|
||||
case SC_BONUSDROP:
|
||||
clif_specialeffect(&sd->bl, 348, AREA);
|
||||
clif_disp_onlyself(sd, "[Drop Rate Increased]", (int)strlen("[Drop Rate Increased]"));
|
||||
if (val1 < 0)
|
||||
val1 = 0;
|
||||
break;
|
||||
case SC_BONUSEXP:
|
||||
clif_specialeffect(&sd->bl, 348, AREA);
|
||||
clif_disp_onlyself(sd, "[Exp Rate Increased]", (int)strlen("[Exp Rate Increased]"));
|
||||
if (val1 < 0)
|
||||
val1 = 0;
|
||||
break;
|
||||
default:
|
||||
if (calc_flag == SCB_NONE &&
|
||||
StatusSkillChangeTable[type]==0 &&
|
||||
@ -6395,6 +6407,14 @@ int status_change_end( struct block_list* bl , int type,int tid )
|
||||
case SC_JOINTBEAT:
|
||||
sc->data[type].val2 = 0; // Clear stackable ailments
|
||||
break;
|
||||
case SC_BONUSEXP:
|
||||
clif_disp_onlyself(sd, "[Exp Rate Back to Normal]", (int)strlen("[Exp Rate Back to Normal]"));
|
||||
clif_specialeffect(&sd->bl, 488, AREA);
|
||||
break;
|
||||
case SC_BONUSDROP:
|
||||
clif_disp_onlyself(sd, "[Drop Rate Back to Normal]", (int)strlen("[Drop Rate Back to Normal]"));
|
||||
clif_specialeffect(&sd->bl, 488, AREA);
|
||||
break;
|
||||
}
|
||||
|
||||
opt_flag = 1;
|
||||
|
@ -270,6 +270,8 @@ enum {
|
||||
SC_MAGICMIRROR,
|
||||
SC_SLOWCAST,
|
||||
SC_SUMMER, // [Zephyrus Summer]
|
||||
SC_BONUSEXP, // [Field Guide]
|
||||
SC_BONUSDROP, // [Bubble Gum]
|
||||
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
|
||||
};
|
||||
int SkillStatusChangeTable(int skill);
|
||||
|
Loading…
x
Reference in New Issue
Block a user