summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-18 13:09:16 +0200
committerHaru <haru@dotalux.com>2015-09-25 12:55:36 +0200
commit1aea178ef7cdb76eda5600540b5fbd29fd54ff88 (patch)
tree855d4feafba212d7f36872c1b46814c1f1a85e75 /src/map/party.c
parente99bf73af31a8b1f09b9ce033c16832ee5cac51d (diff)
downloadhercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.gz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.bz2
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.xz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.zip
More aggressive whitespace cleanup. Follow up to 51329e6
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 472c03423..db285a4b4 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -98,7 +98,7 @@ TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
}
int party_db_final(DBKey key, DBData *data, va_list ap) {
struct party_data *p;
-
+
if ((p = DB->data2ptr(data))) {
if (p->instance)
aFree(p->instance);
@@ -114,7 +114,6 @@ int party_db_final(DBKey key, DBData *data, va_list ap) {
aFree(p->hdata);
}
}
-
return 0;
}
/// Party data lookup using party id.
@@ -168,7 +167,6 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
return 0;
}
-
void party_created(int account_id,int char_id,int fail,int party_id,char *name) {
struct map_session_data *sd;
sd=map->id2sd(account_id);
@@ -500,7 +498,6 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) {
break;
}
}
-
return 0;
}
@@ -600,7 +597,7 @@ int party_broken(int party_id)
instance->list[p->instance[j]].owner_id = 0;
}
}
-
+
for( i = 0; i < MAX_PARTY; i++ ) {
if( p->data[i].sd!=NULL ) {
clif->party_withdraw(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10);
@@ -690,7 +687,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
//Change leadership.
p->party.member[mi].leader = 0;
p->party.member[tmi].leader = 1;
-
+
/** update members **/
clif->PartyLeaderChanged(p->data[mi].sd, p->data[mi].sd->status.account_id, p->data[tmi].sd->status.account_id);
@@ -955,13 +952,13 @@ int party_exp_share(struct party_data* p, struct block_list* src, unsigned int b
base_exp_bonus = base_exp;
job_exp_bonus = job_exp;
#endif
-
+
for (i = 0; i < c; i++) {
#ifdef RENEWAL_EXP
if( !(src && src->type == BL_MOB && ((TBL_MOB*)src)->db->mexp) ){
struct mob_data *md = (TBL_MOB*)src;
int rate = pc->level_penalty_mod(md->level - (sd[i])->status.base_level, md->status.race, md->status.mode, 1);
-
+
base_exp = (unsigned int)cap_value(base_exp_bonus * rate / 100, 1, UINT_MAX);
job_exp = (unsigned int)cap_value(job_exp_bonus * rate / 100, 1, UINT_MAX);
}
@@ -1118,7 +1115,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) {
if (sd->state.autotrade)
return 0;
-
+
if (battle_config.idle_no_share && pc_isidle(sd))
return 0;
@@ -1189,9 +1186,8 @@ void party_booking_register(struct map_session_data *sd, short level, short mapi
#ifndef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
int i;
-
+
pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
-
if( pb_ad == NULL )
{
pb_ad = party->create_booking_data();
@@ -1202,17 +1198,17 @@ void party_booking_register(struct map_session_data *sd, short level, short mapi
clif->PartyBookingRegisterAck(sd, 2);
return;
}
-
+
memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
pb_ad->expiretime = (int)time(NULL);
pb_ad->p_detail.level = level;
pb_ad->p_detail.mapid = mapid;
-
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
-
+
clif->PartyBookingRegisterAck(sd, 0);
clif->PartyBookingInsertNotify(sd, pb_ad); // Notice
#else
@@ -1244,26 +1240,25 @@ void party_booking_update(struct map_session_data *sd, short* job) {
#ifndef PARTY_RECRUIT
int i;
struct party_booking_ad_info *pb_ad;
-
+
pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
-
+
if( pb_ad == NULL )
return;
-
+
pb_ad->expiretime = (int)time(NULL);// Update time.
-
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
-
+
clif->PartyBookingUpdateNotify(sd, pb_ad);
#else
return;
#endif
}
-
void party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) {
#ifdef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
@@ -1302,9 +1297,9 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
DBIterator* iter = db_iterator(party->booking_db);
-
+
memset(result_list, 0, sizeof(result_list));
-
+
for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) ) {
if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
continue;
@@ -1334,7 +1329,6 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
#endif
}
-
bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
@@ -1384,7 +1378,7 @@ void party_defaults(void) {
party->searchname = party_searchname;
party->getmemberid = party_getmemberid;
party->getavailablesd = party_getavailablesd;
-
+
party->create = party_create;
party->created = party_created;
party->request_info = party_request_info;