summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index aa2be4473..05bbfe7b3 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -99,7 +99,7 @@ int pet_unlocktarget(struct pet_data *pd)
* Pet Attack Skill [Skotlex]
*------------------------------------------*/
int pet_attackskill(struct pet_data *pd, int target_id) {
- if (!battle_config.pet_status_support || !pd->a_skill ||
+ if (!battle_config.pet_status_support || !pd->a_skill ||
(battle_config.pet_equip_required && !pd->pet.equip))
return 0;
@@ -107,7 +107,7 @@ int pet_attackskill(struct pet_data *pd, int target_id) {
return 0;
if (rnd()%100 < (pd->a_skill->rate +pd->pet.intimate*pd->a_skill->bonusrate/1000)) {
- //Skotlex: Use pet's skill
+ //Skotlex: Use pet's skill
int inf;
struct block_list *bl;
@@ -158,7 +158,7 @@ int pet_target_check(struct map_session_data *sd,struct block_list *bl,int type)
if(pd->petDB->defence_attack_rate > 0 && rate <= 0)
rate = 1;
}
- if(rnd()%10000 < rate)
+ if(rnd()%10000 < rate)
{
if(pd->target_id == 0 || rnd()%10000 < pd->petDB->change_target_rate)
pd->target_id = bl->id;
@@ -303,7 +303,7 @@ int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
clif->additem(sd,0,0,flag);
map->addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
- pd->pet.incuvate = 1;
+ pd->pet.incubate = 1;
unit->free(&pd->bl,CLR_OUTSIGHT);
status_calc_pc(sd,SCO_NONE);
@@ -319,7 +319,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
nullpo_retr(1, sd);
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
if(sd->status.account_id != petinfo->account_id || sd->status.char_id != petinfo->char_id) {
sd->status.pet_id = 0;
@@ -327,8 +327,8 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
}
if (sd->status.pet_id != petinfo->pet_id) {
if (sd->status.pet_id) {
- //Wrong pet?? Set incuvate to no and send it back for saving.
- petinfo->incuvate = 1;
+ //Wrong pet?? Set incubate to no and send it back for saving.
+ petinfo->incubate = 1;
intif->save_petdata(sd->status.account_id,petinfo);
sd->status.pet_id = 0;
return 1;
@@ -390,14 +390,14 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo)
{
nullpo_retr(1, sd);
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
- if(sd->status.pet_id && petinfo->incuvate == 1) {
+ if(sd->status.pet_id && petinfo->incubate == 1) {
sd->status.pet_id = 0;
return 1;
}
- petinfo->incuvate = 0;
+ petinfo->incubate = 0;
petinfo->account_id = sd->status.account_id;
petinfo->char_id = sd->status.char_id;
sd->status.pet_id = petinfo->pet_id;
@@ -418,7 +418,7 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo)
clif->send_petdata(NULL, sd->pd, 3, sd->pd->vd.head_bottom);
clif->send_petstatus(sd);
}
- Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
+ Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
return 0;
}
@@ -433,7 +433,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag) {
sd->status.pet_id = 0;
return 1;
}
- if(p->incuvate == 1) {
+ if(p->incubate == 1) {
int i;
//Delete egg from inventory. [Skotlex]
for (i = 0; i < MAX_INVENTORY; i++) {
@@ -596,7 +596,7 @@ int pet_menu(struct map_session_data *sd,int menunum)
return 1;
//You lost the pet already.
- if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incuvate)
+ if(!sd->status.pet_id || sd->pd->pet.intimate <= 0 || sd->pd->pet.incubate)
return 1;
egg_id = itemdb->exists(sd->pd->petDB->EggID);
@@ -912,7 +912,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
(pd->ud.attacktimer != INVALID_TIMER || pd->ud.walktimer != INVALID_TIMER))
return 0; //Target already locked.
- if (target->type != BL_ITEM)
+ if (target->type != BL_ITEM)
{ //enemy targetted
if(!battle->check_range(&pd->bl,target,pd->status.rhw.range))
{ //Chase
@@ -934,7 +934,7 @@ int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick
memcpy(&pd->loot->item[pd->loot->count++],&fitem->item_data,sizeof(pd->loot->item[0]));
pd->loot->weight += itemdb_weight(fitem->item_data.nameid)*fitem->item_data.amount;
map->clearflooritem(target);
- }
+ }
//Target is unlocked regardless of whether it was picked or not.
pet->unlocktarget(pd);
}
@@ -1050,7 +1050,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
/*==========================================
* pet bonus giving skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1091,7 +1091,7 @@ int pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* pet recovery skills [Valaris] / Rewritten by [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1107,7 +1107,7 @@ int pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) {
}
if(sd->sc.data[pd->recovery->type])
- { //Display a heal animation?
+ { //Display a heal animation?
//Detoxify is chosen for now.
clif->skill_nodamage(&pd->bl,&sd->bl,TF_DETOXIFY,1,1);
status_change_end(&sd->bl, pd->recovery->type, INVALID_TIMER);
@@ -1155,7 +1155,7 @@ int pet_heal_timer(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* pet support skills [Skotlex]
- *------------------------------------------*/
+ *------------------------------------------*/
int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
struct pet_data *pd;
@@ -1202,12 +1202,12 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
* Pet read db data
* pet->db.txt
* pet->db2.txt
- *------------------------------------------*/
+ *------------------------------------------*/
int read_petdb()
{
char* filename[] = {"pet_db.txt","pet_db2.txt"};
FILE *fp;
- int nameid,i,j,k;
+ int nameid,i,j,k;
// Remove any previous scripts in case reloaddb was invoked.
for( j = 0; j < MAX_PET_DB; j++ )