summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c10
-rw-r--r--src/map/skill.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 67c44574d..ca12ba0eb 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2275,6 +2275,16 @@ int mob_class_change (struct mob_data *md, int class_)
if (md->bl.prev == NULL)
return 0;
+ //Disable class changing for some targets...
+ if (md->guardian_data)
+ return 0; //Guardians/Emperium
+
+ if (md->class_ >= 1324 && md->class_ <= 1363)
+ return 0; //Treasure Boxes
+
+ if (mob_is_clone(md->class_))
+ return 0; //Clones
+
hp_rate = md->status.hp*100/md->status.max_hp;
md->db = mob_db(class_);
if (battle_config.override_mob_names==1)
diff --git a/src/map/skill.c b/src/map/skill.c
index 52167dcfc..83954c9a2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1438,10 +1438,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
//Polymorph
if(sd && sd->classchange && attack_type&BF_WEAPON &&
- dstmd && !(tstatus->mode&MD_BOSS) && !dstmd->guardian_data &&
- (dstmd->class_ < 1324 || dstmd->class_ > 1363) && //Treasure boxes
- !mob_is_clone(dstmd->class_) &&
- (rand()%10000 < sd->classchange))
+ dstmd && !(tstatus->mode&MD_BOSS) &&
+ (rand()%10000 < sd->classchange))
{
struct mob_db *mob;
int class_;