summaryrefslogtreecommitdiff
path: root/src/map/mercenary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mercenary.h')
-rw-r--r--src/map/mercenary.h89
1 files changed, 54 insertions, 35 deletions
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 994c7aaa4..270245e96 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,11 +1,12 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#ifndef _MERCENARY_H_
-#define _MERCENARY_H_
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+#ifndef MAP_MERCENARY_H
+#define MAP_MERCENARY_H
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+#include "../common/cbasetypes.h"
// number of cells that a mercenary can walk to from it's master before being warped
#define MAX_MER_DISTANCE 15
@@ -28,8 +29,6 @@ struct s_mercenary_db {
} skill[MAX_MERCSKILL];
};
-extern struct s_mercenary_db mercenary_db[MAX_MERCENARY_CLASS];
-
struct mercenary_data {
struct block_list bl;
struct unit_data ud;
@@ -37,7 +36,6 @@ struct mercenary_data {
struct status_data base_status, battle_status;
struct status_change sc;
struct regen_data regen;
-
struct s_mercenary_db *db;
struct s_mercenary mercenary;
char blockskill[MAX_SKILL];
@@ -46,38 +44,59 @@ struct mercenary_data {
int contract_timer;
unsigned devotion_flag : 1;
- unsigned int masterteleport_timer;
+ int64 masterteleport_timer;
};
-bool merc_class(int class_);
-struct view_data * merc_get_viewdata(int class_);
-
-int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime);
-int merc_data_received(struct s_mercenary *merc, bool flag);
-int mercenary_save(struct mercenary_data *md);
+/*=====================================
+* Interface : mercenary.h
+* Generated by HerculesInterfaceMaker
+* created by Susu
+*-------------------------------------*/
+struct mercenary_interface {
-void mercenary_heal(struct mercenary_data *md, int hp, int sp);
-int mercenary_dead(struct mercenary_data *md);
-
-int merc_delete(struct mercenary_data *md, int reply);
-void merc_contract_stop(struct mercenary_data *md);
+ /* vars */
+
+ struct s_mercenary_db db[MAX_MERCENARY_CLASS];
-int mercenary_get_lifetime(struct mercenary_data *md);
-int mercenary_get_guild(struct mercenary_data *md);
-int mercenary_get_faith(struct mercenary_data *md);
-int mercenary_set_faith(struct mercenary_data *md, int value);
-int mercenary_get_calls(struct mercenary_data *md);
-int mercenary_set_calls(struct mercenary_data *md, int value);
-int mercenary_kills(struct mercenary_data *md);
+ /* funcs */
-int mercenary_checkskill(struct mercenary_data *md, uint16 skill_id);
+ void (*init) (bool minimal);
+
+ bool (*class) (int class_);
+ struct view_data * (*get_viewdata) (int class_);
+
+ int (*create) (struct map_session_data *sd, int class_, unsigned int lifetime);
+ int (*data_received) (struct s_mercenary *merc, bool flag);
+ int (*save) (struct mercenary_data *md);
+
+ void (*heal) (struct mercenary_data *md, int hp, int sp);
+ int (*dead) (struct mercenary_data *md);
+
+ int (*delete) (struct mercenary_data *md, int reply);
+ void (*contract_stop) (struct mercenary_data *md);
+
+ int (*get_lifetime) (struct mercenary_data *md);
+ int (*get_guild) (struct mercenary_data *md);
+ int (*get_faith) (struct mercenary_data *md);
+ int (*set_faith) (struct mercenary_data *md, int value);
+ int (*get_calls) (struct mercenary_data *md);
+ int (*set_calls) (struct mercenary_data *md, int value);
+ int (*kills) (struct mercenary_data *md);
+
+ int (*checkskill) (struct mercenary_data *md, uint16 skill_id);
+ int (*read_db) (void);
+ int (*read_skilldb) (void);
+
+ int (*killbonus) (struct mercenary_data *md);
+ int (*search_index) (int class_);
+
+ int (*contract_end_timer) (int tid, int64 tick, int id, intptr_t data);
+ bool (*read_db_sub) (char* str[], int columns, int current);
+ bool (*read_skill_db_sub) (char* str[], int columns, int current);
+};
-/**
- * atcommand.c required
- **/
-int read_mercenarydb(void);
-int read_mercenary_skilldb(void);
+struct mercenary_interface *mercenary;
-int do_init_mercenary(void);
+void mercenary_defaults(void);
-#endif /* _MERCENARY_H_ */
+#endif /* MAP_MERCENARY_H */