summaryrefslogtreecommitdiff
path: root/src/map/npc.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-01-16 18:18:57 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-01-17 17:35:36 -0800
commitd0e9a569f832fae6a91d163c6c8b93f7eb924ff5 (patch)
tree8499075d69e3b00bf12c16da6a52ef4d7e98be2f /src/map/npc.cpp
parentb34acd1a97e7f087882675e812fda04d303dc6e0 (diff)
downloadtmwa-d0e9a569f832fae6a91d163c6c8b93f7eb924ff5.tar.gz
tmwa-d0e9a569f832fae6a91d163c6c8b93f7eb924ff5.tar.bz2
tmwa-d0e9a569f832fae6a91d163c6c8b93f7eb924ff5.tar.xz
tmwa-d0e9a569f832fae6a91d163c6c8b93f7eb924ff5.zip
Clean up some things after declassization
Diffstat (limited to 'src/map/npc.cpp')
-rw-r--r--src/map/npc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index 900a077..876b0fd 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -22,6 +22,8 @@
#include "script.hpp"
#include "skill.hpp"
+#include "../poison.hpp"
+
struct npc_src_list
{
struct npc_src_list *next;
@@ -76,7 +78,7 @@ void npc_enable_sub(struct block_list *bl, struct npc_data *nd)
memcpy(name, nd->name, sizeof(nd->name));
if (sd->areanpc_id == nd->bl.id)
- return;
+ return; // TODO fix leak of 'name'
sd->areanpc_id = nd->bl.id;
npc_event(sd, strcat(name, "::OnTouch"), 0);
}
@@ -686,7 +688,7 @@ int npc_touch_areanpc(struct map_session_data *sd, int m, int x, int y)
memcpy(name, map[m].npc[i]->name, 50);
if (sd->areanpc_id == map[m].npc[i]->bl.id)
- return 1;
+ return 1; // TODO fix leak of 'name'
sd->areanpc_id = map[m].npc[i]->bl.id;
if (npc_event(sd, strcat(name, "::OnTouch"), 0) > 0)
npc_click(sd, map[m].npc[i]->bl.id);