summaryrefslogtreecommitdiff
path: root/src/map/guild.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/guild.h')
-rw-r--r--src/map/guild.h63
1 files changed, 62 insertions, 1 deletions
diff --git a/src/map/guild.h b/src/map/guild.h
index 1f61df09e..566ca7ce4 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -6,14 +6,32 @@
#define _GUILD_H_
//#include "../common/mmo.h"
+#include "map.h" // NAME_LENGTH
+
+/**
+ * Declarations
+ **/
struct guild;
struct guild_member;
struct guild_position;
struct guild_castle;
-#include "map.h" // NAME_LENGTH
struct map_session_data;
struct mob_data;
+/**
+ * Defines
+ **/
+#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
+#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
+#define MAX_GUILD_SKILL_REQUIRE 5
+
+/**
+ * Structures
+ **/
+struct eventlist {
+ char name[EVENT_NAME_LENGTH];
+ struct eventlist *next;
+};
//For quick linking to a guardian's info. [Skotlex]
struct guardian_data {
int number; //0-MAX_GUARDIANS-1 = Guardians. MAX_GUARDIANS = Emperium.
@@ -23,11 +41,36 @@ struct guardian_data {
char guild_name[NAME_LENGTH];
struct guild_castle* castle;
};
+struct guild_expcache {
+ int guild_id, account_id, char_id;
+ uint64 exp;
+};
+struct s_guild_skill_tree {
+ int id;
+ int max;
+ struct {
+ short id;
+ short lv;
+ } need[MAX_GUILD_SKILL_REQUIRE];
+};
+
struct guild_interface {
void (*init) (void);
void (*final) (void);
/* */
+ DBMap* db; // int guild_id -> struct guild*
+ DBMap* castle_db; // int castle_id -> struct guild_castle*
+ DBMap* expcache_db; // int char_id -> struct guild_expcache*
+ DBMap* infoevent_db; // int guild_id -> struct eventlist*
+ /* */
+ struct eri *expcache_ers; //For handling of guild exp payment.
+ /* */
+ struct s_guild_skill_tree skill_tree[MAX_GUILDSKILL];
+ /* guild flags cache */
+ struct npc_data **flags;
+ unsigned short flags_count;
+ /* */
int (*skill_get_max) (int id);
/* */
int (*checkskill) (struct guild *g,int id);
@@ -104,6 +147,24 @@ struct guild_interface {
void (*flags_clear) (void);
/* guild aura */
void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+ /* */
+ int (*payexp_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id);
+ bool (*read_guildskill_tree_db) (char* split[], int columns, int current);
+ bool (*read_castledb) (char* str[], int columns, int current);
+ int (*payexp_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ DBData (*create_expcache) (DBKey key, va_list args);
+ int (*eventlist_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*expcache_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*castle_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*broken_sub) (DBKey key, DBData *data, va_list ap);
+ int (*castle_broken_sub) (DBKey key, DBData *data, va_list ap);
+ void (*makemember) (struct guild_member *m,struct map_session_data *sd);
+ int (*check_member) (struct guild *g);
+ int (*get_alliance_count) (struct guild *g,int flag);
+ void (*castle_reconnect_sub) (void *key, void *data, va_list ap);
};
struct guild_interface *guild;