summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-30 16:00:24 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-30 16:00:24 +0000
commite81fad940ac591a6a76ecd0aa0b1d26cff688705 (patch)
tree03e7cad0b1bd243837b40cd5045957806291b992 /src/map/mercenary.c
parenta31cce3c60cc170db0d4a8ff707626e8777b0801 (diff)
downloadhercules-e81fad940ac591a6a76ecd0aa0b1d26cff688705.tar.gz
hercules-e81fad940ac591a6a76ecd0aa0b1d26cff688705.tar.bz2
hercules-e81fad940ac591a6a76ecd0aa0b1d26cff688705.tar.xz
hercules-e81fad940ac591a6a76ecd0aa0b1d26cff688705.zip
-Harmonize skillid, skill_num, skillnum, skill, to skill_id and same for skill_lv
-Optimise type from int to int16 in order to reduce ram consumtion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17065 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 832cc835b..973dac33e 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -384,7 +384,7 @@ int mercenary_kills(struct mercenary_data *md)
return 0;
}
-int mercenary_checkskill(struct mercenary_data *md, int skill_id)
+int mercenary_checkskill(struct mercenary_data *md, uint16 skill_id)
{
int i = skill_id - MC_SKILLBASE;
@@ -464,7 +464,7 @@ static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
{// <merc id>,<skill id>,<skill level>
struct s_mercenary_db *db;
int i, class_;
- int skillid, skilllv;
+ uint16 skill_id, skill_lv;
class_ = atoi(str[0]);
ARR_FIND(0, MAX_MERCENARY_CLASS, i, class_ == mercenary_db[i].class_);
@@ -474,19 +474,19 @@ static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
return false;
}
- skillid = atoi(str[1]);
- if( skillid < MC_SKILLBASE || skillid >= MC_SKILLBASE + MAX_MERCSKILL )
+ skill_id = atoi(str[1]);
+ if( skill_id < MC_SKILLBASE || skill_id >= MC_SKILLBASE + MAX_MERCSKILL )
{
- ShowError("read_mercenary_skilldb : Skill %d out of range.\n", skillid);
+ ShowError("read_mercenary_skilldb : Skill %d out of range.\n", skill_id);
return false;
}
db = &mercenary_db[i];
- skilllv = atoi(str[2]);
+ skill_lv = atoi(str[2]);
- i = skillid - MC_SKILLBASE;
- db->skill[i].id = skillid;
- db->skill[i].lv = skilllv;
+ i = skill_id - MC_SKILLBASE;
+ db->skill[i].id = skill_id;
+ db->skill[i].lv = skill_lv;
return true;
}