summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-03 18:53:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-03 18:53:26 +0000
commit6bac06320597d550fbc4d879d6ed275c6a4c66f4 (patch)
tree7f71ca16fe9bde7cd4ad0b61ce395fecde9c9ba0 /src/map/script.c
parent3c79da4ecd74527c85d7efed818ac02692263975 (diff)
downloadhercules-6bac06320597d550fbc4d879d6ed275c6a4c66f4.tar.gz
hercules-6bac06320597d550fbc4d879d6ed275c6a4c66f4.tar.bz2
hercules-6bac06320597d550fbc4d879d6ed275c6a4c66f4.tar.xz
hercules-6bac06320597d550fbc4d879d6ed275c6a4c66f4.zip
- Fixed the reported map when there is an error in report_src (script.c)
- Earth attacks now work on hidden enemies. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5175 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 76d40d504..984689617 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -723,10 +723,17 @@ static void report_src(struct script_state *st) {
if (!bl) return;
switch (bl->type) {
case BL_NPC:
- ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, mapindex_id2name(bl->m), bl->x, bl->y);
+ if (bl->m >=0)
+ ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, map[bl->m].name, bl->x, bl->y);
+ else
+ ShowDebug("Source (NPC): %s (invisible/not on a map)\n", ((struct npc_data *)bl)->name);
+
break;
default:
- ShowDebug("Source (Non-NPC): %s (%d,%d)\n", mapindex_id2name(bl->m), bl->x, bl->y);
+ if (bl->m >=0)
+ ShowDebug("Source (Non-NPC): type %d at %s (%d,%d)\n", bl->type, map[bl->m].name, bl->x, bl->y);
+ else
+ ShowDebug("Source (Non-NPC): type %d (invisible/not on a map)\n", bl->type);
break;
}
}