summaryrefslogtreecommitdiff
path: root/src/map/elemental.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-14 21:30:32 +0100
committerHaru <haru@dotalux.com>2015-12-28 18:36:00 +0100
commit7ac8f603c647790aee85106e97fc9f7672e4d436 (patch)
tree93d3b846d7dcf30df6429cc170e0a3959c6ee9bc /src/map/elemental.c
parent5db7c13c4a37bc688a464d369beab0bc31984bd5 (diff)
downloadhercules-7ac8f603c647790aee85106e97fc9f7672e4d436.tar.gz
hercules-7ac8f603c647790aee85106e97fc9f7672e4d436.tar.bz2
hercules-7ac8f603c647790aee85106e97fc9f7672e4d436.tar.xz
hercules-7ac8f603c647790aee85106e97fc9f7672e4d436.zip
Added elemental_id enum, replaced numeric elemental IDs with enum members
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/elemental.c')
-rw-r--r--src/map/elemental.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 36dee32ba..a6fe94ab2 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -121,28 +121,32 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
//per individual bonuses
switch(db->class_){
- case 2114:
- case 2115:
- case 2116: //ATK + (Summon Agni Skill Level x 20) / HIT + (Summon Agni Skill Level x 10)
+ case ELEID_EL_AGNI_S:
+ case ELEID_EL_AGNI_M:
+ case ELEID_EL_AGNI_L:
+ //ATK + (Summon Agni Skill Level x 20) / HIT + (Summon Agni Skill Level x 10)
ele.atk += summon_level * 20;
ele.atk2 += summon_level * 20;
ele.hit += summon_level * 10;
break;
- case 2117:
- case 2118:
- case 2119: //MDEF + (Summon Aqua Skill Level x 10) / MATK + (Summon Aqua Skill Level x 20)
+ case ELEID_EL_AQUA_S:
+ case ELEID_EL_AQUA_M:
+ case ELEID_EL_AQUA_L:
+ //MDEF + (Summon Aqua Skill Level x 10) / MATK + (Summon Aqua Skill Level x 20)
ele.mdef += summon_level * 10;
ele.matk += summon_level * 20;
break;
- case 2120:
- case 2121:
- case 2122: //FLEE + (Summon Ventus Skill Level x 20) / MATK + (Summon Ventus Skill Level x 10)
+ case ELEID_EL_VENTUS_S:
+ case ELEID_EL_VENTUS_M:
+ case ELEID_EL_VENTUS_L:
+ //FLEE + (Summon Ventus Skill Level x 20) / MATK + (Summon Ventus Skill Level x 10)
ele.flee += summon_level * 20;
ele.matk += summon_level * 10;
break;
- case 2123:
- case 2124:
- case 2125: //DEF + (Summon Tera Skill Level x 25) / ATK + (Summon Tera Skill Level x 5)
+ case ELEID_EL_TERA_S:
+ case ELEID_EL_TERA_M:
+ case ELEID_EL_TERA_L:
+ //DEF + (Summon Tera Skill Level x 25) / ATK + (Summon Tera Skill Level x 5)
ele.def += summon_level * 25;
ele.atk += summon_level * 5;
ele.atk2 += summon_level * 5;
@@ -687,17 +691,17 @@ int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *s
if( DIFF_TICK(tick,ed->last_spdrain_time) >= 10000 ){// Drain SP every 10 seconds
int sp = 5;
- switch(ed->vd->class_){
- case 2115:
- case 2118:
- case 2121:
- case 2124:
+ switch (ed->vd->class_) {
+ case ELEID_EL_AGNI_M:
+ case ELEID_EL_AQUA_M:
+ case ELEID_EL_VENTUS_M:
+ case ELEID_EL_TERA_M:
sp = 8;
break;
- case 2116:
- case 2119:
- case 2122:
- case 2125:
+ case ELEID_EL_AGNI_L:
+ case ELEID_EL_AQUA_L:
+ case ELEID_EL_VENTUS_L:
+ case ELEID_EL_TERA_L:
sp = 11;
break;
}