diff options
author | shennetsind <ind@henn.et> | 2013-09-25 09:07:33 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-25 09:07:33 -0300 |
commit | 13afb7e0bf35bacc9c90c7dffe34120ddd2fd099 (patch) | |
tree | 180c739ac69aceab8ce4cc6151030539a32ac8c3 /src/map/homunculus.c | |
parent | 1114eb3da58b078258a824424fef687a1ccee90c (diff) | |
parent | 66979ef89363c03e3cc02d63feb5248836daff4e (diff) | |
download | hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.gz hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.bz2 hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.xz hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Conflicts:
src/map/chrif.c
src/map/clif.c
src/map/homunculus.c
src/map/pet.c
src/map/script.c
src/map/skill.c
src/map/status.c
All clear.
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 92b92106d..79d993ede 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -71,7 +71,7 @@ enum homun_type homunculus_class2type(int class_) { case 6052: return HT_S; default: - return -1; + return HT_INVALID; } } @@ -288,7 +288,7 @@ bool homunculus_levelup(struct homun_data *hd) { int growth_max_hp, growth_max_sp; enum homun_type htype; - if((htype = homun->class2type(hd->homunculus.class_)) == -1) { + if( (htype = homun->class2type(hd->homunculus.class_)) == HT_INVALID ) { ShowError("homunculus_levelup: Invalid class %d. \n", hd->homunculus.class_); return false; } @@ -435,14 +435,14 @@ bool homunculus_mutate(struct homun_data *hd, int homun_id) { m_class = homun->class2type(hd->homunculus.class_); m_id = homun->class2type(homun_id); - if( m_class == -1 || m_id == -1 || m_class != HT_EVO || m_id != HT_S ) { + if( m_class == HT_INVALID || m_id == HT_INVALID || m_class != HT_EVO || m_id != HT_S ) { clif->emotion(&hd->bl, E_SWT); return false; } prev_class = hd->homunculus.class_; - if (!homun->change_class(hd, homun_id)) { + if( !homun->change_class(hd, homun_id) ) { ShowError("homunculus_mutate: Can't evolve homunc from %d to %d", hd->homunculus.class_, homun_id); return false; } @@ -474,7 +474,7 @@ int homunculus_gainexp(struct homun_data *hd,unsigned int exp) { if(hd->homunculus.vaporize) return 1; - if((htype = homun->class2type(hd->homunculus.class_)) == -1) { + if( (htype = homun->class2type(hd->homunculus.class_)) == HT_INVALID ) { ShowError("homunculus_gainexp: Invalid class %d. \n", hd->homunculus.class_); return 0; } @@ -1127,11 +1127,11 @@ void homunculus_read_db(void) { memset(homun->db,0,sizeof(homun->db)); for(i = 0; i<ARRAYLENGTH(filename); i++) { if( i > 0 ) { - char path[256]; + char filepath[256]; - sprintf(path, "%s/%s", iMap->db_path, filename[i]); + sprintf(filepath, "%s/%s", iMap->db_path, filename[i]); - if( !exists(path) ) { + if( !exists(filepath) ) { continue; } } |