summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorDastgir <dastgir@users.noreply.github.com>2015-12-25 21:54:46 +0530
committerDastgir <dastgir@users.noreply.github.com>2015-12-25 21:54:46 +0530
commit22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa (patch)
tree3b5e3330375ef0c5533698a2deb70a8a20bbd638 /src/map/mob.c
parent87f3e94c164cdd3f4b0b656285140f931fb90860 (diff)
parent2dd2e23be8031e007708b6641736f5821c2abb82 (diff)
downloadhercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.gz
hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.bz2
hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.xz
hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.zip
Merge pull request #1009 from Jedzkie/ItemDB_Updates
ItemDB Updates
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 22b1266dd..d8fefa61a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2747,39 +2747,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);