diff options
author | Haru <haru@dotalux.com> | 2015-12-14 19:03:48 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-28 18:35:58 +0100 |
commit | 943daa9da6610bd900aee9134951561e8e663a93 (patch) | |
tree | f3d20df4bb9d4cab8225ef59378b10e116ba6b47 /src/map/battle.c | |
parent | 296e6c04a4c1a01a233c937bd198a31fa849f49c (diff) | |
download | hercules-943daa9da6610bd900aee9134951561e8e663a93.tar.gz hercules-943daa9da6610bd900aee9134951561e8e663a93.tar.bz2 hercules-943daa9da6610bd900aee9134951561e8e663a93.tar.xz hercules-943daa9da6610bd900aee9134951561e8e663a93.zip |
Standardized (source) mob_id enum
- MOBID_ constant names now follow the Mob DB spritenames.
- The following names were changed:
* MOBID_EMPERIUM => MOBID_EMPELIUM
* MOBID_TREAS01 => MOBID_TREASURE_BOX1
* MOBID_TREAS40 => MOBID_TREASURE_BOX40
* MOBID_BARRICADE1 => MOBID_BARRICADE
* MOBID_BARRICADE2 => MOBID_BARRICADE_
* MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1
* MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2
* MOBID_FOOD_STOR => MOBID_OBJ_A
* MOBID_BLUE_CRYST => MOBID_OBJ_A2
* MOBID_PINK_CRYST => MOBID_OBJ_B2
* MOBID_TREAS41 => MOBID_TREASURE_BOX41
* MOBID_TREAS49 => MOBID_TREASURE_BOX49
- Added several missing items
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index a040d443b..69d24b299 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3336,7 +3336,7 @@ int64 battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int64 if (bl->type == BL_MOB) { struct mob_data* md = BL_CAST(BL_MOB, bl); - if (flag&BF_SKILL && (md->class_ == MOBID_BLUE_CRYSTAL || md->class_ == MOBID_PINK_CRYSTAL)) + if (flag&BF_SKILL && (md->class_ == MOBID_OBJ_A2 || md->class_ == MOBID_OBJ_B2)) return 0; // Crystal cannot receive skill damage on battlegrounds } @@ -3357,7 +3357,7 @@ int64 battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int64 nullpo_retr(damage, bl); if(md && md->guardian_data) { - if(class_ == MOBID_EMPERIUM && flag&BF_SKILL) { + if (class_ == MOBID_EMPELIUM && flag&BF_SKILL) { //Skill immunity. switch (skill_id) { #ifndef RENEWAL @@ -3373,7 +3373,7 @@ int64 battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int64 if(src->type != BL_MOB) { struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild->search(status->get_guild_id(src)); - if (class_ == MOBID_EMPERIUM && (!g || guild->checkskill(g,GD_APPROVAL) <= 0 )) + if (class_ == MOBID_EMPELIUM && (!g || guild->checkskill(g,GD_APPROVAL) <= 0)) return 0; if (g && battle_config.guild_max_castles && guild->checkcastles(g)>=battle_config.guild_max_castles) @@ -5434,7 +5434,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage if( flag.lh && (flag.hit || wd.damage2 > 0) ) wd.damage2 = wd.div_; - if( flag.hit && class_ == MOBID_EMPERIUM ) { + if (flag.hit && class_ == MOBID_EMPELIUM) { if(wd.damage2 > 0) { wd.damage2 = battle->attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv); wd.damage2 = battle->calc_gvg_damage(src,target,wd.damage2,wd.div_,skill_id,skill_lv,wd.flag); @@ -5964,7 +5964,7 @@ int battle_damage_area(struct block_list *bl, va_list ap) { amotion=va_arg(ap,int); dmotion=va_arg(ap,int); damage=va_arg(ap,int); - if( bl->type == BL_MOB && ((TBL_MOB*)bl)->class_ == MOBID_EMPERIUM ) + if (bl->type == BL_MOB && ((TBL_MOB*)bl)->class_ == MOBID_EMPELIUM) return 0; if( bl != src && battle->check_target(src,bl,BCT_ENEMY) > 0 ) { nullpo_ret(src); @@ -6613,7 +6613,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f } break; case BL_MER: - if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM && flag&BCT_ENEMY) + if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPELIUM && flag&BCT_ENEMY) return 0; //mercenary may not attack Emperium break; } //end switch actual src @@ -6635,7 +6635,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return 0; } } - if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) + if (map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPELIUM) return 0; //If you don't belong to a guild, can't target emperium. if( t_bl->type != BL_PC ) state |= BCT_ENEMY; //Natural enemy. |