summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-03 19:45:12 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-03 19:45:12 +0000
commit335b8e9227107182ef1e4c8a707bb604bf9937cc (patch)
tree6176756bb3c5a2ead7c209ab01ea8f20ea7c2fe5 /src/map
parent676ecb85de15e1cfd2579059da44692e94e8bc11 (diff)
downloadhercules-335b8e9227107182ef1e4c8a707bb604bf9937cc.tar.gz
hercules-335b8e9227107182ef1e4c8a707bb604bf9937cc.tar.bz2
hercules-335b8e9227107182ef1e4c8a707bb604bf9937cc.tar.xz
hercules-335b8e9227107182ef1e4c8a707bb604bf9937cc.zip
- GAHH, I am sick tired of typing TBL_HOMUNCULUS/BL_HOMUNCULUS all over the place. The idea is that the TBL* versions are supposed to be easier to use than the standard structure definition, but using TBL_HOMUNCULUS as an alias to struct homun_data kinda beats the purpose! Renamed them all to TBL_HOM/BL_HOM.
- Fixed using the right-hand weapon's size modifiers regardless of which weapon was being used. - Simplified the ignore-size check by making the Weapon Perfection check be done when specifying the flag, also moved the size-fix property of riding spear-knights to status_calc_pc. - Removed variable hd from status_calc_bl as it's not needed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8112 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c37
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/map.h6
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mob.c16
-rw-r--r--src/map/script.c10
-rw-r--r--src/map/skill.c12
-rw-r--r--src/map/status.c63
-rw-r--r--src/map/status.h2
-rw-r--r--src/map/unit.c4
10 files changed, 80 insertions, 74 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7a7a1d58b..7fd41c09b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -673,12 +673,12 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk
atkmin = atkmax;
} else { //PCs
atkmax = wa->atk;
+ type = (wa == status->lhw)?EQI_HAND_L:EQI_HAND_R;
if (!(flag&1) || (flag&2))
{ //Normal attacks
atkmin = status->dex;
- type = (wa == status->lhw)?8:9;
if (sd->equip_index[type] >= 0 && sd->inventory_data[sd->equip_index[type]])
atkmin = atkmin*(80 + sd->inventory_data[sd->equip_index[type]]->wlv*20)/100;
@@ -710,13 +710,10 @@ static int battle_calc_base_damage(struct status_data *status, struct weapon_atk
damage += ((flag&1)?sd->arrow_atk:rand()%sd->arrow_atk);
//SizeFix only for players
- if (!(
- sd->special_state.no_sizefix ||
- (sc && sc->data[SC_WEAPONPERFECTION].timer!=-1) ||
- (pc_isriding(sd) && (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR) && t_size==1) ||
- (flag&8)
- ))
- damage = damage*(sd->right_weapon.atkmods[t_size])/100;
+ if (!(sd->special_state.no_sizefix || (flag&8)))
+ damage = damage*(type==EQI_HAND_L?
+ sd->left_weapon.atkmods[t_size]:
+ sd->right_weapon.atkmods[t_size])/100;
}
//Finally, add baseatk
@@ -1202,8 +1199,8 @@ static struct Damage battle_calc_weapon_attack(
break;
}
case HFLI_SBR44: //[orn]
- if(src->type == BL_HOMUNCULUS){
- TBL_HOMUNCULUS *hd = (TBL_HOMUNCULUS*)src;
+ if(src->type == BL_HOM){
+ TBL_HOM *hd = (TBL_HOM*)src;
wd.damage = hd->master->homunculus.intimacy ;
wd.damage2 = hd->master->homunculus.intimacy ;
hd->master->homunculus.intimacy = 200;
@@ -1212,7 +1209,11 @@ static struct Damage battle_calc_weapon_attack(
}
default:
{
- i = (flag.cri?1:0)|(flag.arrow?2:0)|(skill_num == HW_MAGICCRASHER?4:0)|(skill_num == MO_EXTREMITYFIST?8:0);
+ i = (flag.cri?1:0)|
+ (flag.arrow?2:0)|
+ (skill_num == HW_MAGICCRASHER?4:0)|
+ (skill_num == MO_EXTREMITYFIST?8:0)|
+ (sc && sc->data[SC_WEAPONPERFECTION].timer!=-1)?8:0;
if (flag.arrow && sd)
switch(sd->status.weapon) {
case W_BOW:
@@ -3105,9 +3106,9 @@ static struct block_list* battle_get_master(struct block_list *src)
if (((TBL_MOB*)src)->master_id)
src = map_id2bl(((TBL_MOB*)src)->master_id);
break;
- case BL_HOMUNCULUS:
- if (((TBL_HOMUNCULUS*)src)->master)
- src = (struct block_list*)((TBL_HOMUNCULUS*)src)->master;
+ case BL_HOM:
+ if (((TBL_HOM*)src)->master)
+ src = (struct block_list*)((TBL_HOM*)src)->master;
break;
case BL_SKILL:
if (((TBL_SKILL*)src)->group && ((TBL_SKILL*)src)->group->src_id)
@@ -3195,7 +3196,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
}
//Valid targets with no special checks here.
- case BL_HOMUNCULUS:
+ case BL_HOM:
break;
//All else not specified is an invalid target.
default:
@@ -3247,7 +3248,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
//For some mysterious reason ground-skills can't target homun.
- if (target->type == BL_HOMUNCULUS)
+ if (target->type == BL_HOM)
return 0;
if (su->group->src_id == target->id)
@@ -3844,8 +3845,8 @@ void battle_set_defaults() {
battle_config.left_cardfix_to_right=0;
battle_config.skill_add_range=0;
battle_config.skill_out_range_consume=1;
- battle_config.skillrange_by_distance=BL_MOB|BL_PET|BL_HOMUNCULUS;
- battle_config.use_weapon_skill_range=BL_MOB|BL_PET|BL_HOMUNCULUS;
+ battle_config.skillrange_by_distance=BL_MOB|BL_PET|BL_HOM;
+ battle_config.use_weapon_skill_range=BL_MOB|BL_PET|BL_HOM;
battle_config.pc_damage_delay_rate=100;
battle_config.defnotenemy=0;
battle_config.vs_traps_bctall=BL_PC;
diff --git a/src/map/clif.c b/src/map/clif.c
index 44eee8c21..de66fbdcf 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7815,7 +7815,7 @@ int clif_charnameack (int fd, struct block_list *bl)
}
break;
//[blackhole89]
- case BL_HOMUNCULUS:
+ case BL_HOM:
memcpy(WBUFP(buf,6), ((struct homun_data*)bl)->master->homunculus.name, NAME_LENGTH);
break;
case BL_PET:
diff --git a/src/map/map.h b/src/map/map.h
index cdb91a0f1..a56f14aaa 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -173,7 +173,7 @@ enum {
BL_PC = 0x001,
BL_MOB = 0x002,
BL_PET = 0x004,
- BL_HOMUNCULUS = 0x008, //[blackhole89]
+ BL_HOM = 0x008, //[blackhole89]
BL_ITEM = 0x010,
BL_SKILL = 0x020,
BL_NPC = 0x040,
@@ -181,7 +181,7 @@ enum {
};
//For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
-#define BL_CHAR (BL_PC|BL_MOB|BL_HOMUNCULUS)
+#define BL_CHAR (BL_PC|BL_MOB|BL_HOM)
#define BL_ALL 0xfff
enum { WARP, SHOP, SCRIPT, MONS };
@@ -1449,7 +1449,7 @@ typedef struct flooritem_data TBL_ITEM;
typedef struct chat_data TBL_CHAT;
typedef struct skill_unit TBL_SKILL;
typedef struct pet_data TBL_PET;
-typedef struct homun_data TBL_HOMUNCULUS;
+typedef struct homun_data TBL_HOM;
#define BL_CAST(type_, bl , dest) \
(((bl) == NULL || (bl)->type != type_) ? ((dest) = NULL, 0) : ((dest) = (T ## type_ *)(bl), 1))
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index d35aefe9b..a6b262260 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -743,7 +743,7 @@ int merc_hom_data_init(struct map_session_data *sd)
hd->bl.x=sd->bl.x;
hd->bl.y=sd->bl.y - 1 ;
hd->bl.subtype = MONS;
- hd->bl.type=BL_HOMUNCULUS;
+ hd->bl.type=BL_HOM;
hd->bl.id= npc_get_new_npc_id();
hd->bl.prev=NULL;
hd->bl.next=NULL;
diff --git a/src/map/mob.c b/src/map/mob.c
index f9e85dc57..8ce7785c0 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -784,7 +784,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
!(status_get_mode(&md->bl)&MD_BOSS))
return 0; //Gangster paradise protection.
default:
- if ((*target) && (*target)->type == BL_HOMUNCULUS && bl->type != BL_HOMUNCULUS)
+ if ((*target) && (*target)->type == BL_HOM && bl->type != BL_HOM)
return 0; //For some reason Homun targets are never overriden.
if((dist=distance_bl(&md->bl, bl)) < md->db->range2 &&
@@ -824,7 +824,7 @@ static int mob_ai_sub_hard_changechase(struct block_list *bl,va_list ap)
switch (bl->type)
{
case BL_PC:
- case BL_HOMUNCULUS: //[orn]
+ case BL_HOM: //[orn]
case BL_MOB:
if(check_distance_bl(&md->bl, bl, md->status.rhw.range) &&
battle_check_range (&md->bl, bl, md->status.rhw.range)
@@ -1174,13 +1174,13 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
(mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
) {
map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl,
- view_range, md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS, md, &tbl);
+ view_range, md->special_state.ai?BL_CHAR:BL_PC|BL_HOM, md, &tbl);
if(!tbl && mode&MD_ANGRY && !md->state.aggressive)
md->state.aggressive = 1; //Restore angry state when no targets are visible.
} else if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW)) {
search_size = view_range<md->status.rhw.range ? view_range:md->status.rhw.range;
map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl,
- search_size, (md->special_state.ai?BL_CHAR:BL_PC|BL_HOMUNCULUS), md, &tbl);
+ search_size, (md->special_state.ai?BL_CHAR:BL_PC|BL_HOM), md, &tbl);
}
if (tbl)
@@ -1609,9 +1609,9 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage)
md->attacked_id = src->id;
break;
}
- case BL_HOMUNCULUS: //[orn]
+ case BL_HOM: //[orn]
{
- struct homun_data *hd = (TBL_HOMUNCULUS*)src;
+ struct homun_data *hd = (TBL_HOM*)src;
id = hd->bl.id;
if(rand()%1000 < 1000/md->attacked_players)
md->attacked_id = src->id;
@@ -1763,7 +1763,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if(mvp_damage<(unsigned int)md->dmglog[i].dmg){
third_sd = second_sd;
second_sd = mvp_sd;
- if ( (tmpbl[temp])->type == BL_HOMUNCULUS ) {
+ if ( (tmpbl[temp])->type == BL_HOM ) {
mvp_sd = (struct map_session_data *) ((struct homun_data *)tmpbl[temp])->master ;
} else
mvp_sd=(struct map_session_data *)tmpbl[temp];
@@ -1895,7 +1895,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if(zeny) // zeny from mobs [Valaris]
pc_getzeny((struct map_session_data *)tmpbl[i], zeny);
break ;
- case BL_HOMUNCULUS:
+ case BL_HOM:
if(base_exp) {
merc_hom_gainexp((struct homun_data *)tmpbl[i], base_exp);
//homunculus give base_exp to master
diff --git a/src/map/script.c b/src/map/script.c
index 33bb2e1d9..50ea3963a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11642,7 +11642,7 @@ int buildin_rid2name(struct script_state *st){
case BL_PET:
push_str(st->stack,C_CONSTSTR,((struct pet_data *)bl)->name);
break;
- case BL_HOMUNCULUS:
+ case BL_HOM:
push_str(st->stack,C_CONSTSTR,((struct homun_data *)bl)->master->homunculus.name);
break;
default:
@@ -12067,8 +12067,8 @@ int buildin_unittalk(struct script_state *st)
case BL_NPC:
memcpy(message, ((TBL_NPC *)bl)->name, NAME_LENGTH);
break;
- case BL_HOMUNCULUS:
- memcpy(message, ((TBL_HOMUNCULUS *)bl)->master->homunculus.name, NAME_LENGTH);
+ case BL_HOM:
+ memcpy(message, ((TBL_HOM *)bl)->master->homunculus.name, NAME_LENGTH);
break;
case BL_PET:
memcpy(message, ((TBL_PET *)bl)->name, NAME_LENGTH);
@@ -12114,8 +12114,8 @@ int buildin_unitdeadsit(struct script_state *st){
case BL_NPC:
((TBL_NPC *)bl)->vd->dead_sit = action;
break;
- case BL_HOMUNCULUS:
- ((TBL_HOMUNCULUS *)bl)->vd->dead_sit = action;
+ case BL_HOM:
+ ((TBL_HOM *)bl)->vd->dead_sit = action;
break;
case BL_PET:
((TBL_PET *)bl)->vd.dead_sit = action;
diff --git a/src/map/skill.c b/src/map/skill.c
index 44489790d..1fefcff84 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -808,7 +808,7 @@ int skill_calc_heal (struct block_list *bl, int skill_lv)
if(bl->type == BL_PC && (skill = pc_checkskill((TBL_PC*)bl, HP_MEDITATIO)) > 0)
heal += heal * skill * 2 / 100;
- if(bl->type == BL_HOMUNCULUS && (skill = merc_hom_checkskill( ((TBL_HOMUNCULUS*)bl)->master, HLIF_BRAIN)) > 0) //[orn]
+ if(bl->type == BL_HOM && (skill = merc_hom_checkskill( ((TBL_HOM*)bl)->master, HLIF_BRAIN)) > 0) //[orn]
heal += heal * skill * 2 / 100;
return heal;
}
@@ -3271,7 +3271,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if (src->type == BL_PC) {
sd = (struct map_session_data *)src;
- } else if (src->type == BL_HOMUNCULUS) { //[orn]
+ } else if (src->type == BL_HOM) { //[orn]
hd = (struct homun_data *)src;
} else if (src->type == BL_MOB) {
md = (struct mob_data *)src;
@@ -3296,7 +3296,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
switch (skillid) {
case HLIF_HEAL: //[orn]
- if (bl->type != BL_HOMUNCULUS) {
+ if (bl->type != BL_HOM) {
if (sd) clif_skill_fail(sd,skillid,0,0) ;
break ;
}
@@ -5690,7 +5690,7 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
nullpo_retr(0, ud);
BL_CAST( BL_PC, src, sd);
- BL_CAST( BL_HOMUNCULUS, src, hd); //[orn]
+ BL_CAST( BL_HOM, src, hd); //[orn]
BL_CAST( BL_MOB, src, md);
if( src->prev == NULL ) {
@@ -5865,7 +5865,7 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data)
nullpo_retr(0, ud);
BL_CAST( BL_PC , src, sd);
- BL_CAST( BL_HOMUNCULUS , src, hd); //[orn]
+ BL_CAST( BL_HOM , src, hd); //[orn]
BL_CAST( BL_MOB, src, md);
if( src->prev == NULL ) {
@@ -10668,7 +10668,7 @@ int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
int skill_blockmerc_end (int tid, unsigned int tick, int id, int data) //[orn]
{
- struct homun_data *hd = (TBL_HOMUNCULUS*) map_id2bl(id);
+ struct homun_data *hd = (TBL_HOM*) map_id2bl(id);
if (data <= 0 || data >= MAX_SKILL)
return 0;
if (hd) hd->blockskill[data] = 0;
diff --git a/src/map/status.c b/src/map/status.c
index 81b8641dd..362847f1a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -654,8 +654,8 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
case BL_PC:
pc_damage((TBL_PC*)target,src,hp,sp);
break;
- case BL_HOMUNCULUS:
- merc_damage((TBL_HOMUNCULUS*)target,src,hp,sp);
+ case BL_HOM:
+ merc_damage((TBL_HOM*)target,src,hp,sp);
}
if (status->hp)
@@ -679,8 +679,8 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
case BL_PC:
flag = pc_dead((TBL_PC*)target,src);
break;
- case BL_HOMUNCULUS:
- flag = merc_hom_dead((TBL_HOMUNCULUS*)target,src);
+ case BL_HOM:
+ flag = merc_hom_dead((TBL_HOM*)target,src);
break;
default: //Unhandled case, do nothing to object.
flag = 0;
@@ -776,8 +776,8 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag)
case BL_PC:
pc_heal((TBL_PC*)bl,hp,sp,flag&2?1:0);
break;
- case BL_HOMUNCULUS:
- merc_hom_heal((TBL_HOMUNCULUS*)bl,hp,sp);
+ case BL_HOM:
+ merc_hom_heal((TBL_HOM*)bl,hp,sp);
break;
}
return hp+sp;
@@ -858,8 +858,8 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per
break;
case BL_PC:
pc_revive((TBL_PC*)bl, hp, sp);
-// case BL_HOMUNCULUS: //[orn]
-// merc_hom_revive((TBL_HOMUNCULUS*)bl, hp, sp);
+// case BL_HOM: //[orn]
+// merc_hom_revive((TBL_HOM*)bl, hp, sp);
// break;
}
return 1;
@@ -1794,6 +1794,14 @@ int status_calc_pc(struct map_session_data* sd,int first)
sd->left_weapon.atkmods[1] = atkmods[1][sd->weapontype2];
sd->left_weapon.atkmods[2] = atkmods[2][sd->weapontype2];
+ if(pc_isriding(sd) &&
+ (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR))
+ { //When Riding with spear, damage modifier to mid-class becomes
+ //same as versus large size.
+ sd->right_weapon.atkmods[1] = sd->right_weapon.atkmods[2];
+ sd->left_weapon.atkmods[1] = sd->left_weapon.atkmods[2];
+ }
+
// ----- STATS CALCULATION -----
// Job bonuses
@@ -2194,7 +2202,7 @@ int status_calc_homunculus(struct homun_data *hd, int first)
merc_hom_calc_skilltree(hd->master);
status_cpy(&hd->battle_status, status);
- status_calc_misc(status, BL_HOMUNCULUS, hd->master->homunculus.level);
+ status_calc_misc(status, BL_HOM, hd->master->homunculus.level);
if(battle_config.homun_critical_rate != 100)
status->cri = status->cri*battle_config.homun_critical_rate/100;
@@ -2692,7 +2700,6 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
struct status_change *sc;
int temp;
TBL_PC *sd;
- TBL_HOMUNCULUS *hd;
b_status = status_get_base_status(bl);
status = status_get_status_data(bl);
sc = status_get_sc(bl);
@@ -2701,7 +2708,6 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
return;
BL_CAST(BL_PC,bl,sd);
- BL_CAST(BL_HOMUNCULUS,bl,hd);
if(sd && flag&SCB_PC)
{ //Recalc everything.
@@ -2709,8 +2715,7 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
return;
}
-// if(!sd && (!sc || !sc->count)) { //No difference.
- if( (!sd && !hd ) && (!sc || !sc->count)) { //No difference.
+ if( (!bl->type&(BL_PC|BL_HOM) ) && (!sc || !sc->count)) { //No difference.
status_cpy(status, b_status);
return;
}
@@ -2856,9 +2861,9 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
return;
}
- if(hd) {
+ if(bl->type == BL_HOM) {
//The remaining are handled quite different by homunculus, so use their own function.
- status_calc_bl_sub_hom(hd, flag);
+ status_calc_bl_sub_hom((TBL_HOM*)bl, flag);
return;
}
@@ -3734,7 +3739,7 @@ int status_get_class(struct block_list *bl)
return ((struct map_session_data *)bl)->status.class_;
if(bl->type==BL_PET)
return ((struct pet_data *)bl)->class_;
- if(bl->type==BL_HOMUNCULUS)
+ if(bl->type==BL_HOM)
return ((struct homun_data *)bl)->master->homunculus.class_;
return 0;
}
@@ -3752,8 +3757,8 @@ int status_get_lv(struct block_list *bl)
return ((TBL_PC*)bl)->status.base_level;
if(bl->type==BL_PET)
return ((TBL_PET*)bl)->msd->pet.level;
- if(bl->type==BL_HOMUNCULUS)
- return ((TBL_HOMUNCULUS*)bl)->master->homunculus.level;
+ if(bl->type==BL_HOM)
+ return ((TBL_HOM*)bl)->master->homunculus.level;
return 1;
}
@@ -3768,8 +3773,8 @@ struct status_data *status_get_status_data(struct block_list *bl)
return &((TBL_MOB*)bl)->status;
case BL_PET:
return &((TBL_PET*)bl)->status;
- case BL_HOMUNCULUS:
- return &((TBL_HOMUNCULUS*)bl)->battle_status;
+ case BL_HOM:
+ return &((TBL_HOM*)bl)->battle_status;
default:
return &dummy_status;
}
@@ -3787,8 +3792,8 @@ struct status_data *status_get_base_status(struct block_list *bl)
&((TBL_MOB*)bl)->db->status;
case BL_PET:
return &((TBL_PET*)bl)->db->status;
- case BL_HOMUNCULUS:
- return &((TBL_HOMUNCULUS*)bl)->base_status;
+ case BL_HOM:
+ return &((TBL_HOM*)bl)->base_status;
default:
return NULL;
}
@@ -3849,7 +3854,7 @@ int status_get_party_id(struct block_list *bl)
}
return 0; //No party.
}
- if(bl->type==BL_HOMUNCULUS){ //[orn]
+ if(bl->type==BL_HOM){ //[orn]
struct homun_data *hd=(struct homun_data *)bl;
if( hd->master->bl.id>0 )
{
@@ -3881,7 +3886,7 @@ int status_get_guild_id(struct block_list *bl)
return msd->status.guild_id; //Alchemist's mobs [Skotlex]
return 0; //No guild.
}
- if(bl->type==BL_HOMUNCULUS){ //[orn]
+ if(bl->type==BL_HOM){ //[orn]
struct homun_data *hd=(struct homun_data *)bl;
if( hd->master->bl.id>0 )
{
@@ -3946,7 +3951,7 @@ struct view_data *status_get_viewdata(struct block_list *bl)
return &((TBL_PET*)bl)->vd;
case BL_NPC:
return ((TBL_NPC*)bl)->vd;
- case BL_HOMUNCULUS: //[blackhole89]
+ case BL_HOM: //[blackhole89]
return ((struct homun_data*)bl)->vd;
}
return NULL;
@@ -4046,7 +4051,7 @@ void status_set_viewdata(struct block_list *bl, int class_)
ShowError("status_set_viewdata (NPC): No view data for class %d\n", class_);
}
break;
- case BL_HOMUNCULUS: //[blackhole89]
+ case BL_HOM: //[blackhole89]
{
struct homun_data *hd = (struct homun_data*)bl;
if (vd)
@@ -4074,8 +4079,8 @@ struct status_change *status_get_sc(struct block_list *bl)
return &((TBL_PC*)bl)->sc;
case BL_NPC:
return &((TBL_NPC*)bl)->sc;
- case BL_HOMUNCULUS: //[blackhole89]
- return &((TBL_HOMUNCULUS*)bl)->sc;
+ case BL_HOM: //[blackhole89]
+ return &((TBL_HOM*)bl)->sc;
}
return NULL;
}
@@ -4322,7 +4327,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case BL_PC:
sd=(struct map_session_data *)bl;
break;
- case BL_HOMUNCULUS:
+ case BL_HOM:
hd=(struct homun_data *)bl; //[orn]
break;
case BL_MOB:
diff --git a/src/map/status.h b/src/map/status.h
index 2b7d6627c..af01cd1d6 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -518,7 +518,7 @@ enum {
#define SCB_ALL 0x7FFFFFFF
//Define to determine who gets HP/SP consumed on doing skills/etc. [Skotlex]
-#define BL_CONSUME (BL_PC|BL_HOMUNCULUS)
+#define BL_CONSUME (BL_PC|BL_HOM)
int status_damage(struct block_list *src,struct block_list *target,int hp,int sp, int walkdelay, int flag);
//Define for standard HP damage attacks.
diff --git a/src/map/unit.c b/src/map/unit.c
index 11eeb1387..0860c7b0a 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -39,7 +39,7 @@ struct unit_data* unit_bl2ud(struct block_list *bl) {
if( bl->type == BL_MOB) return &((struct mob_data*)bl)->ud;
if( bl->type == BL_PET) return &((struct pet_data*)bl)->ud;
if( bl->type == BL_NPC) return &((struct npc_data*)bl)->ud;
- if( bl->type == BL_HOMUNCULUS) return &((struct homun_data*)bl)->ud; //[orn]
+ if( bl->type == BL_HOM) return &((struct homun_data*)bl)->ud; //[orn]
return NULL;
}
@@ -1756,7 +1756,7 @@ int unit_free(struct block_list *bl) {
}
if(mob_is_clone(md->class_))
mob_clone_delete(md->class_);
- } else if( bl->type == BL_HOMUNCULUS ) { //[orn]
+ } else if( bl->type == BL_HOM ) { //[orn]
struct homun_data *hd = (struct homun_data*)bl;
struct map_session_data *sd = hd->master;
merc_hom_hungry_timer_delete(hd);