summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-08 17:24:07 -0300
committershennetsind <ind@henn.et>2013-06-08 17:24:07 -0300
commit60eb0c9e0527e80b7793e48d2cea47e3204b777c (patch)
tree3ee0d20f14dd5655463425a167f3e28d101b2874 /src
parent27147633d447400d4a095a4166c64d3a0df4e078 (diff)
downloadhercules-60eb0c9e0527e80b7793e48d2cea47e3204b777c.tar.gz
hercules-60eb0c9e0527e80b7793e48d2cea47e3204b777c.tar.bz2
hercules-60eb0c9e0527e80b7793e48d2cea47e3204b777c.tar.xz
hercules-60eb0c9e0527e80b7793e48d2cea47e3204b777c.zip
Follow up d73783f22b2bb881aab74524d153d89a5932a199
Adjusting party.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i') Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c28
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battleground.c6
-rw-r--r--src/map/clif.c48
-rw-r--r--src/map/instance.c4
-rw-r--r--src/map/intif.c18
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/party.c120
-rw-r--r--src/map/party.h4
-rw-r--r--src/map/pc.c18
-rw-r--r--src/map/script.c16
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/unit.c6
14 files changed, 145 insertions, 145 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3d417c986..32191032c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -608,7 +608,7 @@ ACMD(who)
break;
}
default: {
- struct party_data *p = iParty->search(pl_sd->status.party_id);
+ struct party_data *p = party->search(pl_sd->status.party_id);
struct guild *g = pl_sd->guild;
StrBuf->Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s "
@@ -711,7 +711,7 @@ ACMD(whogm)
pc->job_name(pl_sd->status.class_), pl_sd->status.job_level);
clif->message(fd, atcmd_output);
- p = iParty->search(pl_sd->status.party_id);
+ p = party->search(pl_sd->status.party_id);
g = pl_sd->guild;
sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s'
@@ -1327,7 +1327,7 @@ ACMD(baselevelup)
status_calc_pc(sd, 0);
pc->baselevelchanged(sd);
if(sd->status.party_id)
- iParty->send_levelup(sd);
+ party->send_levelup(sd);
return true;
}
@@ -3223,17 +3223,17 @@ ACMD(spiritball)
*------------------------------------------*/
ACMD(party)
{
- char party[NAME_LENGTH];
+ char party_name[NAME_LENGTH];
nullpo_retr(-1, sd);
- memset(party, '\0', sizeof(party));
+ memset(party_name, '\0', sizeof(party_name));
- if (!message || !*message || sscanf(message, "%23[^\n]", party) < 1) {
+ if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
clif->message(fd, msg_txt(1029)); // Please enter a party name (usage: @party <party_name>).
return false;
}
- iParty->create(sd, party, 0, 0);
+ party->create(sd, party_name, 0, 0);
return true;
}
@@ -3543,8 +3543,8 @@ ACMD(partyrecall)
return false;
}
- if ((p = iParty->searchname(party_name)) == NULL && // name first to avoid error when name begin with a number
- (p = iParty->search(atoi(message))) == NULL)
+ if ((p = party->searchname(party_name)) == NULL && // name first to avoid error when name begin with a number
+ (p = party->search(atoi(message))) == NULL)
{
clif->message(fd, msg_txt(96)); // Incorrect name or ID, or no one from the party is online.
return false;
@@ -4112,8 +4112,8 @@ ACMD(partyspy)
return false;
}
- if ((p = iParty->searchname(party_name)) != NULL || // name first to avoid error when name begin with a number
- (p = iParty->search(atoi(message))) != NULL) {
+ if ((p = party->searchname(party_name)) != NULL || // name first to avoid error when name begin with a number
+ (p = party->search(atoi(message))) != NULL) {
if (sd->partyspy == p->party.party_id) {
sd->partyspy = 0;
sprintf(atcmd_output, msg_txt(105), p->party.name); // No longer spying on the %s party.
@@ -5670,7 +5670,7 @@ ACMD(changeleader)
return false;
}
- if (iParty->changeleader(sd, iMap->nick2sd((char *) message)))
+ if (party->changeleader(sd, iMap->nick2sd((char *) message)))
return true;
return false;
}
@@ -5686,7 +5686,7 @@ ACMD(partyoption)
char w1[16], w2[16];
nullpo_retr(-1, sd);
- if (sd->status.party_id == 0 || (p = iParty->search(sd->status.party_id)) == NULL)
+ if (sd->status.party_id == 0 || (p = party->search(sd->status.party_id)) == NULL)
{
clif->message(fd, msg_txt(282));
return false;
@@ -5712,7 +5712,7 @@ ACMD(partyoption)
//Change item share type.
if (option != p->party.item)
- iParty->changeoption(sd, p->party.exp, option);
+ party->changeoption(sd, p->party.exp, option);
else
clif->message(fd, msg_txt(286));
diff --git a/src/map/battle.c b/src/map/battle.c
index 9dac36671..2cc4f984f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2148,7 +2148,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADDRATE(sd->bonus.crit_atk_rate);
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
- if( (i = party_foreachsamemap(iParty->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
+ if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
ATK_ADDRATE(2*temp*i);
}
}
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 233679dfc..f91d7ae69 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -526,7 +526,7 @@ void bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_q
switch( type ) { /* guild/party already validated in can_queue */
case BGQT_PARTY: {
- struct party_data *p = iParty->search(sd->status.party_id);
+ struct party_data *p = party->search(sd->status.party_id);
for( i = 0; i < MAX_PARTY; i++ ) {
if( !p->data[i].sd || p->data[i].sd->bg_queue.arena != NULL ) continue;
count++;
@@ -560,7 +560,7 @@ void bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_q
clif->bgqueue_update_info(sd,arena->id,script->hq[arena->queue_id].items);
break;
case BGQT_PARTY: {
- struct party_data *p = iParty->search(sd->status.party_id);
+ struct party_data *p = party->search(sd->status.party_id);
for( i = 0; i < MAX_PARTY; i++ ) {
if( !p->data[i].sd || p->data[i].sd->bg_queue.arena != NULL ) continue;
p->data[i].sd->bg_queue.type = type;
@@ -650,7 +650,7 @@ enum BATTLEGROUNDS_QUEUE_ACK bg_canqueue(struct map_session_data *sd, struct bg_
return BGQA_NOT_PARTY_GUILD_LEADER;
else {
struct party_data *p;
- if( (p = iParty->search(sd->status.party_id) ) ) {
+ if( (p = party->search(sd->status.party_id) ) ) {
int i, count = 0;
bool is_leader = false;
diff --git a/src/map/clif.c b/src/map/clif.c
index 50a228859..44311ed5a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -403,7 +403,7 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target
case PARTY_SAMEMAP:
case PARTY_SAMEMAP_WOS:
if (sd && sd->status.party_id)
- p = iParty->search(sd->status.party_id);
+ p = party->search(sd->status.party_id);
if (p) {
for(i=0;i<MAX_PARTY;i++){
@@ -6610,7 +6610,7 @@ void clif_party_invite(struct map_session_data *sd,struct map_session_data *tsd)
fd=tsd->fd;
- if( (p=iParty->search(sd->status.party_id))==NULL )
+ if( (p=party->search(sd->status.party_id))==NULL )
return;
WFIFOHEAD(fd,packet_len(cmd));
@@ -8571,7 +8571,7 @@ void clif_charnameack (int fd, struct block_list *bl)
memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);
if( ssd->status.party_id ) {
- p = iParty->search(ssd->status.party_id);
+ p = party->search(ssd->status.party_id);
}
if( ssd->status.guild_id ) {
if( ( g = ssd->guild ) != NULL ) {
@@ -8695,10 +8695,10 @@ void clif_charnameupdate (struct map_session_data *ssd)
if (!battle_config.display_party_name) {
if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = ssd->guild) != NULL)
- p = iParty->search(ssd->status.party_id);
+ p = party->search(ssd->status.party_id);
}else{
if (ssd->status.party_id > 0)
- p = iParty->search(ssd->status.party_id);
+ p = party->search(ssd->status.party_id);
}
if( ssd->status.guild_id > 0 && (g = ssd->guild) != NULL )
@@ -9384,7 +9384,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// Party
// (needs to go after clif_spawn() to show hp bars correctly)
if(sd->status.party_id) {
- iParty->send_movemap(sd);
+ party->send_movemap(sd);
clif->party_hp(sd); // Show hp after displacement [LuzZza]
}
@@ -11938,7 +11938,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd)
return;
}
- iParty->create(sd,name,0,0);
+ party->create(sd,name,0,0);
}
void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
@@ -11957,7 +11957,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd)
return;
}
- iParty->create(sd,name,item1,item2);
+ party->create(sd,name,item1,item2);
}
@@ -11980,7 +11980,7 @@ void clif_parse_PartyInvite(int fd, struct map_session_data *sd)
return;
}
- iParty->invite(sd, t_sd);
+ party->invite(sd, t_sd);
}
void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
@@ -12001,7 +12001,7 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
return;
}
- iParty->invite(sd, t_sd);
+ party->invite(sd, t_sd);
}
@@ -12013,12 +12013,12 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd)
/// 1 = accept
void clif_parse_ReplyPartyInvite(int fd,struct map_session_data *sd)
{
- iParty->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
+ party->reply_invite(sd,RFIFOL(fd,2),RFIFOL(fd,6));
}
void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd)
{
- iParty->reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
+ party->reply_invite(sd,RFIFOL(fd,2),RFIFOB(fd,6));
}
@@ -12030,7 +12030,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd)
clif->message(fd, msg_txt(227));
return;
}
- iParty->leave(sd);
+ party->leave(sd);
}
@@ -12042,7 +12042,7 @@ void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd)
clif->message(fd, msg_txt(227));
return;
}
- iParty->removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
+ party->removemember(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6));
}
@@ -12057,7 +12057,7 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
if( !sd->status.party_id )
return;
- p = iParty->search(sd->status.party_id);
+ p = party->search(sd->status.party_id);
if( p == NULL )
return;
@@ -12070,9 +12070,9 @@ void clif_parse_PartyChangeOption(int fd, struct map_session_data *sd)
#if PACKETVER < 20090603
//Client can't change the item-field
- iParty->changeoption(sd, RFIFOL(fd,2), p->party.item);
+ party->changeoption(sd, RFIFOL(fd,2), p->party.item);
#else
- iParty->changeoption(sd, RFIFOL(fd,2), ((RFIFOB(fd,6)?1:0)|(RFIFOB(fd,7)?2:0)));
+ party->changeoption(sd, RFIFOL(fd,2), ((RFIFOB(fd,6)?1:0)|(RFIFOB(fd,7)?2:0)));
#endif
}
@@ -12104,7 +12104,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay;
}
- iParty->send_message(sd, text, textlen);
+ party->send_message(sd, text, textlen);
}
@@ -12112,7 +12112,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
/// 07da <account id>.L
void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd)
{
- iParty->changeleader(sd, iMap->id2sd(RFIFOL(fd,2)));
+ party->changeleader(sd, iMap->id2sd(RFIFOL(fd,2)));
}
@@ -12131,7 +12131,7 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
for(i=0; i<PARTY_BOOKING_JOBS; i++)
job[i] = RFIFOB(fd,6+i*2);
- iParty->booking_register(sd, level, mapid, job);
+ party->booking_register(sd, level, mapid, job);
}
@@ -12162,7 +12162,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
unsigned long lastindex = RFIFOL(fd,8);
short resultcount = RFIFOW(fd,12);
- iParty->booking_search(sd, level, mapid, job, lastindex, resultcount);
+ party->booking_search(sd, level, mapid, job, lastindex, resultcount);
}
@@ -12199,7 +12199,7 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
/// 0806
void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
{
- if(iParty->booking_delete(sd))
+ if(party->booking_delete(sd))
clif->PartyBookingDeleteAck(sd, 0);
}
@@ -12232,7 +12232,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
for(i=0; i<PARTY_BOOKING_JOBS; i++)
job[i] = RFIFOW(fd,2+i*2);
- iParty->booking_update(sd, job);
+ party->booking_update(sd, job);
}
@@ -15586,7 +15586,7 @@ int clif_instance(int instance_id, int type, int flag) {
break;
case IOT_PARTY:
/* default is already PARTY */
- sd = iParty->getavailablesd(iParty->search(instances[instance_id].owner_id));
+ sd = party->getavailablesd(party->search(instances[instance_id].owner_id));
break;
case IOT_CHAR:
target = SELF;
diff --git a/src/map/instance.c b/src/map/instance.c
index 75bb004eb..690f14cfe 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -64,7 +64,7 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
icptr = &sd->instances;
break;
case IOT_PARTY:
- if( ( p = iParty->search(owner_id) ) == NULL ) {
+ if( ( p = party->search(owner_id) ) == NULL ) {
ShowError("instance_create: party %d not found for instance '%s'.\n", owner_id, name);
return -2;
}
@@ -416,7 +416,7 @@ void instance_destroy(int instance_id) {
icptr = &sd->instances;
break;
case IOT_PARTY:
- if( ( p = iParty->search(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( p = party->search(instances[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = p->instance;
diff --git a/src/map/intif.c b/src/map/intif.c
index 000ab3f07..3cdf93487 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1047,7 +1047,7 @@ int intif_parse_PartyCreated(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party created by account %d\n\n", RFIFOL(fd,2));
- iParty->created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
+ party->created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
return 0;
}
@@ -1056,13 +1056,13 @@ int intif_parse_PartyInfo(int fd)
{
if( RFIFOW(fd,2) == 12 ){
ShowWarning("intif: party noinfo (char_id=%d party_id=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8));
- iParty->recv_noinfo(RFIFOL(fd,8), RFIFOL(fd,4));
+ party->recv_noinfo(RFIFOL(fd,8), RFIFOL(fd,4));
return 0;
}
if( RFIFOW(fd,2) != 8+sizeof(struct party) )
ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party));
- iParty->recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
+ party->recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
return 0;
}
@@ -1071,14 +1071,14 @@ int intif_parse_PartyMemberAdded(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member added Party (%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- iParty->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
+ party->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
return 0;
}
// ACK changing party option
int intif_parse_PartyOptionChanged(int fd)
{
- iParty->optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
+ party->optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
return 0;
}
@@ -1087,28 +1087,28 @@ int intif_parse_PartyMemberWithdraw(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member withdraw: Party(%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- iParty->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+ party->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
return 0;
}
// ACK party break
int intif_parse_PartyBroken(int fd)
{
- iParty->broken(RFIFOL(fd,2));
+ party->broken(RFIFOL(fd,2));
return 0;
}
// ACK party on new map
int intif_parse_PartyMove(int fd)
{
- iParty->recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
+ party->recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
return 0;
}
// ACK party messages
int intif_parse_PartyMessage(int fd)
{
- iParty->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
+ party->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
return 0;
}
diff --git a/src/map/map.c b/src/map/map.c
index ddefcf0e1..bb1ea4fb4 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1751,7 +1751,7 @@ int map_quit(struct map_session_data *sd) {
}
}
- iParty->booking_delete(sd); // Party Booking [Spiria]
+ party->booking_delete(sd); // Party Booking [Spiria]
pc->makesavestatus(sd);
pc->clean_skilltree(sd);
chrif_save(sd,1);
@@ -5070,7 +5070,7 @@ void do_final(void)
do_final_itemdb();
do_final_storage();
guild->final();
- iParty->do_final_party();
+ party->do_final_party();
pc->do_final_pc();
do_final_pet();
do_final_mob();
@@ -5277,7 +5277,7 @@ void map_hp_symbols(void) {
HPM->share(skill,"skill");
HPM->share(vending,"vending");
HPM->share(pc,"pc");
- HPM->share(iParty,"iParty");
+ HPM->share(party,"party");
HPM->share(iMap,"iMap");
/* partial */
HPM->share(mapit,"mapit");
@@ -5495,7 +5495,7 @@ int do_init(int argc, char *argv[])
do_init_mob();
pc->do_init_pc();
do_init_status();
- iParty->do_init_party();
+ party->do_init_party();
guild->init();
do_init_storage();
do_init_pet();
diff --git a/src/map/mob.c b/src/map/mob.c
index d83bdec0c..04c4bba38 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1854,7 +1854,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
&& check_distance_blxy(&sd->bl, dlist->x, dlist->y, AUTOLOOT_DISTANCE)
#endif
) { //Autoloot.
- if (iParty->share_loot(iParty->search(sd->status.party_id),
+ if (party->share_loot(party->search(sd->status.party_id),
sd, &ditem->item_data, sd->status.char_id) == 0
) {
ers_free(item_drop_ers, ditem);
@@ -2255,7 +2255,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
for( j = 0; j < pnum && pt[j].id != temp; j++ ); //Locate party.
if( j == pnum ){ //Possibly add party.
- pt[pnum].p = iParty->search(temp);
+ pt[pnum].p = party->search(temp);
if(pt[pnum].p && pt[pnum].p->party.exp) {
pt[pnum].id = temp;
pt[pnum].base_exp = base_exp;
@@ -2298,7 +2298,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
for( i = 0; i < pnum; i++ ) //Party share.
- iParty->exp_share(pt[i].p, &md->bl, pt[i].base_exp,pt[i].job_exp,pt[i].zeny);
+ party->exp_share(pt[i].p, &md->bl, pt[i].base_exp,pt[i].job_exp,pt[i].zeny);
} //End EXP giving.
diff --git a/src/map/party.c b/src/map/party.c
index c0fe65d53..5f8164557 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -209,7 +209,7 @@ int party_request_info(int party_id, int char_id)
/// Invoked (from char-server) when the party info is not found.
int party_recv_noinfo(int party_id, int char_id)
{
- iParty->broken(party_id);
+ party->broken(party_id);
if( char_id != 0 )// requester
{
struct map_session_data* sd;
@@ -297,7 +297,7 @@ int party_recv_info(struct party* sp, int char_id)
sd = p->data[member_id].sd;
if( sd == NULL )
continue;// not online
- iParty->member_withdraw(sp->party_id, sd->status.account_id, sd->status.char_id);
+ party->member_withdraw(sp->party_id, sd->status.account_id, sd->status.char_id);
}
memcpy(&p->party, sp, sizeof(struct party));
memset(&p->state, 0, sizeof(p->state));
@@ -328,7 +328,7 @@ int party_recv_info(struct party* sp, int char_id)
if( char_id != 0 )// requester
{
sd = iMap->charid2sd(char_id);
- if( sd && sd->status.party_id == sp->party_id && iParty->getmemberid(p,sd) == -1 )
+ if( sd && sd->status.party_id == sp->party_id && party->getmemberid(p,sd) == -1 )
sd->status.party_id = 0;// was not in the party
}
return 0;
@@ -341,7 +341,7 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
nullpo_ret(sd);
- if( ( p = iParty->search(sd->status.party_id) ) == NULL )
+ if( ( p = party->search(sd->status.party_id) ) == NULL )
return 0;
// confirm if this player is a party leader
@@ -430,10 +430,10 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag)
//- Player must be authed/active and belong to a party before calling this method
void party_member_joined(struct map_session_data *sd)
{
- struct party_data* p = iParty->search(sd->status.party_id);
+ struct party_data* p = party->search(sd->status.party_id);
int i;
if (!p) {
- iParty->request_info(sd->status.party_id, sd->status.char_id);
+ party->request_info(sd->status.party_id, sd->status.char_id);
return;
}
ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == sd->status.account_id && p->party.member[i].char_id == sd->status.char_id );
@@ -455,7 +455,7 @@ void party_member_joined(struct map_session_data *sd)
int party_member_added(int party_id,int account_id,int char_id, int flag)
{
struct map_session_data *sd = iMap->id2sd(account_id),*sd2;
- struct party_data *p = iParty->search(party_id);
+ struct party_data *p = party->search(party_id);
int i, j;
if(sd == NULL || sd->status.char_id != char_id || !sd->party_joining ) {
@@ -517,7 +517,7 @@ int party_removemember(struct map_session_data* sd, int account_id, char* name)
struct party_data *p;
int i;
- p = iParty->search(sd->status.party_id);
+ p = party->search(sd->status.party_id);
if( p == NULL )
return 0;
@@ -542,7 +542,7 @@ int party_leave(struct map_session_data *sd)
struct party_data *p;
int i;
- p = iParty->search(sd->status.party_id);
+ p = party->search(sd->status.party_id);
if( p == NULL )
return 0;
@@ -558,7 +558,7 @@ int party_leave(struct map_session_data *sd)
int party_member_withdraw(int party_id, int account_id, int char_id)
{
struct map_session_data* sd = iMap->id2sd(account_id);
- struct party_data* p = iParty->search(party_id);
+ struct party_data* p = party->search(party_id);
if( p ) {
int i;
@@ -589,7 +589,7 @@ int party_broken(int party_id)
struct party_data* p;
int i, j;
- p = iParty->search(party_id);
+ p = party->search(party_id);
if( p == NULL )
return 0;
@@ -623,7 +623,7 @@ int party_optionchanged(int party_id,int account_id,int exp,int item,int flag)
{
struct party_data *p;
struct map_session_data *sd=iMap->id2sd(account_id);
- if( (p=iParty->search(party_id))==NULL)
+ if( (p=party->search(party_id))==NULL)
return 0;
//Flag&1: Exp change denied. Flag&2: Item change denied.
@@ -656,7 +656,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
return false;
}
- if ((p = iParty->search(sd->status.party_id)) == NULL)
+ if ((p = party->search(sd->status.party_id)) == NULL)
return false;
ARR_FIND( 0, MAX_PARTY, mi, p->data[mi].sd == sd );
@@ -698,7 +698,7 @@ int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short m
struct party_data* p;
int i;
- p = iParty->search(party_id);
+ p = party->search(party_id);
if( p == NULL )
return 0;
@@ -729,7 +729,7 @@ void party_send_movemap(struct map_session_data *sd)
intif_party_changemap(sd,1);
- p=iParty->search(sd->status.party_id);
+ p=party->search(sd->status.party_id);
if (!p) return;
if(sd->state.connect_new) {
@@ -767,7 +767,7 @@ int party_send_logout(struct map_session_data *sd)
return 0;
intif_party_changemap(sd,0);
- p=iParty->search(sd->status.party_id);
+ p=party->search(sd->status.party_id);
if(!p) return 0;
ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd == sd );
@@ -784,7 +784,7 @@ int party_send_message(struct map_session_data *sd,const char *mes,int len)
if(sd->status.party_id==0)
return 0;
intif_party_message(sd->status.party_id,sd->status.account_id,mes,len);
- iParty->recv_message(sd->status.party_id,sd->status.account_id,mes,len);
+ party->recv_message(sd->status.party_id,sd->status.account_id,mes,len);
// Chat logging type 'P' / Party Chat
logs->chat(LOG_CHAT_PARTY, sd->status.party_id, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, mes);
@@ -795,7 +795,7 @@ int party_send_message(struct map_session_data *sd,const char *mes,int len)
int party_recv_message(int party_id,int account_id,const char *mes,int len)
{
struct party_data *p;
- if( (p=iParty->search(party_id))==NULL)
+ if( (p=party->search(party_id))==NULL)
return 0;
clif->party_message(p,account_id,mes,len);
return 0;
@@ -807,7 +807,7 @@ int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id
struct map_session_data *p_sd;
int i;
- if(!party_id || (p=iParty->search(party_id))==NULL)
+ if(!party_id || (p=party->search(party_id))==NULL)
return 0;
switch(skill_id) {
case TK_COUNTER: //Increase Triple Attack rate of Monks.
@@ -1036,7 +1036,7 @@ int party_send_dot_remove(struct map_session_data *sd)
// To use for Taekwon's "Fighting Chant"
// int c = 0;
-// party_foreachsamemap(iParty->sub_count, sd, 0, &c);
+// party_foreachsamemap(party->sub_count, sd, 0, &c);
int party_sub_count(struct block_list *bl, va_list ap)
{
struct map_session_data *sd = (TBL_PC *)bl;
@@ -1062,7 +1062,7 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
nullpo_ret(sd);
- if((p=iParty->search(sd->status.party_id))==NULL)
+ if((p=party->search(sd->status.party_id))==NULL)
return 0;
x0=sd->bl.x-range;
@@ -1217,47 +1217,47 @@ bool party_booking_delete(struct map_session_data *sd)
* created by Susu
*-------------------------------------*/
void party_defaults(void) {
- iParty = &iParty_s;
+ party = &party_s;
/* funcs */
- iParty->do_init_party = do_init_party;
- iParty->do_final_party = do_final_party;
- iParty->search = party_search;
- iParty->searchname = party_searchname;
- iParty->getmemberid = party_getmemberid;
- iParty->getavailablesd = party_getavailablesd;
+ party->do_init_party = do_init_party;
+ party->do_final_party = do_final_party;
+ party->search = party_search;
+ party->searchname = party_searchname;
+ party->getmemberid = party_getmemberid;
+ party->getavailablesd = party_getavailablesd;
- iParty->create = party_create;
- iParty->created = party_created;
- iParty->request_info = party_request_info;
- iParty->invite = party_invite;
- iParty->member_joined = party_member_joined;
- iParty->member_added = party_member_added;
- iParty->leave = party_leave;
- iParty->removemember = party_removemember;
- iParty->member_withdraw = party_member_withdraw;
- iParty->reply_invite = party_reply_invite;
- iParty->recv_noinfo = party_recv_noinfo;
- iParty->recv_info = party_recv_info;
- iParty->recv_movemap = party_recv_movemap;
- iParty->broken = party_broken;
- iParty->optionchanged = party_optionchanged;
- iParty->changeoption = party_changeoption;
- iParty->changeleader = party_changeleader;
- iParty->send_movemap = party_send_movemap;
- iParty->send_levelup = party_send_levelup;
- iParty->send_logout = party_send_logout;
- iParty->send_message = party_send_message;
- iParty->recv_message = party_recv_message;
- iParty->skill_check = party_skill_check;
- iParty->send_xy_clear = party_send_xy_clear;
- iParty->exp_share = party_exp_share;
- iParty->share_loot = party_share_loot;
- iParty->send_dot_remove = party_send_dot_remove;
- iParty->sub_count = party_sub_count;
- iParty->booking_register = party_booking_register;
- iParty->booking_update = party_booking_update;
- iParty->booking_search = party_booking_search;
- iParty->booking_delete = party_booking_delete;
+ party->create = party_create;
+ party->created = party_created;
+ party->request_info = party_request_info;
+ party->invite = party_invite;
+ party->member_joined = party_member_joined;
+ party->member_added = party_member_added;
+ party->leave = party_leave;
+ party->removemember = party_removemember;
+ party->member_withdraw = party_member_withdraw;
+ party->reply_invite = party_reply_invite;
+ party->recv_noinfo = party_recv_noinfo;
+ party->recv_info = party_recv_info;
+ party->recv_movemap = party_recv_movemap;
+ party->broken = party_broken;
+ party->optionchanged = party_optionchanged;
+ party->changeoption = party_changeoption;
+ party->changeleader = party_changeleader;
+ party->send_movemap = party_send_movemap;
+ party->send_levelup = party_send_levelup;
+ party->send_logout = party_send_logout;
+ party->send_message = party_send_message;
+ party->recv_message = party_recv_message;
+ party->skill_check = party_skill_check;
+ party->send_xy_clear = party_send_xy_clear;
+ party->exp_share = party_exp_share;
+ party->share_loot = party_share_loot;
+ party->send_dot_remove = party_send_dot_remove;
+ party->sub_count = party_sub_count;
+ party->booking_register = party_booking_register;
+ party->booking_update = party_booking_update;
+ party->booking_search = party_booking_search;
+ party->booking_delete = party_booking_delete;
}
diff --git a/src/map/party.h b/src/map/party.h
index 9956c5b33..79d47105f 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -101,9 +101,9 @@ struct party_interface {
void (*booking_update) (struct map_session_data *sd, short* job);
void (*booking_search) (struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
bool (*booking_delete) (struct map_session_data *sd);
-} iParty_s;
+} party_s;
-struct party_interface *iParty;
+struct party_interface *party;
void party_defaults(void);
diff --git a/src/map/pc.c b/src/map/pc.c
index 2b00dc78b..3146ba03e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -33,7 +33,7 @@
#include "elemental.h"
#include "npc.h" // fake_nd
#include "pet.h" // pet_unlocktarget()
-#include "party.h" // iParty->search()
+#include "party.h" // party->search()
#include "guild.h" // guild->search(), guild_request_info()
#include "script.h" // script_config
#include "skill.h"
@@ -1217,7 +1217,7 @@ int pc_reg_received(struct map_session_data *sd)
sd->state.active = 1;
if (sd->status.party_id)
- iParty->member_joined(sd);
+ party->member_joined(sd);
if (sd->status.guild_id)
guild->member_joined(sd);
@@ -4028,7 +4028,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
return 0; // Distance is too far
if (sd->status.party_id)
- p = iParty->search(sd->status.party_id);
+ p = party->search(sd->status.party_id);
if(fitem->first_get_charid > 0 && fitem->first_get_charid != sd->status.char_id)
{
@@ -4067,7 +4067,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
}
//This function takes care of giving the item to whoever should have it, considering party-share options.
- if ((flag = iParty->share_loot(p,sd,&fitem->item_data, fitem->first_get_charid))) {
+ if ((flag = party->share_loot(p,sd,&fitem->item_data, fitem->first_get_charid))) {
clif->additem(sd,0,0,flag);
return 1;
}
@@ -4736,7 +4736,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
stop = true;
}
}
- if ( !stop && sd->status.party_id && (p = iParty->search(sd->status.party_id)) && p->instances ) {
+ if ( !stop && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
ARR_FIND(0, instances[p->instance[i]].num_map, j, map[instances[p->instance[i]].map[j]].instance_src_map == m && !map[instances[p->instance[i]].map[j]].cName);
if( j != instances[p->instance[i]].num_map )
@@ -4804,7 +4804,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
if (battle_config.clear_unit_onwarp&BL_PC)
skill->clear_unitgroup(&sd->bl);
- iParty->send_dot_remove(sd); //minimap dot fix [Kevin]
+ party->send_dot_remove(sd); //minimap dot fix [Kevin]
guild->send_dot_remove(sd);
bg_send_dot_remove(sd);
if (sd->regen.state.gc)
@@ -5711,7 +5711,7 @@ int pc_checkbaselevelup(struct map_session_data *sd) {
npc_script_event(sd, NPCE_BASELVUP); //LORDALFA - LVLUPEVENT
if(sd->status.party_id)
- iParty->send_levelup(sd);
+ party->send_levelup(sd);
pc->baselevelchanged(sd);
return 1;
@@ -6275,7 +6275,7 @@ int pc_resetlvl(struct map_session_data* sd,int type)
}
if ((type == 1 || type == 2 || type == 3) && sd->status.party_id)
- iParty->send_levelup(sd);
+ party->send_levelup(sd);
status_calc_pc(sd,0);
clif->skillinfoblock(sd);
@@ -7131,7 +7131,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
status_calc_pc(sd, 0);
if(sd->status.party_id)
{
- iParty->send_levelup(sd);
+ party->send_levelup(sd);
}
break;
case SP_JOBLEVEL:
diff --git a/src/map/script.c b/src/map/script.c
index 608a1fcff..752f4445d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4742,7 +4742,7 @@ BUILDIN(warpparty)
if ( script_hasdata(st,6) )
str2 = script_getstr(st,6);
- p = iParty->search(p_id);
+ p = party->search(p_id);
if(!p)
return true;
@@ -6670,7 +6670,7 @@ BUILDIN(getpartyname)
party_id = script_getnum(st,2);
- if( ( p = iParty->search(party_id) ) != NULL )
+ if( ( p = party->search(party_id) ) != NULL )
{
script_pushstrcopy(st,p->party.name);
}
@@ -6694,7 +6694,7 @@ BUILDIN(getpartymember)
struct party_data *p;
int i,j=0,type=0;
- p=iParty->search(script_getnum(st,2));
+ p=party->search(script_getnum(st,2));
if( script_hasdata(st,3) )
type=script_getnum(st,3);
@@ -6734,7 +6734,7 @@ BUILDIN(getpartyleader)
if( script_hasdata(st,3) )
type=script_getnum(st,3);
- p=iParty->search(party_id);
+ p=party->search(party_id);
if (p) //Search leader
for(i = 0; i < MAX_PARTY && !p->party.member[i].leader; i++);
@@ -6847,7 +6847,7 @@ BUILDIN(strcharinfo)
script_pushstrcopy(st,sd->status.name);
break;
case 1:
- if( ( p = iParty->search(sd->status.party_id) ) != NULL ) {
+ if( ( p = party->search(sd->status.party_id) ) != NULL ) {
script_pushstrcopy(st,p->party.name);
} else {
script_pushconststr(st,"");
@@ -11144,7 +11144,7 @@ BUILDIN(mapwarp) // Added by RoVeRT
}
break;
case 2:
- p = iParty->search(check_ID);
+ p = party->search(check_ID);
if(p){
for(i=0;i<MAX_PARTY; i++){
if(p->data[i].sd && p->data[i].sd->bl.m == m){
@@ -16133,7 +16133,7 @@ BUILDIN(has_instance) {
if( i != sd->instances )
instance_id = sd->instance[i];
}
- if( instance_id == -1 && sd->status.party_id && (p = iParty->search(sd->status.party_id)) && p->instances ) {
+ if( instance_id == -1 && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
ARR_FIND(0, instances[p->instance[i]].num_map, j, map[instances[p->instance[i]].map[j]].instance_src_map == m);
if( j != instances[p->instance[i]].num_map )
@@ -16230,7 +16230,7 @@ BUILDIN(instance_check_party) {
party_id = script_getnum(st,2);
else return true;
- if( !(p = iParty->search(party_id)) ){
+ if( !(p = party->search(party_id)) ){
script_pushint(st, 0); // Returns false if party does not exist.
return true;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index f9d189f37..2ada270e8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2380,7 +2380,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
break;
case MO_COMBOFINISH:
if (sd->status.party_id>0) //bonus from SG_FRIEND [Komurka]
- iParty->skill_check(sd, sd->status.party_id, MO_COMBOFINISH, skill_lv);
+ party->skill_check(sd, sd->status.party_id, MO_COMBOFINISH, skill_lv);
if (pc->checkskill(sd, CH_TIGERFIST) > 0 && sd->spiritball > 0)
flag=1;
case CH_TIGERFIST:
@@ -2402,7 +2402,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
{ //bonus from SG_FRIEND [Komurka]
int level;
if(sd->status.party_id>0 && (level = pc->checkskill(sd,SG_FRIEND)))
- iParty->skill_check(sd, sd->status.party_id, TK_COUNTER,level);
+ party->skill_check(sd, sd->status.party_id, TK_COUNTER,level);
}
break;
case SL_STIN:
@@ -12671,7 +12671,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
case AM_TWILIGHT2:
case AM_TWILIGHT3:
- if (!iParty->skill_check(sd, sd->status.party_id, skill_id, skill_lv))
+ if (!party->skill_check(sd, sd->status.party_id, skill_id, skill_lv))
{
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
diff --git a/src/map/unit.c b/src/map/unit.c
index c6378ffdd..153ef5eda 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2111,7 +2111,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
storage_guild_storage_quit(sd,0);
sd->state.storage_flag = 0; //Force close it when being warped.
if(sd->party_invite>0)
- iParty->reply_invite(sd,sd->party_invite,0);
+ party->reply_invite(sd,sd->party_invite,0);
if(sd->guild_invite>0)
guild->reply_invite(sd,sd->guild_invite,0);
if(sd->guild_alliance>0)
@@ -2142,7 +2142,7 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
pc->setstand(sd);
skill->sit(sd,0);
}
- iParty->send_dot_remove(sd);//minimap dot fix [Kevin]
+ party->send_dot_remove(sd);//minimap dot fix [Kevin]
guild->send_dot_remove(sd);
bg_send_dot_remove(sd);
@@ -2316,7 +2316,7 @@ int unit_free(struct block_list *bl, clr_type clrtype)
// Notify friends that this char logged out. [Skotlex]
iMap->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0);
- iParty->send_logout(sd);
+ party->send_logout(sd);
guild->send_memberinfoshort(sd,0);
pc->cleareventtimer(sd);
pc->inventory_rental_clear(sd);