summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 18:25:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 18:25:55 +0000
commit58a012ef888ec1b80c714636f64648ba1e272b18 (patch)
tree7dce484979c085663e40850d70a845094abe04cd /src/map/battle.c
parent08d47edb4cd49b4c4fa77085257127c8e2cee74a (diff)
downloadhercules-58a012ef888ec1b80c714636f64648ba1e272b18.tar.gz
hercules-58a012ef888ec1b80c714636f64648ba1e272b18.tar.bz2
hercules-58a012ef888ec1b80c714636f64648ba1e272b18.tar.xz
hercules-58a012ef888ec1b80c714636f64648ba1e272b18.zip
- Updated attr_fix_table reading code to account for ELE_MAX (will correctly read bigger elemental tables if ELE_MAX is changed)
- Aggressive mobs will now use battle_check_range rather than mob_can_reach to decide whether to lock-on or not to a target within sight-range. - Added warnings in mob_readdb when the mob's element is invalid. - Updated the corresponding entries in map.h to use ELE_MAX - Added error messages in pc_bonus* functions when an invalid element is passed to the relevant bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6856 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 52aee5c69..4ae6ea545 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -27,7 +27,7 @@
#define is_boss(bl) status_get_mexp(bl) // Can refine later [Aru]
-int attr_fix_table[4][10][10];
+int attr_fix_table[4][ELE_MAX][ELE_MAX];
struct Battle_Config battle_config;
static struct eri *delay_damage_ers; //For battle delay damage structures.
@@ -189,39 +189,6 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
def_lv < 1 || def_lv > 4) {
if (battle_config.error_log)
ShowError("battle_attr_fix: unknown attr type: atk=%d def_type=%d def_lv=%d\n",atk_elem,def_type,def_lv);
- //TODO: Remove this debug case once the cause is resolved. [Skotlex]
- if (src) switch (src->type) {
- case BL_MOB:
- ShowDebug("src: Mob %s-%d\n", ((struct mob_data*)src)->name, ((struct mob_data*)src)->class_);
- break;
- case BL_PC:
- ShowDebug("src: Player %s-%d\n", ((struct map_session_data*)src)->status.name, ((struct map_session_data*)src)->bl.id);
- break;
- case BL_PET:
- ShowDebug("src: Pet %s-%d\n", ((struct pet_data*)src)->name, ((struct pet_data*)src)->bl.id);
- break;
- case BL_SKILL:
- ShowDebug("src: Ground Skill id: %d\n", ((struct skill_unit*)src)->group->skill_id);
- break;
- default:
- ShowDebug("unknown source type %d.\n", src->type);
- }
- if (target) switch (target->type) {
- case BL_MOB:
- ShowDebug("target: Mob %s-%d\n", ((struct mob_data*)target)->name, ((struct mob_data*)target)->class_);
- break;
- case BL_PC:
- ShowDebug("target: Player %s-%d\n", ((struct map_session_data*)target)->status.name, ((struct map_session_data*)target)->bl.id);
- break;
- case BL_PET:
- ShowDebug("target: Pet %s-%d\n", ((struct pet_data*)target)->name, ((struct pet_data*)target)->bl.id);
- break;
- case BL_SKILL:
- ShowDebug("target: Ground Skill id: %d\n", ((struct skill_unit*)target)->group->skill_id);
- break;
- default:
- ShowDebug("unknown target type %d.\n", target->type);
- }
return damage;
}