summaryrefslogtreecommitdiff
path: root/src/map/elemental.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/elemental.h')
-rw-r--r--src/map/elemental.h43
1 files changed, 33 insertions, 10 deletions
diff --git a/src/map/elemental.h b/src/map/elemental.h
index ccc3bcb5f..b42d5c0b7 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -1,9 +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 _ELEMENTAL_H_
#define _ELEMENTAL_H_
+
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+
+/**
+ * Defines
+ **/
#define MIN_ELETHINKTIME 100
#define MIN_ELEDISTANCE 2
#define MAX_ELEDISTANCE 5
@@ -13,10 +20,18 @@
#define EL_SKILLMODE_PASIVE 0x1
#define EL_SKILLMODE_ASSIST 0x2
#define EL_SKILLMODE_AGGRESSIVE 0x4
+
+#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
+#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
+
+/**
+ * Structures
+ **/
struct elemental_skill {
unsigned short id, lv;
short mode;
};
+
struct s_elemental_db {
int class_;
char sprite[NAME_LENGTH], name[NAME_LENGTH];
@@ -26,6 +41,7 @@ struct s_elemental_db {
struct view_data vd;
struct elemental_skill skill[MAX_ELESKILLTREE];
};
+
struct elemental_data {
struct block_list bl;
struct unit_data ud;
@@ -46,9 +62,6 @@ struct elemental_data {
int target_id, attacked_id;
};
-#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
-#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
-
/*=====================================
* Interface : elemental.h
* Generated by HerculesInterfaceMaker
@@ -57,8 +70,11 @@ struct elemental_data {
struct elemental_interface {
/* vars */
- struct s_elemental_db elemental_db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ struct s_elemental_db db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ /* */
+ int (*init) (void);
+ void (*final) (void);
/* funcs */
bool (*class) (int class_);
struct view_data * (*get_viewdata) (int class_);
@@ -87,11 +103,18 @@ struct elemental_interface {
struct skill_condition (*skill_get_requirements) (uint16 skill_id, uint16 skill_lv);
int (*read_skilldb) (void);
- void (*reload_elementaldb) (void);
+ void (*reload_db) (void);
void (*reload_skilldb) (void);
- int (*do_init_elemental) (void);
- void (*do_final_elemental) (void);
-} elemental_s;
+
+ int (*search_index) (int class_);
+ void (*summon_init) (struct elemental_data *ed);
+ int (*summon_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_sub_timer_activesearch) (struct block_list *bl, va_list ap);
+ int (*ai_sub_timer) (struct elemental_data *ed, struct map_session_data *sd, unsigned int tick);
+ int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
+ int (*ai_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*read_db) (void);
+};
struct elemental_interface *elemental;