[1] | 1 | // Copyright (c) Athena Dev Teams - Licensed under GNU GPL |
---|
| 2 | // For more information, see LICENCE in the main folder |
---|
| 3 | |
---|
| 4 | #ifndef _PARTY_H_ |
---|
| 5 | #define _PARTY_H_ |
---|
| 6 | |
---|
| 7 | #include "../common/mmo.h" // struct party |
---|
| 8 | struct block_list; |
---|
| 9 | struct map_session_data; |
---|
| 10 | struct party; |
---|
| 11 | struct item; |
---|
| 12 | |
---|
| 13 | #include <stdarg.h> |
---|
| 14 | |
---|
| 15 | struct party_member_data { |
---|
| 16 | struct map_session_data *sd; |
---|
| 17 | unsigned int hp; //For HP,x,y refreshing. |
---|
| 18 | unsigned short x, y; |
---|
| 19 | }; |
---|
| 20 | |
---|
| 21 | struct party_data { |
---|
| 22 | struct party party; |
---|
| 23 | struct party_member_data data[MAX_PARTY]; |
---|
| 24 | uint8 itemc; //For item distribution, position of last picker in party |
---|
| 25 | struct { |
---|
| 26 | unsigned monk : 1; //There's at least one monk in party? |
---|
| 27 | unsigned sg : 1; //There's at least one Star Gladiator in party? |
---|
| 28 | unsigned snovice :1; //There's a Super Novice |
---|
| 29 | unsigned tk : 1; //There's a taekwon |
---|
| 30 | } state; |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | extern int party_share_level; |
---|
| 35 | |
---|
| 36 | void do_init_party(void); |
---|
| 37 | void do_final_party(void); |
---|
| 38 | struct party_data* party_search(int party_id); |
---|
| 39 | struct party_data* party_searchname(const char* str); |
---|
| 40 | |
---|
| 41 | int party_create(struct map_session_data *sd,char *name, int item, int item2); |
---|
| 42 | void party_created(int account_id,int char_id,int fail,int party_id,char *name); |
---|
| 43 | int party_request_info(int party_id); |
---|
| 44 | int party_invite(struct map_session_data *sd,struct map_session_data *tsd); |
---|
| 45 | void party_member_joined(struct map_session_data *sd); |
---|
| 46 | int party_member_added(int party_id,int account_id,int char_id,int flag); |
---|
| 47 | int party_leave(struct map_session_data *sd); |
---|
| 48 | int party_removemember(struct map_session_data *sd,int account_id,char *name); |
---|
| 49 | int party_member_leaved(int party_id,int account_id,int char_id); |
---|
| 50 | void party_reply_invite(struct map_session_data *sd,int account_id,int flag); |
---|
| 51 | int party_recv_noinfo(int party_id); |
---|
| 52 | int party_recv_info(struct party *sp); |
---|
| 53 | int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short map,int online,int lv); |
---|
| 54 | int party_broken(int party_id); |
---|
| 55 | int party_optionchanged(int party_id,int account_id,int exp,int item,int flag); |
---|
| 56 | int party_changeoption(struct map_session_data *sd,int exp,int item); |
---|
| 57 | void party_send_movemap(struct map_session_data *sd); |
---|
| 58 | void party_send_levelup(struct map_session_data *sd); |
---|
| 59 | int party_send_logout(struct map_session_data *sd); |
---|
| 60 | int party_send_message(struct map_session_data *sd,const char *mes,int len); |
---|
| 61 | int party_recv_message(int party_id,int account_id,const char *mes,int len); |
---|
| 62 | int party_check_conflict(struct map_session_data *sd); |
---|
| 63 | int party_skill_check(struct map_session_data *sd, int party_id, int skillid, int skilllv); |
---|
| 64 | int party_send_xy_clear(struct party_data *p); |
---|
| 65 | int party_exp_share(struct party_data *p,struct block_list *src,unsigned int base_exp,unsigned int job_exp,int zeny); |
---|
| 66 | int party_share_loot(struct party_data* p, struct map_session_data* sd, struct item* item_data, int first_charid); |
---|
| 67 | int party_send_dot_remove(struct map_session_data *sd); |
---|
| 68 | int party_sub_count(struct block_list *bl, va_list ap); |
---|
| 69 | int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...); |
---|
| 70 | |
---|
| 71 | #endif /* _PARTY_H_ */ |
---|