summaryrefslogtreecommitdiff
path: root/src/map/elemental.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/elemental.c')
-rw-r--r--src/map/elemental.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/map/elemental.c b/src/map/elemental.c
index dd97e1970..b629275e5 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -6,42 +6,43 @@
#include "elemental.h"
+#include "map/atcommand.h"
+#include "map/battle.h"
+#include "map/chrif.h"
+#include "map/clif.h"
+#include "map/guild.h"
+#include "map/intif.h"
+#include "map/itemdb.h"
+#include "map/log.h"
+#include "map/map.h"
+#include "map/mob.h"
+#include "map/npc.h"
+#include "map/party.h"
+#include "map/pc.h"
+#include "map/pet.h"
+#include "map/script.h"
+#include "map/skill.h"
+#include "map/status.h"
+#include "map/trade.h"
+#include "map/unit.h"
+#include "common/cbasetypes.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/random.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "common/utils.h"
+
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "atcommand.h"
-#include "battle.h"
-#include "chrif.h"
-#include "clif.h"
-#include "guild.h"
-#include "intif.h"
-#include "itemdb.h"
-#include "log.h"
-#include "map.h"
-#include "mob.h"
-#include "npc.h"
-#include "party.h"
-#include "pc.h"
-#include "pet.h"
-#include "script.h"
-#include "skill.h"
-#include "status.h"
-#include "trade.h"
-#include "unit.h"
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-#include "../common/utils.h"
-
struct elemental_interface elemental_s;
+struct elemental_interface *elemental;
int elemental_search_index(int class_) {
int i;
@@ -560,7 +561,7 @@ int elemental_unlocktarget(struct elemental_data *ed) {
ed->target_id = 0;
elemental_stop_attack(ed);
- elemental_stop_walking(ed,1);
+ elemental_stop_walking(ed, STOPWALKING_FLAG_FIXPOS);
return 0;
}
@@ -586,8 +587,8 @@ struct skill_condition elemental_skill_get_requirements(uint16 skill_id, uint16
if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
return req;
- req.hp = skill->db[idx].hp[skill_lv-1];
- req.sp = skill->db[idx].sp[skill_lv-1];
+ req.hp = skill->dbs->db[idx].hp[skill_lv-1];
+ req.sp = skill->dbs->db[idx].sp[skill_lv-1];
return req;
}
@@ -784,8 +785,8 @@ int read_elementaldb(void) {
struct status_data *estatus;
sprintf(line, "%s/%s", map->db_path, "elemental_db.txt");
-
- if( runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
+
+ if( core->runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
memset(elemental->db,0,sizeof(elemental->db));
fp = fopen(line, "r");
@@ -979,27 +980,26 @@ void elemental_defaults(void) {
/* */
memset(elemental->db,0,sizeof(elemental->db));
-
+
/* funcs */
-
elemental->class = elemental_class;
elemental->get_viewdata = elemental_get_viewdata;
-
+
elemental->create = elemental_create;
elemental->data_received = elemental_data_received;
elemental->save = elemental_save;
-
+
elemental->change_mode_ack = elemental_change_mode_ack;
elemental->change_mode = elemental_change_mode;
-
+
elemental->heal = elemental_heal;
elemental->dead = elemental_dead;
-
+
elemental->delete = elemental_delete;
elemental->summon_stop = elemental_summon_stop;
-
+
elemental->get_lifetime = elemental_get_lifetime;
-
+
elemental->unlocktarget = elemental_unlocktarget;
elemental->skillnotok = elemental_skillnotok;
elemental->set_target = elemental_set_target;
@@ -1007,11 +1007,11 @@ void elemental_defaults(void) {
elemental->clean_effect = elemental_clean_effect;
elemental->action = elemental_action;
elemental->skill_get_requirements = elemental_skill_get_requirements;
-
+
elemental->read_skilldb = read_elemental_skilldb;
elemental->reload_db = reload_elementaldb;
elemental->reload_skilldb = reload_elemental_skilldb;
-
+
elemental->search_index = elemental_search_index;
elemental->summon_init = elemental_summon_init;
elemental->summon_end_timer = elemental_summon_end_timer;