summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-22 23:58:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-22 23:58:16 +0000
commit021b26b8409a84b4c83eb0cc1eedbd65eedfd4e0 (patch)
tree63b8507c38f428421d56c9d816c1d2b2b5c4cd7a /src/map/atcommand.c
parent2e2f6aff261555ae5eaee6b7777d5844b7d20544 (diff)
downloadhercules-021b26b8409a84b4c83eb0cc1eedbd65eedfd4e0.tar.gz
hercules-021b26b8409a84b4c83eb0cc1eedbd65eedfd4e0.tar.bz2
hercules-021b26b8409a84b4c83eb0cc1eedbd65eedfd4e0.tar.xz
hercules-021b26b8409a84b4c83eb0cc1eedbd65eedfd4e0.zip
- Merged the unit_data structure from jA for handling unit-related data (attack times, walking, auto-attack timers, skill related data)
- Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable" - Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type - Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it. - Cleaned up/rewrite of the pet ai, same for pet_calc_pos - Implemented use of mob variable attacked_players as it is used on jA - Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs. - Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d624afa73..ecb446dda 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -32,6 +32,7 @@
#include "script.h"
#include "npc.h"
#include "trade.h"
+#include "unit.h"
#ifndef TXT_ONLY
#include "mail.h"
@@ -3639,7 +3640,7 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap) {
if (flag)
mob_damage(NULL, md, md->hp, 2);
else
- mob_delete(md);
+ unit_remove_map(&md->bl,1);
return 1;
}
@@ -5733,7 +5734,7 @@ int atcommand_mapinfo(
clif_displaymessage(fd, "----- NPCs in Map -----");
for (i = 0; i < map[m_id].npc_num;) {
nd = map[m_id].npc[i];
- switch(nd->dir) {
+ switch(nd->ud.dir) {
case 0: strcpy(direction, "North"); break;
case 1: strcpy(direction, "North West"); break;
case 2: strcpy(direction, "West"); break;
@@ -7288,10 +7289,10 @@ atcommand_useskill(const int fd, struct map_session_data* sd,
return -1;
}
- if (skill_get_inf(skillnum) & INF_GROUND_SKILL)
- skill_use_pos(sd, pl_sd->bl.x, pl_sd->bl.y, skillnum, skilllv);
+ if (skill_get_inf(skillnum)&INF_GROUND_SKILL)
+ unit_skilluse_pos(&sd->bl, pl_sd->bl.x, pl_sd->bl.y, skillnum, skilllv);
else
- skill_use_id(sd, pl_sd->bl.id, skillnum, skilllv);
+ unit_skilluse_id(&sd->bl, pl_sd->bl.id, skillnum, skilllv);
return 0;
}
@@ -7531,9 +7532,9 @@ atcommand_grind(const int fd, struct map_session_data* sd,
inf = skill_get_inf(skillnum);
if (inf & INF_GROUND_SKILL)
- skill_use_pos(sd, pl_sd->bl.x+5, pl_sd->bl.y+5, skillnum, 1);
+ unit_skilluse_pos(&sd->bl, pl_sd->bl.x, pl_sd->bl.y, skillnum, 1);
else if (!(inf & INF_SUPPORT_SKILL))
- skill_use_id(sd, pl_sd->bl.id, skillnum, 1);
+ unit_skilluse_id(&sd->bl, pl_sd->bl.id, skillnum, 1);
}
return 0;