diff options
author | shennetsind <ind@henn.et> | 2013-09-27 18:08:51 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-27 18:08:51 -0300 |
commit | c728c1f7d1ccff7c1a1bcf4b7a4dd4ef15a0b599 (patch) | |
tree | bcb4aa49f0b15538c8fdd80b71eeda3b4fb8a2c2 /src/map/elemental.h | |
parent | 6b00c1c8ef7ebe324c6c02f5a9f1abf9eeb3a581 (diff) | |
download | hercules-c728c1f7d1ccff7c1a1bcf4b7a4dd4ef15a0b599.tar.gz hercules-c728c1f7d1ccff7c1a1bcf4b7a4dd4ef15a0b599.tar.bz2 hercules-c728c1f7d1ccff7c1a1bcf4b7a4dd4ef15a0b599.tar.xz hercules-c728c1f7d1ccff7c1a1bcf4b7a4dd4ef15a0b599.zip |
HPM: Elemental.c Completed
Moved missing vars and declarations of interest into the interface, removed duplicate mentions of elemental within calls to shorten wherever it made sense to.
And on a minor thing updated the duel.h header given the file had been previously modified (when the duel interface was implemented)
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/elemental.h')
-rw-r--r-- | src/map/elemental.h | 43 |
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; |