summaryrefslogtreecommitdiff
path: root/src/map/homunculus.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-11-16 06:35:51 +0100
committerHaru <haru@dotalux.com>2014-11-16 07:16:23 +0100
commit02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f (patch)
tree3161fd5786bb563c32059068eb3b4876d2ae11ca /src/map/homunculus.c
parent31bff051ee3c353fb7ee5e544d68feeaefd4941f (diff)
downloadhercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.gz
hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.bz2
hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.xz
hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.zip
Whitespace cleanup (no code changes)
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r--src/map/homunculus.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index f4ffc62a6..e45f654ff 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -78,39 +78,39 @@ enum homun_type homunculus_class2type(int class_) {
}
void homunculus_addspiritball(struct homun_data *hd, int max) {
- nullpo_retv(hd);
+ nullpo_retv(hd);
- if (max > MAX_SKILL_LEVEL)
- max = MAX_SKILL_LEVEL;
- if (hd->homunculus.spiritball < 0)
- hd->homunculus.spiritball = 0;
+ if (max > MAX_SKILL_LEVEL)
+ max = MAX_SKILL_LEVEL;
+ if (hd->homunculus.spiritball < 0)
+ hd->homunculus.spiritball = 0;
- if (hd->homunculus.spiritball && hd->homunculus.spiritball >= max) {
- hd->homunculus.spiritball = max;
- }
- else
- hd->homunculus.spiritball++;
+ if (hd->homunculus.spiritball && hd->homunculus.spiritball >= max) {
+ hd->homunculus.spiritball = max;
+ }
+ else
+ hd->homunculus.spiritball++;
- clif->spiritball(&hd->bl);
+ clif->spiritball(&hd->bl);
}
void homunculus_delspiritball(struct homun_data *hd, int count, int type) {
- nullpo_retv(hd);
-
- if (hd->homunculus.spiritball <= 0) {
- hd->homunculus.spiritball = 0;
- return;
- }
- if (count <= 0)
- return;
- if (count > MAX_SKILL_LEVEL)
- count = MAX_SKILL_LEVEL;
- if (count > hd->homunculus.spiritball)
- count = hd->homunculus.spiritball;
-
- hd->homunculus.spiritball -= count;
- if (!type)
- clif->spiritball(&hd->bl);
+ nullpo_retv(hd);
+
+ if (hd->homunculus.spiritball <= 0) {
+ hd->homunculus.spiritball = 0;
+ return;
+ }
+ if (count <= 0)
+ return;
+ if (count > MAX_SKILL_LEVEL)
+ count = MAX_SKILL_LEVEL;
+ if (count > hd->homunculus.spiritball)
+ count = hd->homunculus.spiritball;
+
+ hd->homunculus.spiritball -= count;
+ if (!type)
+ clif->spiritball(&hd->bl);
}
void homunculus_damaged(struct homun_data *hd) {
@@ -313,7 +313,7 @@ bool homunculus_levelup(struct homun_data *hd) {
hom = &hd->homunculus;
hom->level++ ;
if (!(hom->level % 3))
- hom->skillpts++; //1 skillpoint each 3 base level
+ hom->skillpts++; //1 skillpoint each 3 base level
hom->exp -= hd->exp_next;
hd->exp_next = homun->exptable[hom->level - 1];
@@ -500,7 +500,7 @@ int homunculus_gainexp(struct homun_data *hd,unsigned int exp) {
return 0;
}
- //levelup
+ //levelup
while( hd->homunculus.exp > hd->exp_next && homun->levelup(hd) );
if( hd->exp_next == 0 )
@@ -601,7 +601,7 @@ bool homunculus_feed(struct map_session_data *sd, struct homun_data *hd) {
emotion = E_HO;
}
- hd->homunculus.hunger += 10; //dunno increase value for each food
+ hd->homunculus.hunger += 10; //dunno increase value for each food
if(hd->homunculus.hunger > 100)
hd->homunculus.hunger = 100;
@@ -912,7 +912,7 @@ bool homunculus_ressurect(struct map_session_data* sd, unsigned char per, short
hd = sd->hd;
- if (hd->homunculus.vaporize != HOM_ST_ACTIVE)
+ if (hd->homunculus.vaporize != HOM_ST_ACTIVE)
return false; // vaporized homunculi need to be 'called'
if (!status->isdead(&hd->bl))
@@ -1151,7 +1151,7 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) {
int minJobLevelPresent = 0;
if( columns == 15 )
- minJobLevelPresent = 1; // MinJobLvl has been added - FIXME: is this extra field even needed anymore?
+ minJobLevelPresent = 1; // MinJobLvl has been added - FIXME: is this extra field even needed anymore?
// check for bounds [celest]
classid = atoi(split[0]) - HM_CLASS_BASE;