summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-12-10 14:57:48 +0800
committerHaru <haru@dotalux.com>2015-12-13 16:04:45 +0100
commitf00431e91557205ae5373a8afb1b91c6b1350590 (patch)
treeed9af11ae55ec5971aa78b1553137d1e26f864b8 /src/map
parentd4737c7141d936133493a79bde34af944e3d0c7c (diff)
downloadhercules-f00431e91557205ae5373a8afb1b91c6b1350590.tar.gz
hercules-f00431e91557205ae5373a8afb1b91c6b1350590.tar.bz2
hercules-f00431e91557205ae5373a8afb1b91c6b1350590.tar.xz
hercules-f00431e91557205ae5373a8afb1b91c6b1350590.zip
ItemDB Updates:
- Added 'Malang Cat Can' item. - Added 'Ru Blue Spear' item. - Change the item id of 'RWC Silver Brooch' from 2998 to 2999. - Follow up https://github.com/HerculesWS/Hercules/commit/e511dcf5940cee7a6e43744543a5ca96bc23cf84, thanks to zackdreaver. - item_db.conf renewal minor clean-up xD
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/status.c3
-rw-r--r--src/map/status.h2
4 files changed, 9 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d9a3f6776..a6e2c7c21 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2351,7 +2351,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
// Increase drop rate if user has SC_CASH_RECEIVEITEM
if (sd && sd->sc.data[SC_CASH_RECEIVEITEM]) // now rig the drop rate to never be over 90% unless it is originally >90%.
- drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_CASH_RECEIVEITEM]->val1)/100.),0,9000));
+ drop_rate = max(drop_rate, cap_value((int)(0.5 + drop_rate * (sd->sc.data[SC_CASH_RECEIVEITEM]->val1) / 100.), 0, 9000));
+ if (sd && sd->sc.data[SC_OVERLAPEXPUP])
+ drop_rate = max(drop_rate, cap_value((int)(0.5 + drop_rate * (sd->sc.data[SC_OVERLAPEXPUP]->val2) / 100.), 0, 9000));
#ifdef RENEWAL_DROP
if( drop_modifier != 100 ) {
drop_rate = drop_rate * drop_modifier / 100;
diff --git a/src/map/pc.c b/src/map/pc.c
index 577123628..0313428ab 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6553,6 +6553,8 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in
if (sd->sc.data[SC_CASH_PLUSEXP])
bonus += sd->sc.data[SC_CASH_PLUSEXP]->val1;
+ if (sd->sc.data[SC_OVERLAPEXPUP])
+ bonus += sd->sc.data[SC_OVERLAPEXPUP]->val1;
*base_exp = (unsigned int) cap_value(*base_exp + (double)*base_exp * bonus/100., 1, UINT_MAX);
diff --git a/src/map/status.c b/src/map/status.c
index 699e7342b..da2892f98 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -830,6 +830,7 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_ATKER_ASPD] = SI_ATKER_ASPD;
status->dbs->IconChangeTable[SC_ATKER_MOVESPEED] = SI_ATKER_MOVESPEED;
status->dbs->IconChangeTable[SC_CUP_OF_BOZA] = SI_CUP_OF_BOZA;
+ status->dbs->IconChangeTable[SC_OVERLAPEXPUP] = SI_OVERLAPEXPUP;
// Eden Crystal Synthesis
status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1;
@@ -8524,6 +8525,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
break;
case SC_CASH_PLUSEXP:
case SC_CASH_PLUSONLYJOBEXP:
+ case SC_OVERLAPEXPUP:
if (val1 < 0)
val1 = 0;
break;
@@ -9374,6 +9376,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_CASH_PLUSONLYJOBEXP:
case SC_MONSTER_TRANSFORM:
case SC_CASH_RECEIVEITEM:
+ case SC_OVERLAPEXPUP:
val_flag |= 1;
break;
}
diff --git a/src/map/status.h b/src/map/status.h
index a7549a5e4..f2173d81c 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -773,9 +773,9 @@ typedef enum sc_type {
SC_ATKER_ASPD,
SC_ATKER_MOVESPEED,
-
SC_FOOD_CRITICALSUCCESSVALUE, // 610
SC_CUP_OF_BOZA,
+ SC_OVERLAPEXPUP,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;