summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 15:04:11 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 15:04:11 +0000
commit78748079288acbd6e5fc7513baa70cf5b0a9a330 (patch)
treed2aada8ab9d3f91fbfd8f4453b527d5a1f1c13d9 /src/map/mob.c
parent802127420bf94a1f88696eb74feaf8917fa350cf (diff)
downloadhercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.gz
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.bz2
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.xz
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.zip
- NPC_POWERUP now gives +40% atk per level.
- Water elementals can be frozen again. - Fixed the sc_def equation in status_change_start - Fixed an extra semi-colon that broke win32 compiles. - Some rewriting of bounds checks in @baselvup, @joblvup and the # equivalents to prevent signed/unsigned comparisons. - Now slaves give exp/loot (exception: player slaves still stick to the old rules) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5267 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 5e0d807c7..7400bbc77 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2208,7 +2208,6 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
int mvp_damage,max_hp;
unsigned int tick = gettick();
struct map_session_data *mvp_sd = NULL, *second_sd = NULL,*third_sd = NULL;
- struct block_list *master = NULL;
double temp;
struct item item;
int ret, mode;
@@ -2490,12 +2489,9 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
per /=2.;
else if(md->special_state.size==2)
per *=2.;
- if(md->master_id) {
- if(((master = map_id2bl(md->master_id)) && status_get_mode(master)&MD_BOSS) || // check if its master is a boss (MVP's and minibosses)
- md->special_state.ai) { // for summoned creatures [Valaris]
- per = 0;
- }
- } else {
+ if(md->master_id && md->special_state.ai) //New rule: Only player-summoned mobs do not give exp. [Skotlex]
+ per = 0;
+ else {
if(battle_config.zeny_from_mobs) {
if(md->level > 0) zeny=(int) ((md->level+rand()%md->level)*per); // zeny calculation moblv + random moblv [Valaris]
if(md->db->mexp > 0)
@@ -2581,11 +2577,10 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
for (i = 0; i < 10; i++) { // 8 -> 10 Lupus
struct delay_item_drop *ditem;
- if ((master && status_get_mode(master) & MD_BOSS) || // check if its master is a boss (MVP's and minibosses)
- (md->special_state.ai &&
- (battle_config.alchemist_summon_reward == 0 || //Noone gives items
- (md->class_ != 1142 && battle_config.alchemist_summon_reward == 1) //Non Marine spheres don't drop items
- ))) // Added [Valaris]
+ if (md->master_id && md->special_state.ai && (
+ battle_config.alchemist_summon_reward == 0 || //Noone gives items
+ (md->class_ != 1142 && battle_config.alchemist_summon_reward == 1) //Non Marine spheres don't drop items
+ ))
break; // End
//mapflag: noloot check [Lorky]
if (map[md->bl.m].flag.nomobloot) break;;