summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.c2
-rw-r--r--src/char/int_auction.c2
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char/int_rodex.c12
-rw-r--r--src/map/clif.c14
-rw-r--r--src/map/guild.c2
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/itemdb.c20
-rw-r--r--src/map/skill.c32
-rw-r--r--src/map/status.c14
-rw-r--r--src/map/storage.c4
11 files changed, 53 insertions, 53 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 12dc2554a..fc2f28997 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -927,7 +927,7 @@ int char_memitemdata_to_sql(const struct item *p_items, int guid, enum inventory
if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf)))
Sql_ShowDebug(inter->sql_handle);
}
-
+
aFree(deletes);
}
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 2dd65f213..05914c3a0 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -113,7 +113,7 @@ unsigned int inter_auction_create(struct auction_data *auction)
StrBuf->Printf(&buf, ",'%d'", auction->item.card[j]);
for (j = 0; j < MAX_ITEM_OPTIONS; j++)
StrBuf->Printf(&buf, ",'%d','%d'", auction->item.option[j].index, auction->item.option[j].value);
-
+
StrBuf->AppendStr(&buf, ")");
stmt = SQL->StmtMalloc(inter->sql_handle);
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 4b6800699..764387981 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -633,7 +633,7 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id)
return 0; //Member not found?
mapif->party_withdraw(party_id, account_id, char_id);
-
+
j = p->party.member[i].lv;
if (p->party.member[i].online > 0)
p->party.count--;
diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c
index 1fa76e4db..c45c88eb0 100644
--- a/src/char/int_rodex.c
+++ b/src/char/int_rodex.c
@@ -200,8 +200,8 @@ static bool inter_rodex_hasnew(int char_id, int account_id)
{
int count = 0;
char *data;
-
- if (SQL_ERROR == SQL->Query(inter->sql_handle,
+
+ if (SQL_ERROR == SQL->Query(inter->sql_handle,
"SELECT count(*) FROM `%s` WHERE ("
"(`expire_date` > '%d' AND (`receiver_id` = '%d' OR `receiver_accountid` = '%d')) OR"
"(`sender_id` = '%d' AND `expire_date` <= '%d' AND `send_date` + '%d' > '%d')"
@@ -212,7 +212,7 @@ static bool inter_rodex_hasnew(int char_id, int account_id)
Sql_ShowDebug(inter->sql_handle);
return -1;
}
-
+
if (SQL_SUCCESS != SQL->NextRow(inter->sql_handle))
return false;
@@ -407,12 +407,12 @@ void mapif_parse_rodex_updatemail(int fd)
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `is_read` = 1 WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
break;
-
+
case 1: // Get Zeny
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
break;
-
+
case 2: // Get Items
if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_item_db, mail_id))
Sql_ShowDebug(inter->sql_handle);
@@ -436,7 +436,7 @@ void mapif_rodex_send(int fd, int sender_id, int receiver_id, int receiver_accou
{
Assert_retv(sender_id >= 0);
Assert_retv(receiver_id + receiver_accountid > 0);
-
+
WFIFOHEAD(fd,15);
WFIFOW(fd,0) = 0x3897;
WFIFOL(fd,2) = sender_id;
diff --git a/src/map/clif.c b/src/map/clif.c
index 3c93bae57..5454bed2d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2414,9 +2414,9 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
int clif_add_item_options(struct ItemOptions *buf, const struct item *it)
{
int i = 0, j = 0, total_options = 0;
-
+
nullpo_ret(buf);
-
+
// Append the buffer with existing options first.
for (i = 0; i < MAX_ITEM_OPTIONS; i++) {
if (it->option[i].index) {
@@ -2433,7 +2433,7 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
WBUFW(buf, j * 5 + 2) = 0;
WBUFB(buf, j * 5 + 4) = 0;
}
-
+
return total_options;
}
@@ -19346,7 +19346,7 @@ void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
int char_id = 0, base_level = 0;
short class = 0;
char name[NAME_LENGTH];
-
+
safestrncpy(name, rPacket->Name, NAME_LENGTH);
rodex->check_player(sd, name, &base_level, &char_id, &class);
@@ -19549,7 +19549,7 @@ void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rod
nullpo_retv(sd);
nullpo_retv(msg);
-
+
fd = sd->fd;
body_len = (int)strlen(msg->body) + 1;
size = sizeof(*sPacket);
@@ -19626,7 +19626,7 @@ void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attrib
void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_ZENY_FROM_MAIL *rPacket = RFIFOP(fd, 0);
-
+
rodex->get_zeny(sd, rPacket->opentype, rPacket->MailID);
}
@@ -19667,7 +19667,7 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
nullpo_retv(sd);
fd = sd->fd;
-
+
WFIFOHEAD(fd, sizeof(*sPacket));
sPacket = WFIFOP(fd, 0);
sPacket->PacketType = rodexgetitem;
diff --git a/src/map/guild.c b/src/map/guild.c
index 838df3943..092e066c3 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1823,7 +1823,7 @@ int guild_gm_change(int guild_id, int char_id)
nullpo_ret(g);
ARR_FIND(0, MAX_GUILD, i, g->member[i].char_id == char_id);
-
+
if (i == MAX_GUILD ) {
// Not part of the guild
return 0;
diff --git a/src/map/intif.c b/src/map/intif.c
index c33fbe55f..1458fc710 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -2508,7 +2508,7 @@ void intif_parse_RodexNotifications(int fd)
/// Updates a mail
/// flag:
/// 0 - user Read
-/// 1 - user got Zeny
+/// 1 - user got Zeny
/// 2 - user got Items
/// 3 - delete
int intif_rodex_updatemail(int64 mail_id, int8 flag)
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 96eced725..7fedb19ae 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1336,11 +1336,11 @@ void itemdb_read_options(void)
if (!libconfig->load_file(&item_options_db, filepath))
return;
-
+
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = filepath;
#endif // ENABLE_CASE_CHECK
-
+
if ((ito=libconfig->setting_get_member(item_options_db.root, "item_options_db")) == NULL) {
ShowError("itemdb_read_options: '%s' could not be loaded.\n", filepath);
libconfig->destroy(&item_options_db);
@@ -1399,7 +1399,7 @@ void itemdb_read_options(void)
ShowError("itemdb_read_options: Script code not found for entry %s (Id: %d) in '%s', skipping...\n", str, t_opt.index, filepath);
continue;
}
-
+
/* Set Script */
t_opt.script = *str ? script->parse(str, filepath, t_opt.index, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
@@ -1416,11 +1416,11 @@ void itemdb_read_options(void)
count++;
}
-
+
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = NULL;
#endif // ENABLE_CASE_CHECK
-
+
libconfig->destroy(&item_options_db);
VECTOR_CLEAR(duplicate_id);
@@ -1807,10 +1807,10 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
if( entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_refine )
entry->flag.no_refine = 1;
-
+
if (entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_options)
entry->flag.no_options = 1;
-
+
if (entry->flag.available != 1) {
entry->flag.available = 1;
entry->view_id = 0;
@@ -2066,7 +2066,7 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char *
if( (t = libconfig->setting_get_member(it, "Refine")) )
id.flag.no_refine = libconfig->setting_get_bool(t) ? 0 : 1;
-
+
if ((t = libconfig->setting_get_member(it, "DisableOptions")))
id.flag.no_options = libconfig->setting_get_bool(t) ? 1 : 0;
@@ -2451,10 +2451,10 @@ int itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap)
int itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap)
{
struct item_option *ito = DB->data2ptr(data);
-
+
if (ito->script != NULL)
script->free_code(ito->script);
-
+
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 25d85e746..f263b0690 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -476,9 +476,9 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b
return 0;
// Couldn't preserve 3rd Class/Summoner skills except only when using Reproduce skill. [Jobbie]
- if (!(sd->sc.data[SC__REPRODUCE]) &&
- ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) ||
- (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) ||
+ if (!(sd->sc.data[SC__REPRODUCE]) &&
+ ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) ||
+ (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) ||
(skill_id >= GC_DARKCROW && skill_id <= SU_FRESHSHRIMP)))
return 0;
// Reproduce will only copy skills according on the list. [Jobbie]
@@ -19530,7 +19530,7 @@ void skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_db *
}
}
}
-
+
/**
* Validates "SkillInfo" when reading skill_db.conf
* @param conf struct, pointer to skill configuration
@@ -20442,7 +20442,7 @@ void skill_validate_additional_fields(struct config_setting_t *conf, struct s_sk
bool skill_validate_skilldb(struct s_skill_db *sk, const char *source)
{
int idx;
-
+
nullpo_retr(false, sk);
idx = skill->get_index(sk->nameid);
if (idx == 0) {
@@ -20460,10 +20460,10 @@ bool skill_validate_skilldb(struct s_skill_db *sk, const char *source)
strdb_iput(skill->name2id_db, skill->dbs->db[idx].name, skill->dbs->db[idx].nameid);
/* Set Name to Id script constants */
script->set_constant2(skill->dbs->db[idx].name, (int)skill->dbs->db[idx].nameid, false, false);
-
+
return true;
}
-
+
/**
* Reads skill_db.conf from relative filepath and processes [ Smokexyz/Hercules ]
* entries into the skill database.
@@ -20477,11 +20477,11 @@ bool skill_read_skilldb(const char *filename)
char filepath[256];
int count=0, index=0;
bool duplicate[MAX_SKILL] = {0};
-
+
nullpo_retr(false, filename);
sprintf(filepath,"db/%s",filename);
-
+
if (!libconfig->load_file(&skilldb, filepath)) {
return false; // Libconfig error report.
}
@@ -20503,9 +20503,9 @@ bool skill_read_skilldb(const char *filename)
ShowError("skill_read_skilldb: Skill Id not specified for entry %d in '%s', skipping...\n", index, filepath );
continue;
}
-
+
tmp_db.nameid = skill_id;
-
+
if((idx = skill->get_index(skill_id)) == 0) {
ShowError("skill_read_skilldb: Skill Id %d is out of range, or within a reserved range (for guild, homunculus, mercenary or elemental skills). skipping...\n", idx);
continue;
@@ -20515,7 +20515,7 @@ bool skill_read_skilldb(const char *filename)
ShowWarning("skill_read_skilldb: Duplicate Skill Id %d in entry %d in '%s', skipping...\n", skill_id, index, filepath);
continue;
}
-
+
/* Skill Name Constant */
if (!libconfig->setting_lookup_mutable_string(conf, "Name", tmp_db.name, sizeof(tmp_db.name))) {
ShowError("skill_read_skilldb: Name not specified for skill Id %d in '%s', skipping...\n", skill_id, filepath);
@@ -20705,12 +20705,12 @@ bool skill_read_skilldb(const char *filename)
/* Additional Fields for Plugins */
skill->validate_additional_fields(conf, &tmp_db);
-
+
// Validate the skill entry, add it to the duplicate array and increment count on success.
if ((duplicate[idx] = skill->validate_skilldb(&tmp_db, filepath)))
count++;
}
-
+
libconfig->destroy(&skilldb);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath);
@@ -20742,7 +20742,7 @@ void skill_readdb(bool minimal)
safestrncpy(skill->dbs->db[0].desc, "Unknown Skill", sizeof(skill->dbs->db[0].desc));
itemdb->name_constants(); // refresh ItemDB constants before loading of skills
-
+
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = DBPATH"skill_db.conf";
#endif // ENABLE_CASE_CHECK
@@ -20753,7 +20753,7 @@ void skill_readdb(bool minimal)
if (minimal)
return;
-
+
skill->init_unit_layout();
sv->readdb(map->db_path, "produce_db.txt", ',', 4, 4+2*MAX_PRODUCE_RESOURCE, MAX_SKILL_PRODUCE_DB, skill->parse_row_producedb);
sv->readdb(map->db_path, "create_arrow_db.txt", ',', 1+2, 1+2*MAX_ARROW_RESOURCE, MAX_SKILL_ARROW_DB, skill->parse_row_createarrowdb);
diff --git a/src/map/status.c b/src/map/status.c
index e04769e3f..e0893aa36 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2651,31 +2651,31 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
}
}
}
-
+
/* parse item options [Smokexyz] */
for (i = 0; i < EQI_MAX; i++) {
status->current_equip_item_index = index = sd->equip_index[i];
status->current_equip_option_index = -1;
-
+
if (i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index)
continue;
else if (i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index)
continue;
else if (i == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index))
continue;
-
+
if (index >= 0 && sd->inventory_data[index]) {
int j = 0;
for (j = 0; j < MAX_ITEM_OPTIONS; j++) {
int16 option_index = sd->status.inventory[index].option[j].index;
struct item_option *ito = NULL;
-
+
if (option_index == 0 || (ito = itemdb->option_exists(option_index)) == NULL || ito->script == NULL)
continue;
-
+
status->current_equip_option_index = j;
script->run(ito->script, 0, sd->bl.id, 0);
-
+
if (calculating == 0) //Abort, script->run his function. [Skotlex]
return 1;
}
@@ -13329,7 +13329,7 @@ int status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *n
int bonus[MAX_REFINE], rnd_bonus[MAX_REFINE];
int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE];
int i, j;
-
+
memset(&duplicate, 0, sizeof(duplicate));
memset(&bonus, 0, sizeof(bonus));
memset(&rnd_bonus, 0, sizeof(rnd_bonus));
diff --git a/src/map/storage.c b/src/map/storage.c
index 01e7c7c27..716abd623 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -201,7 +201,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo
clif->storageitemadded(sd, it, i, amount);
sd->storage.save = true; // set a save flag.
-
+
return 0;
}
}
@@ -249,7 +249,7 @@ int storage_delitem(struct map_session_data* sd, int n, int amount)
Assert_retr(1, n >= 0 && n < VECTOR_LENGTH(sd->storage.item));
it = &VECTOR_INDEX(sd->storage.item, n);
-
+
Assert_retr(1, amount <= it->amount);
Assert_retr(1, it->nameid > 0);