diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2015-12-23 16:02:13 +0800 |
---|---|---|
committer | Jedzkie <jedzkie13@rocketmail.com> | 2015-12-23 16:02:13 +0800 |
commit | e9129d00278edc75a45a1d5d47345c9d9f2460c3 (patch) | |
tree | 3ef0e959c65a3d40e731e26c5b2b170059f9a1ed /src/map/mob.c | |
parent | 248f245f078ddba531cf771dcd42ad9e0bd0f7c7 (diff) | |
download | hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.gz hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.bz2 hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.tar.xz hercules-e9129d00278edc75a45a1d5d47345c9d9f2460c3.zip |
Update:
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL
- Rename FOOD_STOR to FOOD_STORAGE
- Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 0d6055b13..d0073d01b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2741,39 +2741,39 @@ int mob_random_class (int *value, size_t count) /*========================================== * Change mob base class *------------------------------------------*/ -int mob_class_change (struct mob_data *md, int class_) -{ +int mob_class_change (struct mob_data *md, int class_) { + int64 tick = timer->gettick(), c = 0; int i, hp_rate; nullpo_ret(md); - if( md->bl.prev == NULL ) + if (md->bl.prev == NULL) return 0; - //Disable class changing for some targets... + // Disable class changing for some targets... if (md->guardian_data) - return 0; //Guardians/Emperium + return 0; // Guardians/Emperium - if( mob_is_treasure(md) ) - return 0; //Treasure Boxes + if (mob_is_treasure(md)) + return 0; // Treasure Boxes - if( md->special_state.ai > AI_ATTACK ) - return 0; //Marine Spheres and Floras. + if (md->special_state.ai > AI_ATTACK) + return 0; // Marine Spheres and Floras. - if( mob->is_clone(md->class_) ) - return 0; //Clones + if (mob->is_clone(md->class_)) + return 0; // Clones - if( md->class_ == class_ ) - return 0; //Nothing to change. + if (md->class_ == class_) + return 0; // Nothing to change. hp_rate = get_percentage(md->status.hp, md->status.max_hp); md->class_ = class_; md->db = mob->db(class_); - if (battle_config.override_mob_names==1) - memcpy(md->name,md->db->name,NAME_LENGTH); + if (battle_config.override_mob_names == 1) + memcpy(md->name, md->db->name, NAME_LENGTH); else - memcpy(md->name,md->db->jname,NAME_LENGTH); + memcpy(md->name, md->db->jname, NAME_LENGTH); mob_stop_attack(md); mob_stop_walking(md, STOPWALKING_FLAG_NONE); |