summaryrefslogtreecommitdiff
path: root/src/char/int_party.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-08 19:20:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 11:47:29 +0300
commitb451aaff923c7695ba6087f1b9b44ed53b943ee4 (patch)
tree605bd3d621fb764f20a134eea8f60c0b5f8af3b2 /src/char/int_party.h
parent7e6df4619270cbec689f4d6d73c5fc0498c2ed18 (diff)
downloadhercules-b451aaff923c7695ba6087f1b9b44ed53b943ee4.tar.gz
hercules-b451aaff923c7695ba6087f1b9b44ed53b943ee4.tar.bz2
hercules-b451aaff923c7695ba6087f1b9b44ed53b943ee4.tar.xz
hercules-b451aaff923c7695ba6087f1b9b44ed53b943ee4.zip
Add most functions from int_party.c to interfaces.
Diffstat (limited to 'src/char/int_party.h')
-rw-r--r--src/char/int_party.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/char/int_party.h b/src/char/int_party.h
index 2b24b1d1a..d85c1c3ea 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -4,6 +4,8 @@
#ifndef CHAR_INT_PARTY_H
#define CHAR_INT_PARTY_H
+#include "../common/mmo.h"
+
//Party Flags on what to save/delete.
enum {
PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
@@ -14,11 +16,31 @@ enum {
PS_BREAK = 0x20, //Specify that this party must be deleted.
};
-int inter_party_parse_frommap(int fd);
-int inter_party_sql_init(void);
-void inter_party_sql_final(void);
-int inter_party_leave(int party_id,int account_id, int char_id);
-int inter_party_CharOnline(int char_id, int party_id);
-int inter_party_CharOffline(int char_id, int party_id);
+struct party_data {
+ struct party party;
+ unsigned int min_lv, max_lv;
+ int family; //Is this party a family? if so, this holds the child id.
+ unsigned char size; //Total size of party.
+};
+
+void inter_party_defaults(void);
+
+struct inter_party_interface {
+ int (*check_lv) (struct party_data *p);
+ void (*calc_state) (struct party_data *p);
+ int (*tosql) (struct party *p, int flag, int index);
+ struct party_data* (*fromsql) (int party_id);
+ int (*sql_init) (void);
+ void (*sql_final) (void);
+ struct party_data* (*search_partyname) (const char *str);
+ int (*check_exp_share) (struct party_data *p);
+ int (*check_empty) (struct party_data *p);
+ int (*parse_frommap) (int fd);
+ int (*leave) (int party_id,int account_id, int char_id);
+ int (*CharOnline) (int char_id, int party_id);
+ int (*CharOffline) (int char_id, int party_id);
+};
+
+struct inter_party_interface *inter_party;
#endif /* CHAR_INT_PARTY_H */