summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-07 23:45:49 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-07 23:45:49 +0000
commita1b41fc31ea08bd869e609bb41dd8ba011dcbb66 (patch)
tree1998a7d08771a1e22163727db9b6018186f1b0fb /src
parent5fd92c094561f989546694d6a80a4adf1609eca2 (diff)
downloadhercules-a1b41fc31ea08bd869e609bb41dd8ba011dcbb66.tar.gz
hercules-a1b41fc31ea08bd869e609bb41dd8ba011dcbb66.tar.bz2
hercules-a1b41fc31ea08bd869e609bb41dd8ba011dcbb66.tar.xz
hercules-a1b41fc31ea08bd869e609bb41dd8ba011dcbb66.zip
Merged database changes from trunk r14927.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14927 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/pc.c8
3 files changed, 11 insertions, 5 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 36496280e..fe86574bd 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -393,7 +393,7 @@ enum _sp {
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 2031-2033
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
- SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE //2041-2044
+ SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM //2041-2045
};
enum _look {
diff --git a/src/map/mob.c b/src/map/mob.c
index 5fb440b4f..9b83440dd 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2259,8 +2259,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
int itemid = 0;
for (i = 0; i < ARRAYLENGTH(sd->add_drop) && (sd->add_drop[i].id || sd->add_drop[i].group); i++)
{
- if (sd->add_drop[i].race & (1<<status->race) ||
- sd->add_drop[i].race & 1<<(status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS))
+ if ( ( sd->add_drop[i].race <= (1<<status->race) &&
+ sd->add_drop[i].race & (1<<status->race) ||
+ sd->add_drop[i].race & 1<<(status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS) ) ||
+ ( sd->add_drop[i].race > (1<<RC_MAX) && sd->add_drop[i].race == md->class_) )
{
//check if the bonus item drop rate should be multiplied with mob level/10 [Lupus]
if(sd->add_drop[i].rate < 0) {
diff --git a/src/map/pc.c b/src/map/pc.c
index a9d798ade..5e454415c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1607,8 +1607,8 @@ static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id
}
for(i = 0; i < max && (drop[i].id || drop[i].group); i++) {
if(
- (id && drop[i].id == id) ||
- (group && drop[i].group == group)
+ ((id && drop[i].id == id) ||
+ (group && drop[i].group == group)) && race < (1<<RC_MAX)
) {
drop[i].race |= race;
if(drop[i].rate > 0 && rate > 0)
@@ -2853,6 +2853,10 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
if(sd->state.lr_flag != 2)
pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, 1<<type3, val);
break;
+ case SP_ADD_CLASS_DROP_ITEM:
+ if(sd->state.lr_flag != 2)
+ pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, type3, val);
+ break;
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
{