summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-15 17:13:04 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-15 17:13:04 +0000
commitc25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead (patch)
treeb55395038c48dc99235e7385fbd43df5645e464a /src/map/mob.c
parent86b35597e549392cf2db3974fc140a50e021b5a0 (diff)
downloadhercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.gz
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.bz2
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.tar.xz
hercules-c25d6f5e6c3f092f70bf28cb0a3ac71e2ab89ead.zip
* Some serious code cleanups
- adjusted @reloadbattleconf to not depend on variable ordering - changed all battle vars to 'int' (removes pointless duplicit coding) - added min, max and default columns to battle config data structure - added properly bounded values for these columns (or at least tried to) - battle-conf loading will now complain if it finds unknown settings, and will reject values that are outside of the allowed range - added CHATROOM_TITLE_SIZE and CHATROOM_PASS_SIZE - partially cleaned up chatroom manipulation code * Fixed 'Job_Professer' typo in mage jobchange quest git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index d15a50a27..89642430e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1495,11 +1495,8 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
&& check_distance_blxy(&dlist->first_sd->bl, dlist->x, dlist->y, AUTOLOOT_DISTANCE)
#endif
) { //Autoloot.
- if (party_share_loot(
- dlist->first_sd->status.party_id?
- party_search(dlist->first_sd->status.party_id):
- NULL,
- dlist->first_sd,&ditem->item_data,dlist->first_sd->bl.id) == 0
+ if (party_share_loot(party_search(dlist->first_sd->status.party_id),
+ dlist->first_sd, &ditem->item_data, dlist->first_sd->bl.id) == 0
) {
ers_free(item_drop_ers, ditem);
return;
@@ -2344,7 +2341,7 @@ int mob_class_change (struct mob_data *md, int class_)
clif_mob_class_change(md,class_);
status_calc_mob(md, 3);
- if (battle_config.monster_class_change_full_recover) {
+ if (battle_config.monster_class_change_recover) {
memset(md->dmglog, 0, sizeof(md->dmglog));
md->tdmg = 0;
} else {
@@ -2465,7 +2462,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
amount+=k; //Increase final value by same amount to preserve total number to summon.
}
- if (!battle_config.monster_class_change_full_recover &&
+ if (!battle_config.monster_class_change_recover &&
(skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS))
hp_rate = 100*md2->status.hp/md2->status.max_hp;