summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-25 21:26:54 +0200
committerHaru <haru@dotalux.com>2013-09-25 22:15:53 +0200
commitafcad494411995396b906f214d1c4ffcf485cc0a (patch)
treee70b21658276ddef885322b7c9b18935b6c0235e /src/map/mercenary.c
parent13afb7e0bf35bacc9c90c7dffe34120ddd2fd099 (diff)
downloadhercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.gz
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.bz2
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.xz
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.zip
Renamed local variables that would conflict with a rename of iStatus to status
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c65
1 files changed, 31 insertions, 34 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 0e89d62a9..402c477bf 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -397,11 +397,10 @@ int mercenary_checkskill(struct mercenary_data *md, uint16 skill_id)
return 0;
}
-static bool read_mercenarydb_sub(char* str[], int columns, int current)
-{
+static bool read_mercenarydb_sub(char* str[], int columns, int current) {
int ele;
struct s_mercenary_db *db;
- struct status_data *status;
+ struct status_data *mstatus;
db = &mercenary->db[current];
db->class_ = atoi(str[0]);
@@ -409,46 +408,44 @@ static bool read_mercenarydb_sub(char* str[], int columns, int current)
safestrncpy(db->name, str[2], NAME_LENGTH);
db->lv = atoi(str[3]);
- status = &db->status;
+ mstatus = &db->status;
db->vd.class_ = db->class_;
- status->max_hp = atoi(str[4]);
- status->max_sp = atoi(str[5]);
- status->rhw.range = atoi(str[6]);
- status->rhw.atk = atoi(str[7]);
- status->rhw.atk2 = status->rhw.atk + atoi(str[8]);
- status->def = atoi(str[9]);
- status->mdef = atoi(str[10]);
- status->str = atoi(str[11]);
- status->agi = atoi(str[12]);
- status->vit = atoi(str[13]);
- status->int_ = atoi(str[14]);
- status->dex = atoi(str[15]);
- status->luk = atoi(str[16]);
+ mstatus->max_hp = atoi(str[4]);
+ mstatus->max_sp = atoi(str[5]);
+ mstatus->rhw.range = atoi(str[6]);
+ mstatus->rhw.atk = atoi(str[7]);
+ mstatus->rhw.atk2 = mstatus->rhw.atk + atoi(str[8]);
+ mstatus->def = atoi(str[9]);
+ mstatus->mdef = atoi(str[10]);
+ mstatus->str = atoi(str[11]);
+ mstatus->agi = atoi(str[12]);
+ mstatus->vit = atoi(str[13]);
+ mstatus->int_ = atoi(str[14]);
+ mstatus->dex = atoi(str[15]);
+ mstatus->luk = atoi(str[16]);
db->range2 = atoi(str[17]);
db->range3 = atoi(str[18]);
- status->size = atoi(str[19]);
- status->race = atoi(str[20]);
+ mstatus->size = atoi(str[19]);
+ mstatus->race = atoi(str[20]);
ele = atoi(str[21]);
- status->def_ele = ele%10;
- status->ele_lv = ele/20;
- if( status->def_ele >= ELE_MAX )
- {
- ShowWarning("Mercenary %d has invalid element type %d (max element is %d)\n", db->class_, status->def_ele, ELE_MAX - 1);
- status->def_ele = ELE_NEUTRAL;
+ mstatus->def_ele = ele%10;
+ mstatus->ele_lv = ele/20;
+ if( mstatus->def_ele >= ELE_MAX ) {
+ ShowWarning("Mercenary %d has invalid element type %d (max element is %d)\n", db->class_, mstatus->def_ele, ELE_MAX - 1);
+ mstatus->def_ele = ELE_NEUTRAL;
}
- if( status->ele_lv < 1 || status->ele_lv > 4 )
- {
- ShowWarning("Mercenary %d has invalid element level %d (max is 4)\n", db->class_, status->ele_lv);
- status->ele_lv = 1;
+ if( mstatus->ele_lv < 1 || mstatus->ele_lv > 4 ) {
+ ShowWarning("Mercenary %d has invalid element level %d (max is 4)\n", db->class_, mstatus->ele_lv);
+ mstatus->ele_lv = 1;
}
- status->aspd_rate = 1000;
- status->speed = atoi(str[22]);
- status->adelay = atoi(str[23]);
- status->amotion = atoi(str[24]);
- status->dmotion = atoi(str[25]);
+ mstatus->aspd_rate = 1000;
+ mstatus->speed = atoi(str[22]);
+ mstatus->adelay = atoi(str[23]);
+ mstatus->amotion = atoi(str[24]);
+ mstatus->dmotion = atoi(str[25]);
return true;
}