summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/party.c147
-rw-r--r--src/map/party.h48
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/skill.c36
6 files changed, 121 insertions, 124 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 98e132077..327a4b98c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -791,7 +791,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
damage += 4;
if(sd->status.party_id && (skill2_lv=pc->checkskill(sd,TK_POWER)) > 0) {
- if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 )
+ if( (i = party->foreachsamemap(party->sub_count, sd, 0)) > 1 )
damage += 2 * skill2_lv * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/;
}
#else
@@ -1556,7 +1556,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
c = 0;
memset (p_sd, 0, sizeof(p_sd));
- party_foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
+ party->foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
c = ( c > 1 ? rand()%c : 0 );
if( (psd = map->id2sd(p_sd[c])) && pc->checkskill(psd,WL_COMET) > 0 ){
@@ -4534,7 +4534,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#ifndef RENEWAL
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
- if( (i = party_foreachsamemap(party->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);
}
#endif
diff --git a/src/map/map.c b/src/map/map.c
index 37f0817c4..5c973889e 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -4907,7 +4907,7 @@ void do_final(void)
instance->final();
gstorage->final();
guild->final();
- party->do_final_party();
+ party->final();
pc->do_final_pc();
pet->final();
mob->final();
@@ -5387,7 +5387,7 @@ int do_init(int argc, char *argv[])
mob->init();
pc->do_init_pc();
status->init();
- party->do_init_party();
+ party->init();
guild->init();
gstorage->init();
pet->init();
diff --git a/src/map/party.c b/src/map/party.c
index db4b88f7d..29ab5044c 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/cbasetypes.h"
#include "../common/timer.h"
@@ -29,20 +30,13 @@
#include <string.h>
-static DBMap* party_db; // int party_id -> struct party_data* (releases data)
-static DBMap* party_booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
-static unsigned long party_booking_nextid = 1;
-
struct party_interface party_s;
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
/*==========================================
* Fills the given party_member structure according to the sd provided.
* Used when creating/adding people to a party. [Skotlex]
*------------------------------------------*/
-static void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader)
-{
+void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader) {
member->account_id = sd->status.account_id;
member->char_id = sd->status.char_id;
safestrncpy(member->name, sd->status.name, NAME_LENGTH);
@@ -54,8 +48,7 @@ static void party_fill_member(struct party_member* member, struct map_session_da
}
/// Get the member_id of a party member.
/// Return -1 if not in party.
-int party_getmemberid(struct party_data* p, struct map_session_data* sd)
-{
+int party_getmemberid(struct party_data* p, struct map_session_data* sd) {
int member_id;
nullpo_retr(-1, p);
if( sd == NULL )
@@ -68,7 +61,6 @@ int party_getmemberid(struct party_data* p, struct map_session_data* sd)
return member_id;
}
-
/*==========================================
* Request an available sd of this party
*------------------------------------------*/
@@ -83,8 +75,7 @@ struct map_session_data* party_getavailablesd(struct party_data *p)
/*==========================================
* Retrieves and validates the sd pointer for this party member [Skotlex]
*------------------------------------------*/
-
-static TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
+TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
TBL_PC* sd = map->id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
@@ -108,30 +99,12 @@ int party_db_final(DBKey key, DBData *data, va_list ap) {
return 0;
}
-/*==========================================
- * Destructor
- * Called in map shutdown, cleanup var
- *------------------------------------------*/
-void do_final_party(void)
-{
- party_db->destroy(party_db,party_db_final);
- party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
-}
-// Constructor, init vars
-void do_init_party(void)
-{
- party_db = idb_alloc(DB_OPT_RELEASE_DATA);
- party_booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
- timer->add_func_list(party_send_xy_timer, "party_send_xy_timer");
- timer->add_interval(timer->gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval);
-}
-
/// Party data lookup using party id.
struct party_data* party_search(int party_id)
{
if(!party_id)
return NULL;
- return (struct party_data*)idb_get(party_db,party_id);
+ return (struct party_data*)idb_get(party->db,party_id);
}
/// Party data lookup using party name.
@@ -139,7 +112,7 @@ struct party_data* party_searchname(const char* str)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
if( strncmpi(p->party.name,str,NAME_LENGTH) == 0 )
@@ -171,7 +144,7 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
sd->party_creating = true;
- party_fill_member(&leader, sd, 1);
+ party->fill_member(&leader, sd, 1);
intif->create_party(&leader,name,item,item2);
return 0;
@@ -219,29 +192,27 @@ int party_recv_noinfo(int party_id, int char_id) {
return 0;
}
-static void party_check_state(struct party_data *p)
-{
+void party_check_state(struct party_data *p) {
int i;
memset(&p->state, 0, sizeof(p->state));
- for (i = 0; i < MAX_PARTY; i ++)
- {
+ for (i = 0; i < MAX_PARTY; i ++) {
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
switch (p->party.member[i].class_) {
- case JOB_MONK:
- case JOB_BABY_MONK:
- case JOB_CHAMPION:
- p->state.monk = 1;
- break;
- case JOB_STAR_GLADIATOR:
- p->state.sg = 1;
- break;
- case JOB_SUPER_NOVICE:
- case JOB_SUPER_BABY:
- p->state.snovice = 1;
- break;
- case JOB_TAEKWON:
- p->state.tk = 1;
- break;
+ case JOB_MONK:
+ case JOB_BABY_MONK:
+ case JOB_CHAMPION:
+ p->state.monk = 1;
+ break;
+ case JOB_STAR_GLADIATOR:
+ p->state.sg = 1;
+ break;
+ case JOB_SUPER_NOVICE:
+ case JOB_SUPER_BABY:
+ p->state.snovice = 1;
+ break;
+ case JOB_TAEKWON:
+ p->state.tk = 1;
+ break;
}
}
}
@@ -260,7 +231,7 @@ int party_recv_info(struct party* sp, int char_id)
nullpo_ret(sp);
- p = (struct party_data*)idb_get(party_db, sp->party_id);
+ p = (struct party_data*)idb_get(party->db, sp->party_id);
if( p != NULL ) {// diff members
for( member_id = 0; member_id < MAX_PARTY; ++member_id ) {
member = &p->party.member[member_id];
@@ -289,7 +260,7 @@ int party_recv_info(struct party* sp, int char_id)
CREATE(p, struct party_data, 1);
p->instance = NULL;
p->instances = 0;
- idb_put(party_db, sp->party_id, p);
+ idb_put(party->db, sp->party_id, p);
}
while( removed_count > 0 ) {// no longer in party
member_id = removed[--removed_count];
@@ -305,9 +276,9 @@ int party_recv_info(struct party* sp, int char_id)
member = &p->party.member[member_id];
if ( member->char_id == 0 )
continue;// empty
- p->data[member_id].sd = party_sd_check(sp->party_id, member->account_id, member->char_id);
+ p->data[member_id].sd = party->sd_check(sp->party_id, member->account_id, member->char_id);
}
- party_check_state(p);
+ party->check_state(p);
while( added_count > 0 ) { // new in party
member_id = added[--added_count];
sd = p->data[member_id].sd;
@@ -412,7 +383,7 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag) {
if( flag == 1 && !sd->party_creating && !sd->party_joining )
{// accepted and allowed
sd->party_joining = true;
- party_fill_member(&member, sd, 0);
+ party->fill_member(&member, sd, 0);
intif->party_addmember(sd->party_invite, &member);
}
else
@@ -571,7 +542,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
memset(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
- party_check_state(p);
+ party->check_state(p);
}
}
@@ -615,7 +586,7 @@ int party_broken(int party_id)
}
}
- idb_remove(party_db,party_id);
+ idb_remove(party->db,party_id);
return 0;
}
@@ -722,7 +693,7 @@ int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short m
m->online = online;
m->lv = lv;
//Check if they still exist on this map server
- p->data[i].sd = party_sd_check(party_id, account_id, char_id);
+ p->data[i].sd = party->sd_check(party_id, account_id, char_id);
clif->party_info(p,NULL);
return 0;
@@ -864,7 +835,7 @@ int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
// for each existing party,
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
@@ -1111,11 +1082,10 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
* Party Booking in KRO [Spiria]
*------------------------------------------*/
-static struct party_booking_ad_info* create_party_booking_data(void)
-{
+struct party_booking_ad_info* create_party_booking_data(void) {
struct party_booking_ad_info *pb_ad;
CREATE(pb_ad, struct party_booking_ad_info, 1);
- pb_ad->index = party_booking_nextid++;
+ pb_ad->index = party->booking_nextid++;
return pb_ad;
}
@@ -1130,12 +1100,12 @@ void party_booking_register(struct map_session_data *sd, short level, const char
int i;
#endif
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
{
- pb_ad = create_party_booking_data();
- idb_put(party_booking_db, sd->status.char_id, pb_ad);
+ pb_ad = party->create_booking_data();
+ idb_put(party->booking_db, sd->status.char_id, pb_ad);
}
else
{// already registered
@@ -1172,7 +1142,7 @@ void party_booking_update(struct map_session_data *sd, const char *notice)
#endif
struct party_booking_ad_info *pb_ad;
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
return;
@@ -1206,7 +1176,7 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
int count = 0;
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
- DBIterator* iter = db_iterator(party_booking_db);
+ DBIterator* iter = db_iterator(party->booking_db);
memset(result_list, 0, sizeof(result_list));
@@ -1250,14 +1220,24 @@ bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
- if((pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id))!=NULL)
+ if((pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id))!=NULL)
{
clif->PartyBookingDeleteNotify(sd, pb_ad->index);
- idb_remove(party_booking_db,sd->status.char_id);
+ idb_remove(party->booking_db,sd->status.char_id);
}
return true;
}
-
+void do_final_party(void) {
+ party->db->destroy(party->db,party->db_final);
+ db_destroy(party->booking_db); // Party Booking [Spiria]
+}
+// Constructor, init vars
+void do_init_party(void) {
+ party->db = idb_alloc(DB_OPT_RELEASE_DATA);
+ party->booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
+ timer->add_func_list(party->send_xy_timer, "party_send_xy_timer");
+ timer->add_interval(timer->gettick()+battle_config.party_update_interval, party->send_xy_timer, 0, 0, battle_config.party_update_interval);
+}
/*=====================================
* Default Functions : party.h
* Generated by HerculesInterfaceMaker
@@ -1266,10 +1246,14 @@ bool party_booking_delete(struct map_session_data *sd)
void party_defaults(void) {
party = &party_s;
+ /* */
+ party->db = NULL;
+ party->booking_db = NULL;
+ party->booking_nextid = 1;
/* funcs */
-
- party->do_init_party = do_init_party;
- party->do_final_party = do_final_party;
+ party->init = do_init_party;
+ party->final = do_final_party;
+ /* */
party->search = party_search;
party->searchname = party_searchname;
party->getmemberid = party_getmemberid;
@@ -1307,4 +1291,11 @@ void party_defaults(void) {
party->booking_update = party_booking_update;
party->booking_search = party_booking_search;
party->booking_delete = party_booking_delete;
+ party->foreachsamemap = party_foreachsamemap;
+ party->send_xy_timer = party_send_xy_timer;
+ party->fill_member = party_fill_member;
+ party->sd_check = party_sd_check;
+ party->check_state = party_check_state;
+ party->create_booking_data = create_party_booking_data;
+ party->db_final = party_db_final;
}
diff --git a/src/map/party.h b/src/map/party.h
index 7ade6b841..c2c13cc4f 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -1,16 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _PARTY_H_
#define _PARTY_H_
+
#include "../common/mmo.h" // struct party
#include "../config/core.h"
-struct block_list;
-struct map_session_data;
-struct party;
-struct item;
-
#include <stdarg.h>
+#include "map.h"
+
#define PARTY_BOOKING_JOBS 6
#define PARTY_BOOKING_RESULTS 10
@@ -47,7 +47,7 @@ struct party_booking_ad_info {
long expiretime;
struct party_booking_detail p_detail;
};
-#else
+#else /* PARTY_RECRUIT */
#define PB_NOTICE_LENGTH (36 + 1)
struct party_booking_detail {
short level;
@@ -60,14 +60,7 @@ struct party_booking_ad_info {
char charname[NAME_LENGTH];
struct party_booking_detail p_detail;
};
-#endif
-
-
-int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
-
-/*==========================================
- * Party Booking in KRO [Spiria]
- *------------------------------------------*/
+#endif /* PARTY_RECRUIT */
/*=====================================
* Interface : party.h
@@ -75,11 +68,13 @@ int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_ses
* created by Susu
*-------------------------------------*/
struct party_interface {
-
+ DBMap* db; // int party_id -> struct party_data* (releases data)
+ DBMap* booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
+ unsigned long booking_nextid;
/* funcs */
-
- void (*do_init_party) (void);
- void (*do_final_party) (void);
+ void (*init) (void);
+ void (*final) (void);
+ /* */
struct party_data* (*search) (int party_id);
struct party_data* (*searchname) (const char* str);
int (*getmemberid) (struct party_data* p, struct map_session_data* sd);
@@ -113,16 +108,27 @@ struct party_interface {
int (*share_loot) (struct party_data* p, struct map_session_data* sd, struct item* item_data, int first_charid);
int (*send_dot_remove) (struct map_session_data *sd);
int (*sub_count) (struct block_list *bl, va_list ap);
+ /*==========================================
+ * Party Booking in KRO [Spiria]
+ *------------------------------------------*/
#ifndef PARTY_RECRUIT
void (*booking_register) (struct map_session_data *sd, short level, short mapid, short* job);
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);
-#else
+#else /* PARTY_RECRUIT */
void (*booking_register) (struct map_session_data *sd, short level, const char *notice);
void (*booking_update) (struct map_session_data *sd, const char *notice);
void (*booking_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount);
#endif
bool (*booking_delete) (struct map_session_data *sd);
+ /* */
+ int (*foreachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*fill_member) (struct party_member* member, struct map_session_data* sd, unsigned int leader);
+ TBL_PC* (*sd_check) (int party_id, int account_id, int char_id);
+ void (*check_state) (struct party_data *p);
+ struct party_booking_ad_info* (*create_booking_data) (void);
+ int (*db_final) (DBKey key, DBData *data, va_list ap);
};
struct party_interface *party;
diff --git a/src/map/pc.c b/src/map/pc.c
index 1a5efe48a..362ee0873 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -337,7 +337,7 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) {
c = 0;
memset(b_sd, 0, sizeof(b_sd));
- i = party_foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
+ i = party->foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
if( c < 1 ) {
//just recalc status no need to recalc hp
@@ -4714,7 +4714,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
}
if(battle_config.show_steal_in_same_party)
- party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
+ party->foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
//Logs items, Stolen from mobs [Lupus]
logs->pick_mob(md, LOG_TYPE_STEAL, -1, &tmp_item, data);
diff --git a/src/map/skill.c b/src/map/skill.c
index 96c439741..506a13ea8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5035,7 +5035,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
}
skill->area_temp[0] = 0;
- party_foreachsamemap(skill->area_sub,
+ party->foreachsamemap(skill->area_sub,
sd,skill->get_splash(skill_id, skill_lv),
src,skill_id,skill_lv,tick, flag|BCT_PARTY|1,
skill->castend_nodamage_id);
@@ -5893,14 +5893,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || (flag & 1) )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case MER_MAGNIFICAT:
if( mer != NULL )
{
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
if( mer->master && mer->master->status.party_id != 0 && !(flag&1) )
- party_foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
else if( mer->master && !(flag&1) )
clif->skill_nodamage(src, &mer->master->bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
}
@@ -5914,7 +5914,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl,bl,skill_id,skill_lv,
sc_start2(bl,type,100,skill_lv,(src == bl)? 1:0,skill->get_time(skill_id,skill_lv)));
} else if (sd) {
- party_foreachsamemap(skill->area_sub,
+ party->foreachsamemap(skill->area_sub,
sd,skill->get_splash(skill_id, skill_lv),
src,skill_id,skill_lv,tick, flag|BCT_PARTY|1,
skill->castend_nodamage_id);
@@ -7639,7 +7639,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
else
clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
@@ -7719,9 +7719,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(bl,type,100,skill->area_temp[5]/4,skill->get_time(skill_id,skill_lv));
} else if( sd ) {
if( sd->status.party_id ) {
- i = party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
+ i = party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,BCT_PARTY,skill->area_sub_count);
skill->area_temp[5] = 7 * i; // ATK
- party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
} else
sc_start2(bl,type,100,7,5,skill->get_time(skill_id,skill_lv));
}
@@ -7785,7 +7785,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
skill->area_temp[5] |= 0x200;
}
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
/**
@@ -7887,7 +7887,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( !i )
clif->skill_fail(sd,skill_id,USESKILL_FAIL,0);
else
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -7895,7 +7895,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || flag&1 )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start4(bl, type, 100, skill_lv, 0, 0, 1, skill->get_time(skill_id, skill_lv)));
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case AB_CHEAL:
@@ -7913,7 +7913,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
}
}
else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case AB_ORATIO:
@@ -7942,7 +7942,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
@@ -7959,7 +7959,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
@@ -8564,7 +8564,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -8575,7 +8575,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start4(bl,type,100,skill_lv,6*skill_lv,(sd?pc->checkskill(sd,WM_LESSON):0),(sd?sd->status.job_level:0),skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
}
break;
@@ -8667,7 +8667,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
uint16 lv = skill_lv;
int count = skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1);
if( sc_start2(bl,type,100,skill_lv,count,skill->get_time(skill_id,skill_lv)) )
- party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
}
@@ -8883,7 +8883,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd->status.party_id == 0 || flag&1 )
skill->unitsetting(src,MG_SAFETYWALL,skill_lv,bl->x,bl->y,0);
else
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
break;
case GN_CHANGEMATERIAL:
@@ -12187,7 +12187,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16
c = 0;
memset (p_sd, 0, sizeof(p_sd));
if( is_chorus )
- i = party_foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
+ i = party->foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
else
i = map->foreachinrange(skill->check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id);