summaryrefslogtreecommitdiff
path: root/src/map/homunculus.c
diff options
context:
space:
mode:
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;