From cfd2bdb06048c17decaafd0f5a3c04e3f0ac6a3b Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 29 Mar 2013 15:44:32 -0300 Subject: Re-introducing clone-nocopy skill This was once available through the now-gone skill_nocast_db.txt. To make a skill not copy-able by clones (aka the skill is not inherited by a clone when it is created), use flag 0x8000 in the inf2 skill db field Signed-off-by: shennetsind --- src/map/mob.c | 2 +- src/map/pc.c | 88 ++++++++++++++++++++++++++++----------------------------- src/map/skill.h | 1 + 3 files changed, 45 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index 71b500491..2995a4db4 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3389,7 +3389,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) { skill_id = skill_tree[pc_class2idx(sd->status.class_)][j].id; if (!skill_id || sd->status.skill[skill_id].lv < 1 || - (skill->get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) + (skill->get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL|INF2_CLONE_NOCOPY)) ) continue; //Normal aggressive mob, disable skills that cannot help them fight diff --git a/src/map/pc.c b/src/map/pc.c index 6f8ba91fb..1a77aae97 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7524,53 +7524,51 @@ int pc_changelook(struct map_session_data *sd,int type,int val) nullpo_ret(sd); switch(type){ - case LOOK_HAIR: //Use the battle_config limits! [Skotlex] - val = cap_value(val, MIN_HAIR_STYLE, MAX_HAIR_STYLE); - - if (sd->status.hair != val) - { - sd->status.hair=val; - if (sd->status.guild_id) //Update Guild Window. [Skotlex] - intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, - GMI_HAIR,&sd->status.hair,sizeof(sd->status.hair)); - } - break; - case LOOK_WEAPON: - sd->status.weapon=val; - break; - case LOOK_HEAD_BOTTOM: - sd->status.head_bottom=val; - break; - case LOOK_HEAD_TOP: - sd->status.head_top=val; - break; - case LOOK_HEAD_MID: - sd->status.head_mid=val; - break; - case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex] - val = cap_value(val, MIN_HAIR_COLOR, MAX_HAIR_COLOR); + case LOOK_HAIR: //Use the battle_config limits! [Skotlex] + val = cap_value(val, MIN_HAIR_STYLE, MAX_HAIR_STYLE); + + if (sd->status.hair != val) { + sd->status.hair=val; + if (sd->status.guild_id) //Update Guild Window. [Skotlex] + intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, + GMI_HAIR,&sd->status.hair,sizeof(sd->status.hair)); + } + break; + case LOOK_WEAPON: + sd->status.weapon=val; + break; + case LOOK_HEAD_BOTTOM: + sd->status.head_bottom=val; + break; + case LOOK_HEAD_TOP: + sd->status.head_top=val; + break; + case LOOK_HEAD_MID: + sd->status.head_mid=val; + break; + case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex] + val = cap_value(val, MIN_HAIR_COLOR, MAX_HAIR_COLOR); - if (sd->status.hair_color != val) - { - sd->status.hair_color=val; - if (sd->status.guild_id) //Update Guild Window. [Skotlex] - intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, - GMI_HAIR_COLOR,&sd->status.hair_color,sizeof(sd->status.hair_color)); - } - break; - case LOOK_CLOTHES_COLOR: //Use the battle_config limits! [Skotlex] - val = cap_value(val, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); + if (sd->status.hair_color != val) { + sd->status.hair_color=val; + if (sd->status.guild_id) //Update Guild Window. [Skotlex] + intif_guild_change_memberinfo(sd->status.guild_id,sd->status.account_id,sd->status.char_id, + GMI_HAIR_COLOR,&sd->status.hair_color,sizeof(sd->status.hair_color)); + } + break; + case LOOK_CLOTHES_COLOR: //Use the battle_config limits! [Skotlex] + val = cap_value(val, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); - sd->status.clothes_color=val; - break; - case LOOK_SHIELD: - sd->status.shield=val; - break; - case LOOK_SHOES: - break; - case LOOK_ROBE: - sd->status.robe = val; - break; + sd->status.clothes_color=val; + break; + case LOOK_SHIELD: + sd->status.shield=val; + break; + case LOOK_SHOES: + break; + case LOOK_ROBE: + sd->status.robe = val; + break; } clif_changelook(&sd->bl,type,val); return 0; diff --git a/src/map/skill.h b/src/map/skill.h index 3e2fc7936..d1d7d1894 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -95,6 +95,7 @@ enum e_skill_inf2 { INF2_NO_ENEMY = 0x1000, INF2_NOLP = 0x2000, // Spells that can ignore Land Protector INF2_CHORUS_SKILL = 0x4000, // Chorus skill + INF2_CLONE_NOCOPY = 0x8000, // Clones will not copy this skill }; -- cgit v1.2.3-70-g09d2