summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-01-12 17:12:53 +0100
committerHaru <haru@dotalux.com>2016-01-12 17:32:17 +0100
commit77ebd051325e8609da224295d788a1d473521d3a (patch)
treed6a9afa8272efd4489b1e554a2662f1bc0d4cb5c
parented05ed85c0bc44980168f730d02dfd379a2bfda9 (diff)
downloadhercules-77ebd051325e8609da224295d788a1d473521d3a.tar.gz
hercules-77ebd051325e8609da224295d788a1d473521d3a.tar.bz2
hercules-77ebd051325e8609da224295d788a1d473521d3a.tar.xz
hercules-77ebd051325e8609da224295d788a1d473521d3a.zip
Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/common/socket.c2
-rw-r--r--src/map/battle.c5
-rw-r--r--src/map/clif.c32
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/packets.h6
-rw-r--r--src/map/packets_struct.h6
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/status.c104
-rw-r--r--src/map/status.h14
-rw-r--r--src/map/unit.c2
12 files changed, 95 insertions, 90 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index ad90355a3..740c07bdc 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1103,7 +1103,7 @@ static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) {
clear++;
}
list++;
- }
+ }
dbi_destroy(iter);
if( access_debug ){
diff --git a/src/map/battle.c b/src/map/battle.c
index 3b3ea2047..44adef051 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4118,7 +4118,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
#else
short totaldef = tstatus->def2 + (short)status->get_def(target);
#endif
- if ( sd ) wd.damage += sd->bonus.arrow_atk;
+ if (sd != NULL)
+ wd.damage += sd->bonus.arrow_atk;
md.damage = (int)(3 * (1 + wd.damage) * (5 + skill_lv) / 5.0f);
md.damage -= totaldef;
@@ -4583,7 +4584,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
skill_id == NJ_KIRIKAGE))
{
short cri = sstatus->cri;
- if (sd) {
+ if (sd != NULL) {
// if show_katar_crit_bonus is enabled, it already done the calculation in status.c
if (!battle_config.show_katar_crit_bonus && sd->status.weapon == W_KATAR) {
cri <<= 1;
diff --git a/src/map/clif.c b/src/map/clif.c
index f30d87770..1cd18b68d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1010,7 +1010,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
#endif
#if PACKETVER >= 20131223
p.AID = bl->id;
- p.GID = (sd) ? sd->status.char_id : 0; // CCODE
+ p.GID = (sd) ? sd->status.char_id : 0; // CCODE
#else
p.GID = bl->id;
#endif
@@ -1151,7 +1151,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
#endif
#if PACKETVER >= 20131223
p.AID = bl->id;
- p.GID = (sd) ? sd->status.char_id : 0; // CCODE
+ p.GID = (sd) ? sd->status.char_id : 0; // CCODE
#else
p.GID = bl->id;
#endif
@@ -1246,7 +1246,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
#endif
#if PACKETVER >= 20131223
p.AID = bl->id;
- p.GID = (tsd) ? tsd->status.char_id : 0; // CCODE
+ p.GID = (tsd) ? tsd->status.char_id : 0; // CCODE
#else
p.GID = bl->id;
#endif
@@ -2333,9 +2333,9 @@ void clif_add_random_options(unsigned char* buf, struct item* item)
int i;
nullpo_retv(buf);
for (i = 0; i < 5; i++){
- WBUFW(buf,i*5+0) = 0; // OptIndex
- WBUFW(buf,i*5+2) = 0; // Value
- WBUFB(buf,i*5+4) = 0; // Param1
+ WBUFW(buf,i*5+0) = 0; // OptIndex
+ WBUFW(buf,i*5+2) = 0; // Value
+ WBUFB(buf,i*5+4) = 0; // Param1
}
}
@@ -4330,7 +4330,7 @@ int clif_damage(struct block_list* src, struct block_list* dst, int sdelay, int
p.leftDamage = damage2;
}
#if PACKETVER >= 20131223
- p.is_sp_damaged = 0; // [ToDo] IsSPDamage - Displays blue digits.
+ p.is_sp_damaged = 0; // TODO: IsSPDamage - Displays blue digits.
#endif
if(disguised(dst)) {
@@ -5078,7 +5078,7 @@ int clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick
// type 6 (ACTION_SKILL) skills. So we have to do a small
// hack to set all type 6 to be sent as type 8 ACTION_ATTACK_MULTIPLE
#if PACKETVER < 20131223
- WBUFB(buf, 32) = type;
+ WBUFB(buf, 32) = type;
#else
WBUFB(buf, 32) = (type == BDT_SKILL) ? BDT_MULTIHIT : type;
#endif
@@ -17566,18 +17566,18 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
p.PacketType = maptypeproperty2Type;
p.type = 0x28;
- p.flag.party = map->list[bl->m].flag.pvp ? 1 : 0; //PARTY
- p.flag.guild = (map->list[bl->m].flag.battleground || map_flag_gvg(bl->m)) ? 1 : 0; // GUILD
- p.flag.siege = (map->list[bl->m].flag.battleground || map_flag_gvg2(bl->m)) ? 1: 0; // SIEGE
- p.flag.mineffect = map_flag_gvg(bl->m) ? 1 : ( (sd && sd->state.lesseffect) ? 1 : 0); // USE_SIMPLE_EFFECT - Forcing /mineffect in castles during WoE (probably redundant? I'm not sure)
+ p.flag.party = map->list[bl->m].flag.pvp ? 1 : 0; //PARTY
+ p.flag.guild = (map->list[bl->m].flag.battleground || map_flag_gvg(bl->m)) ? 1 : 0; // GUILD
+ p.flag.siege = (map->list[bl->m].flag.battleground || map_flag_gvg2(bl->m)) ? 1: 0; // SIEGE
+ p.flag.mineffect = map_flag_gvg(bl->m) ? 1 : ( (sd && sd->state.lesseffect) ? 1 : 0); // USE_SIMPLE_EFFECT - Forcing /mineffect in castles during WoE (probably redundant? I'm not sure)
p.flag.nolockon = 0; // DISABLE_LOCKON - TODO
- p.flag.countpk = map->list[bl->m].flag.pvp ? 1 : 0; // COUNT_PK
- p.flag.nopartyformation = map->list[bl->m].flag.partylock ? 1 : 0; // NO_PARTY_FORMATION
- p.flag.bg = map->list[bl->m].flag.battleground ? 1 : 0; // BATTLEFIELD
+ p.flag.countpk = map->list[bl->m].flag.pvp ? 1 : 0; // COUNT_PK
+ p.flag.nopartyformation = map->list[bl->m].flag.partylock ? 1 : 0; // NO_PARTY_FORMATION
+ p.flag.bg = map->list[bl->m].flag.battleground ? 1 : 0; // BATTLEFIELD
p.flag.nocostume = (map->list[bl->m].flag.noviewid & EQP_COSTUME) ? 1 : 0; // DISABLE_COSTUMEITEM - Disables Costume Sprite
p.flag.usecart = 1; // USECART - TODO
p.flag.summonstarmiracle = 0; // SUNMOONSTAR_MIRACLE - TODO
- p.flag.SpareBits = 0; // UNUSED
+ p.flag.SpareBits = 0; // UNUSED
clif->send(&p,sizeof(p),bl,t);
#endif
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index d4fa34277..c2ce042ec 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -63,7 +63,7 @@ enum homun_id {
#define homun_alive(x) ((x) && (x)->homunculus.vaporize == HOM_ST_ACTIVE && (x)->battle_status.hp > 0)
#ifdef RENEWAL
-#define HOMUN_LEVEL_STATWEIGHT_VALUE 0
+#define HOMUN_LEVEL_STATWEIGHT_VALUE 0
#define APPLY_HOMUN_LEVEL_STATWEIGHT() \
do { \
hom->str_value = hom->agi_value = \
diff --git a/src/map/mob.c b/src/map/mob.c
index 4ed69ad01..2d94d78e3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2064,7 +2064,7 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) {
if (battle_config.show_mob_info&3)
clif->charnameack (0, &md->bl);
-
+
#if PACKETVER >= 20131223
// Resend ZC_NOTIFY_MOVEENTRY to Update the HP
if (battle_config.show_monster_hp_bar)
diff --git a/src/map/packets.h b/src/map/packets.h
index f468cd3df..6174d76d2 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2910,9 +2910,9 @@ packet(0x96e,-1,clif->ackmergeitems);
packet(0x08A8,26,clif->pFriendsListAdd,2);
packet(0x0817,5,clif->pHomMenu,2,4);
packet(0x0923,36,clif->pStoragePassword,0);
- packet(0x09e8,11,clif->pDull); // CZ_OPEN_MAILBOX
- packet(0x0a2e,6,clif->pDull); // TITLE
- packet(0x0a02,4); // ZC_DRESSROOM_OPEN
+ packet(0x09e8,11,clif->pDull); // CZ_OPEN_MAILBOX
+ packet(0x0a2e,6,clif->pDull); // TITLE
+ packet(0x0a02,4); // ZC_DRESSROOM_OPEN
#endif
#if PACKETVER >= 20150805 // RagexeRE
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 43ff0737f..cc8389a6b 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1157,9 +1157,9 @@ struct packet_hotkey {
char Rotate;
#endif
struct {
- char isSkill; // 0: Item, 1:Skill
- unsigned int ID; // Item/Skill ID
- short count; // Item Quantity/Skill Level
+ char isSkill; // 0: Item, 1:Skill
+ unsigned int ID; // Item/Skill ID
+ short count; // Item Quantity/Skill Level
} hotkey[MAX_HOTKEYS];
#else // not HOTKEY_SAVING
UNAVAILABLE_STRUCT;
diff --git a/src/map/script.c b/src/map/script.c
index 5752c8a31..5d87e6495 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11684,7 +11684,7 @@ BUILDIN(getmapflag)
case MF_RESET: script_pushint(st,map->list[m].flag.reset); break;
case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break;
case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break;
- case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break;
+ case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break;
}
}
@@ -11808,7 +11808,7 @@ BUILDIN(setmapflag) {
case MF_RESET: map->list[m].flag.reset = 1; break;
case MF_NOTOMB: map->list[m].flag.notomb = 1; break;
case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break;
- case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break;
+ case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break;
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index d9ced959a..a14f7a6c5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4374,7 +4374,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
clif->slide(src, x, y);
clif->fixpos(src); // the official server send these two packets.
skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag);
- if ( rnd() % 100 < 4 * skill_lv && skill_id == GC_DARKILLUSION )
+ if (rnd() % 100 < 4 * skill_lv && skill_id == GC_DARKILLUSION)
skill->castend_damage_id(src, bl, GC_CROSSIMPACT, skill_lv, tick, flag);
}
}
@@ -14843,7 +14843,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
}
if (sc->data[SC_MYSTICSCROLL])
VARCAST_REDUCTION(sc->data[SC_MYSTICSCROLL]->val1);
-
+
// Fixed cast reduction bonuses
if( sc->data[SC__LAZINESS] )
fixcast_r = max(fixcast_r, sc->data[SC__LAZINESS]->val2);
@@ -18083,7 +18083,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
return 0;
else {
int cursor;
- /** somehow, the timer vanished. (bugreport:8367) **/
+ /* somehow, the timer vanished. (bugreport:8367) */
ers_free(skill->cd_entry_ers, cd->entry[i]);
cd->entry[i] = NULL;
diff --git a/src/map/status.c b/src/map/status.c
index c755d8eb0..db8c0d6c5 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -862,38 +862,38 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_M_LIFEPOTION] = SI_M_LIFEPOTION;
status->dbs->IconChangeTable[SC_G_LIFEPOTION] = SI_G_LIFEPOTION;
status->dbs->IconChangeTable[SC_MYSTICPOWDER] = SI_MYSTICPOWDER;
-
+
// Eden Crystal Synthesis
status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1;
status->dbs->IconChangeTable[SC_QUEST_BUFF2] = SI_QUEST_BUFF2;
status->dbs->IconChangeTable[SC_QUEST_BUFF3] = SI_QUEST_BUFF3;
-
+
// Geffen Magic Tournament
status->dbs->IconChangeTable[SC_GEFFEN_MAGIC1] = SI_GEFFEN_MAGIC1;
status->dbs->IconChangeTable[SC_GEFFEN_MAGIC2] = SI_GEFFEN_MAGIC2;
status->dbs->IconChangeTable[SC_GEFFEN_MAGIC3] = SI_GEFFEN_MAGIC3;
status->dbs->IconChangeTable[SC_FENRIR_CARD] = SI_FENRIR_CARD;
-
+
// MVP Scrolls
status->dbs->IconChangeTable[SC_MVPCARD_TAOGUNKA] = SI_MVPCARD_TAOGUNKA;
status->dbs->IconChangeTable[SC_MVPCARD_MISTRESS] = SI_MVPCARD_MISTRESS;
status->dbs->IconChangeTable[SC_MVPCARD_ORCHERO] = SI_MVPCARD_ORCHERO;
status->dbs->IconChangeTable[SC_MVPCARD_ORCLORD] = SI_MVPCARD_ORCLORD;
-
+
// Mercenary Bonus Effects
status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
status->dbs->IconChangeTable[SC_MER_HP] = SI_MER_HP;
status->dbs->IconChangeTable[SC_MER_SP] = SI_MER_SP;
status->dbs->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
-
+
// Warlock Spheres
status->dbs->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
status->dbs->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
status->dbs->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
status->dbs->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
status->dbs->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
-
+
// Warlock Preserved spells
status->dbs->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
status->dbs->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
@@ -977,7 +977,7 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_REBOUND] = SI_REBOUND;
status->dbs->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
status->dbs->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
-
+
// Costumes
status->dbs->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
status->dbs->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
@@ -993,7 +993,7 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_TIME_ACCESSORY] = SI_TIME_ACCESSORY;
status->dbs->IconChangeTable[SC_MAGICAL_FEATHER] = SI_MAGICAL_FEATHER;
status->dbs->IconChangeTable[SC_BLOSSOM_FLUTTERING] = SI_BLOSSOM_FLUTTERING;
-
+
// Other SC which are not necessarily associated to skills.
status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] |= SCB_ASPD;
status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] |= SCB_ASPD;
@@ -1061,7 +1061,7 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_PHI_DEMON] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_MAGIC_CANDY] |= SCB_MATK | SCB_ALL;
status->dbs->ChangeFlagTable[SC_MYSTICPOWDER] |= SCB_FLEE | SCB_LUK;
-
+
// Cash Items
status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR;
status->dbs->ChangeFlagTable[SC_FOOD_AGI_CASH] |= SCB_AGI;
@@ -1069,14 +1069,14 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_FOOD_DEX_CASH] |= SCB_DEX;
status->dbs->ChangeFlagTable[SC_FOOD_INT_CASH] |= SCB_INT;
status->dbs->ChangeFlagTable[SC_FOOD_LUK_CASH] |= SCB_LUK;
-
+
// Mercenary Bonus Effects
status->dbs->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
status->dbs->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
status->dbs->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
status->dbs->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
status->dbs->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
-
+
// Guillotine Cross Poison Effects
status->dbs->ChangeFlagTable[SC_PARALYSE] |= SCB_FLEE | SCB_SPEED | SCB_ASPD;
status->dbs->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
@@ -1084,11 +1084,11 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
status->dbs->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT | SCB_FLEE;
status->dbs->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
-
+
// Royal Guard status
status->dbs->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK;
status->dbs->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF;
-
+
// Mechanic status
status->dbs->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED;
@@ -1116,7 +1116,7 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_STOMACHACHE] |= SCB_STR | SCB_AGI | SCB_VIT | SCB_INT | SCB_DEX | SCB_LUK | SCB_SPEED;
status->dbs->ChangeFlagTable[SC_PROMOTE_HEALTH_RESERCH] |= SCB_MAXHP | SCB_ALL;
status->dbs->ChangeFlagTable[SC_ENERGY_DRINK_RESERCH] |= SCB_MAXSP | SCB_ALL;
-
+
// Geffen Scrolls
status->dbs->ChangeFlagTable[SC_SKELSCROLL] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_DISTRUCTIONSCROLL] |= SCB_ALL;
@@ -1135,24 +1135,24 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT | SCB_FLEE;
status->dbs->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP;
status->dbs->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP;
-
+
// Eden Crystal Synthesis
status->dbs->ChangeFlagTable[SC_QUEST_BUFF1] |= SCB_BATK | SCB_MATK;
status->dbs->ChangeFlagTable[SC_QUEST_BUFF2] |= SCB_BATK | SCB_MATK;
status->dbs->ChangeFlagTable[SC_QUEST_BUFF3] |= SCB_BATK | SCB_MATK;
-
+
// Geffen Magic Tournament
status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC1] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC2] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC3] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_FENRIR_CARD] |= SCB_MATK | SCB_ALL;
-
+
// MVP Scrolls
status->dbs->ChangeFlagTable[SC_MVPCARD_TAOGUNKA] |= SCB_MAXHP | SCB_DEF | SCB_MDEF;
status->dbs->ChangeFlagTable[SC_MVPCARD_MISTRESS] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_MVPCARD_ORCHERO] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL;
-
+
// Costumes
status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
@@ -1192,7 +1192,7 @@ void initChangeTables(void) {
status->dbs->DisplayType[SC_BLOOD_SUCKER] = true;
status->dbs->DisplayType[SC__SHADOWFORM] = true;
status->dbs->DisplayType[SC_MONSTER_TRANSFORM] = true;
-
+
// Costumes
status->dbs->DisplayType[SC_MOONSTAR] = true;
status->dbs->DisplayType[SC_SUPER_STAR] = true;
@@ -2500,7 +2500,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
else if(sd->inventory_data[index]->type == IT_ARMOR) {
int r = sd->status.inventory[index].refine;
-
+
if ( (!battle_config.costume_refine_def && itemdb_is_costumeequip(sd->inventory_data[index]->equip)) ||
(!battle_config.shadow_refine_def && itemdb_is_shadowequip(sd->inventory_data[index]->equip))
)
@@ -3110,7 +3110,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->magic_addele[ELE_WIND] += 25;
if (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3)
sd->magic_addele[ELE_EARTH] += 25;
-
+
// Geffen Scrolls
if (sc->data[SC_SKELSCROLL]) {
#ifdef RENEWAL
@@ -3136,11 +3136,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
if (sc->data[SC_IMMUNITYSCROLL])
sd->subele[ELE_NEUTRAL] += sc->data[SC_IMMUNITYSCROLL]->val1;
-
+
// Geffen Magic Tournament
if (sc->data[SC_GEFFEN_MAGIC1]) {
sd->right_weapon.addrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC1]->val1;
- sd->left_weapon.addrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC1]->val1;
+ sd->left_weapon.addrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC1]->val1;
}
if (sc->data[SC_GEFFEN_MAGIC2])
sd->magic_addrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC2]->val1;
@@ -4190,10 +4190,14 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
if ( sd->status.shield )
amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
switch ( sd->status.weapon ) {
- case W_BOW: case W_MUSICAL:
- case W_WHIP: case W_REVOLVER:
- case W_RIFLE: case W_GATLING:
- case W_SHOTGUN: case W_GRENADE:
+ case W_BOW:
+ case W_MUSICAL:
+ case W_WHIP:
+ case W_REVOLVER:
+ case W_RIFLE:
+ case W_GATLING:
+ case W_SHOTGUN:
+ case W_GRENADE:
temp = st->dex * st->dex / 7.0f + st->agi * st->agi * 0.5f;
break;
default:
@@ -4271,12 +4275,14 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_
str = (int)(dstr + (float)dex / 5 + (float)st->luk / 3 + (float)BL_UCCAST(BL_PC, bl)->status.base_level / 4);
else if (bl->type == BL_MOB)
str = dstr + BL_UCCAST(BL_MOB, bl)->level;
- //else if (bl->type == BL_MER) // FIXME: What should go here?
- // str = dstr + BL_UCCAST(BL_MER, bl)->level;
-#else
+#if 0
+ else if (bl->type == BL_MER) // FIXME: What should go here?
+ str = dstr + BL_UCCAST(BL_MER, bl)->level;
+#endif // 0
+#else // ! RENEWAL
if (bl->type == BL_PC)
str += dex / 5 + st->luk / 5;
-#endif
+#endif // RENEWAL
return cap_value(str, 0, USHRT_MAX);
}
@@ -4813,7 +4819,7 @@ unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc,
batk += 100 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1;
if (sc->data[SC_BATTLESCROLL])
batk += batk * sc->data[SC_BATTLESCROLL]->val1 / 100;
-
+
// Eden Crystal Synthesis
if (sc->data[SC_QUEST_BUFF1])
batk += sc->data[SC_QUEST_BUFF1]->val1;
@@ -4998,7 +5004,7 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc,
matk += sc->data[SC_MTF_MATK]->val1;
if (sc->data[SC_MYSTICSCROLL])
matk += matk * sc->data[SC_MYSTICSCROLL]->val1 / 100;
-
+
// Eden Crystal Synthesis
if (sc->data[SC_QUEST_BUFF1])
matk += sc->data[SC_QUEST_BUFF1]->val1;
@@ -5006,7 +5012,7 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc,
matk += sc->data[SC_QUEST_BUFF2]->val1;
if (sc->data[SC_QUEST_BUFF3])
matk += sc->data[SC_QUEST_BUFF3]->val1;
-
+
// Geffen Magic Tournament
if (sc->data[SC_FENRIR_CARD])
matk += sc->data[SC_FENRIR_CARD]->val1;
@@ -5115,7 +5121,7 @@ signed short status_calc_hit(struct block_list *bl, struct status_change *sc, in
hit += sc->data[SC_ACARAJE]->val1;
if (sc->data[SC_BUCHEDENOEL])
hit += sc->data[SC_BUCHEDENOEL]->val3;
-
+
return (short)cap_value(hit, 1, SHRT_MAX);
}
@@ -5616,10 +5622,8 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc
val = max( val, sc->data[SC_MELON_BOMB]->val1 );
if (sc->data[SC_STOMACHACHE])
val = max(val, sc->data[SC_STOMACHACHE]->val2);
-
- if( sc->data[SC_MARSHOFABYSS] ) // It stacks to other statuses so always put this at the end.
- val = max( 50, val + 10 * sc->data[SC_MARSHOFABYSS]->val1 );
-
+ if (sc->data[SC_MARSHOFABYSS]) // It stacks to other statuses so always put this at the end.
+ val = max(50, val + 10 * sc->data[SC_MARSHOFABYSS]->val1);
if (sc->data[SC_MOVHASTE_POTION]) { // Doesn't affect the movement speed by Quagmire, Decrease Agi, Slow Grace [Frost]
if (sc->data[SC_DEC_AGI] || sc->data[SC_QUAGMIRE] || sc->data[SC_DONTFORGETME])
return 0;
@@ -12814,13 +12818,13 @@ bool status_readdb_sizefix(char* fields[], int columns, int current)
/**
* Processes a refine_db.conf entry.
*
- * @param *r Libconfig setting entry. It is expected to be valid and it
- * won't be freed (it is care of the caller to do so if
- * necessary)
- * @param n Ordinal number of the entry, to be displayed in case of
- * validation errors.
- * @param *source Source of the entry (file name), to be displayed in case of
- * validation errors.
+ * @param r Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param n Ordinal number of the entry, to be displayed in case of
+ * validation errors.
+ * @param source Source of the entry (file name), to be displayed in case of
+ * validation errors.
* @return # of the validated entry, or 0 in case of failure.
*/
int status_readdb_refine_libconfig_sub(config_setting_t *r, const char *name, const char *source)
@@ -12831,7 +12835,7 @@ int status_readdb_refine_libconfig_sub(config_setting_t *r, const char *name, co
nullpo_ret(r);
nullpo_ret(name);
nullpo_ret(source);
-
+
if (strncmp(name, "Armors", 6) == 0) {
type = REFINE_TYPE_ARMOR;
} else if (strncmp(name, "WeaponLevel", 11) != 0 || !strspn(&name[strlen(name)-1], "0123456789") || (type = atoi(strncpy(lv, name+11, 2))) == REFINE_TYPE_ARMOR) {
@@ -12920,14 +12924,14 @@ int status_readdb_refine_libconfig(const char *filename) {
config_setting_t *r;
char filepath[256];
int i = 0, count = 0,type = 0;
-
+
sprintf(filepath, "%s/%s", map->db_path, filename);
memset(&duplicate,0,sizeof(duplicate));
if( libconfig->read_file(&refine_db_conf, filepath) ) {
ShowError("can't read %s\n", filepath);
return 0;
}
-
+
while((r = libconfig->setting_get_elem(refine_db_conf.root,i++))) {
char *name = config_setting_name(r);
if((type=status->readdb_refine_libconfig_sub(r, name, filename))) {
@@ -12939,7 +12943,7 @@ int status_readdb_refine_libconfig(const char *filename) {
}
libconfig->destroy(&refine_db_conf);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
-
+
return count;
}
diff --git a/src/map/status.h b/src/map/status.h
index 51ca1e78b..be6d4c209 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -758,13 +758,13 @@ typedef enum sc_type {
SC_MTF_MSP,
SC_MTF_PUMPKIN,
SC_MTF_HITFLEE,
-
+
SC_LJOSALFAR,
SC_MERMAID_LONGING,
-
+
SC_ACARAJE, // 590
SC_TARGET_ASPD,
-
+
// Geffen Scrolls
SC_SKELSCROLL,
SC_DISTRUCTIONSCROLL,
@@ -775,25 +775,25 @@ typedef enum sc_type {
SC_ARMORSCROLL,
SC_FREYJASCROLL,
SC_SOULSCROLL, // 600
-
+
// Eden Crystal Synthesis
SC_QUEST_BUFF1,
SC_QUEST_BUFF2,
SC_QUEST_BUFF3,
-
+
// Geffen Magic Tournament
SC_GEFFEN_MAGIC1,
SC_GEFFEN_MAGIC2,
SC_GEFFEN_MAGIC3,
SC_FENRIR_CARD,
-
+
SC_ATKER_ASPD,
SC_ATKER_MOVESPEED,
SC_FOOD_CRITICALSUCCESSVALUE, // 610
SC_CUP_OF_BOZA,
SC_OVERLAPEXPUP,
SC_MORA_BUFF,
-
+
// MVP Scrolls
SC_MVPCARD_TAOGUNKA,
SC_MVPCARD_MISTRESS,
diff --git a/src/map/unit.c b/src/map/unit.c
index 03334f7f3..26104e4e0 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -121,7 +121,7 @@ int unit_walktoxy_sub(struct block_list *bl)
#ifdef OFFICIAL_WALKPATH
if( !path->search_long(NULL, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, CELL_CHKNOPASS) // Check if there is an obstacle between
- && wpd.path_len > 14 // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett]
+ && wpd.path_len > 14 // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett]
&& (bl->type != BL_NPC) ) // If type is a NPC, please disregard.
return 0;
#endif