* Added enumeration for monster damage log field 'flag'.
* Corrected wording of the setting homunculus_autoloot (since r12203). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14587 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e7fec551b1
commit
c457a39996
@ -1,6 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
2010/12/12
|
2010/12/12
|
||||||
|
* Added enumeration for monster damage log field 'flag'. [Ai4rei]
|
||||||
* Removed disabled backup of script command 'isequipped' (since r1605). [Ai4rei]
|
* Removed disabled backup of script command 'isequipped' (since r1605). [Ai4rei]
|
||||||
* Made script engine's DEBUG_DISASM block use script_op2name, rather than hardcoding operator names as per TODO from r13083 (related r9569, follow up to r10667). [Ai4rei]
|
* Made script engine's DEBUG_DISASM block use script_op2name, rather than hardcoding operator names as per TODO from r13083 (related r9569, follow up to r10667). [Ai4rei]
|
||||||
* Cleaned up MOTD reading (related r292 and r4552). [Ai4rei]
|
* Cleaned up MOTD reading (related r292 and r4552). [Ai4rei]
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
|
2010/12/12
|
||||||
|
* Rev. 14587 Corrected wording of the setting homunculus_autoloot (since r12203). [Ai4rei]
|
||||||
2010/12/10
|
2010/12/10
|
||||||
* Rev. 14572 Applied update to charhelp.txt provided by EvilPuncker to match current charcommand behavior (bugreport:4632, follow up to r13403). [Ai4rei]
|
* Rev. 14572 Applied update to charhelp.txt provided by EvilPuncker to match current charcommand behavior (bugreport:4632, follow up to r13403). [Ai4rei]
|
||||||
2010/10/10
|
2010/10/10
|
||||||
|
@ -44,7 +44,7 @@ hvan_explosion_intimate: 45000
|
|||||||
// Show stat growth to the owner when an Homunculus levels up
|
// Show stat growth to the owner when an Homunculus levels up
|
||||||
homunculus_show_growth: no
|
homunculus_show_growth: no
|
||||||
|
|
||||||
// If a monster is killed only by homunculus, can autoloot works?
|
// Does autoloot work, when a monster is killed by homunculus only?
|
||||||
homunculus_autoloot: yes
|
homunculus_autoloot: yes
|
||||||
|
|
||||||
// Should homunculii Vaporize when Master dies?
|
// Should homunculii Vaporize when Master dies?
|
||||||
|
@ -1804,7 +1804,7 @@ int mob_respawn(int tid, unsigned int tick, int id, intptr data)
|
|||||||
|
|
||||||
void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
|
void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
|
||||||
{
|
{
|
||||||
int char_id = 0, flag = 0;
|
int char_id = 0, flag = MDLF_NORMAL;
|
||||||
|
|
||||||
if( damage < 0 )
|
if( damage < 0 )
|
||||||
return; //Do nothing for absorbed damage.
|
return; //Do nothing for absorbed damage.
|
||||||
@ -1826,7 +1826,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
|
|||||||
case BL_HOM:
|
case BL_HOM:
|
||||||
{
|
{
|
||||||
struct homun_data *hd = (TBL_HOM*)src;
|
struct homun_data *hd = (TBL_HOM*)src;
|
||||||
flag = 1;
|
flag = MDLF_HOMUN;
|
||||||
if( hd->master )
|
if( hd->master )
|
||||||
char_id = hd->master->status.char_id;
|
char_id = hd->master->status.char_id;
|
||||||
if( damage )
|
if( damage )
|
||||||
@ -1845,7 +1845,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
|
|||||||
case BL_PET:
|
case BL_PET:
|
||||||
{
|
{
|
||||||
struct pet_data *pd = (TBL_PET*)src;
|
struct pet_data *pd = (TBL_PET*)src;
|
||||||
flag = 2;
|
flag = MDLF_PET;
|
||||||
if( pd->msd )
|
if( pd->msd )
|
||||||
{
|
{
|
||||||
char_id = pd->msd->status.char_id;
|
char_id = pd->msd->status.char_id;
|
||||||
@ -2021,9 +2021,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
count++; //Only logged into same map chars are counted for the total.
|
count++; //Only logged into same map chars are counted for the total.
|
||||||
if (pc_isdead(tsd))
|
if (pc_isdead(tsd))
|
||||||
continue; // skip dead players
|
continue; // skip dead players
|
||||||
if(md->dmglog[i].flag == 1 && !merc_is_hom_active(tsd->hd))
|
if(md->dmglog[i].flag == MDLF_HOMUN && !merc_is_hom_active(tsd->hd))
|
||||||
continue; // skip homunc's share if inactive
|
continue; // skip homunc's share if inactive
|
||||||
if( md->dmglog[i].flag == 2 && (!tsd->status.pet_id || !tsd->pd) )
|
if( md->dmglog[i].flag == MDLF_PET && (!tsd->status.pet_id || !tsd->pd) )
|
||||||
continue; // skip pet's share if inactive
|
continue; // skip pet's share if inactive
|
||||||
|
|
||||||
if(md->dmglog[i].dmg > mvp_damage)
|
if(md->dmglog[i].dmg > mvp_damage)
|
||||||
@ -2036,7 +2036,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
|
|
||||||
tmpsd[i] = tsd; // record as valid damage-log entry
|
tmpsd[i] = tsd; // record as valid damage-log entry
|
||||||
|
|
||||||
if(!md->dmglog[i].flag == 1 && flaghom)
|
if(!md->dmglog[i].flag == MDLF_HOMUN && flaghom)
|
||||||
flaghom = 0; // Damage received from other Types != Homunculus
|
flaghom = 0; // Damage received from other Types != Homunculus
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2102,7 +2102,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
else if(md->special_state.size==2)
|
else if(md->special_state.size==2)
|
||||||
per *=2.;
|
per *=2.;
|
||||||
|
|
||||||
if( md->dmglog[i].flag == 2 )
|
if( md->dmglog[i].flag == MDLF_PET )
|
||||||
per *= battle_config.pet_attack_exp_rate/100.;
|
per *= battle_config.pet_attack_exp_rate/100.;
|
||||||
|
|
||||||
if(battle_config.zeny_from_mobs && md->level) {
|
if(battle_config.zeny_from_mobs && md->level) {
|
||||||
@ -2117,12 +2117,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
else
|
else
|
||||||
base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * map[m].bexp/100., 1, UINT_MAX);
|
base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * map[m].bexp/100., 1, UINT_MAX);
|
||||||
|
|
||||||
if (map[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == 1) //Homun earned job-exp is always lost.
|
if (map[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == MDLF_HOMUN) //Homun earned job-exp is always lost.
|
||||||
job_exp = 0;
|
job_exp = 0;
|
||||||
else
|
else
|
||||||
job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map[m].jexp/100., 1, UINT_MAX);
|
job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map[m].jexp/100., 1, UINT_MAX);
|
||||||
|
|
||||||
if((temp = tmpsd[i]->status.party_id )>0 && !md->dmglog[i].flag == 1) //Homun-done damage (flag 1) is not given to party
|
if((temp = tmpsd[i]->status.party_id )>0 && !md->dmglog[i].flag == MDLF_HOMUN) //Homun-done damage (flag 1) is not given to party
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
for(j=0;j<pnum && pt[j].id!=temp;j++); //Locate party.
|
for(j=0;j<pnum && pt[j].id!=temp;j++); //Locate party.
|
||||||
@ -2154,11 +2154,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(flag) {
|
if(flag) {
|
||||||
if(base_exp && md->dmglog[i].flag == 1) //tmpsd[i] is null if it has no homunc.
|
if(base_exp && md->dmglog[i].flag == MDLF_HOMUN) //tmpsd[i] is null if it has no homunc.
|
||||||
merc_hom_gainexp(tmpsd[i]->hd, base_exp);
|
merc_hom_gainexp(tmpsd[i]->hd, base_exp);
|
||||||
if(base_exp || job_exp)
|
if(base_exp || job_exp)
|
||||||
{
|
{
|
||||||
if( md->dmglog[i].flag != 2 || battle_config.pet_attack_exp_to_master )
|
if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master )
|
||||||
pc_gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false);
|
pc_gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false);
|
||||||
}
|
}
|
||||||
if(zeny) // zeny from mobs [Valaris]
|
if(zeny) // zeny from mobs [Valaris]
|
||||||
|
@ -55,6 +55,13 @@ enum MobSkillState {
|
|||||||
MSS_ANYTARGET,
|
MSS_ANYTARGET,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MobDamageLogFlag
|
||||||
|
{
|
||||||
|
MDLF_NORMAL = 0,
|
||||||
|
MDLF_HOMUN,
|
||||||
|
MDLF_PET,
|
||||||
|
};
|
||||||
|
|
||||||
struct mob_skill {
|
struct mob_skill {
|
||||||
enum MobSkillState state;
|
enum MobSkillState state;
|
||||||
short skill_id,skill_lv;
|
short skill_id,skill_lv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user