summaryrefslogtreecommitdiff
path: root/src/map/npc.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-03-24 14:32:09 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-15 11:47:24 -0400
commit6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8 (patch)
tree811c8fc97471c8241aeae9acc3a9749a26e5fdc9 /src/map/npc.cpp
parent502b3b714f0f636dac80bd600e174a173bd7028e (diff)
downloadtmwa-6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8.tar.gz
tmwa-6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8.tar.bz2
tmwa-6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8.tar.xz
tmwa-6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8.zip
remove MESSAGE npc subtype
Diffstat (limited to 'src/map/npc.cpp')
-rw-r--r--src/map/npc.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index b7fb9ca..a8c90d8 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -669,11 +669,6 @@ int npc_touch_areanpc(dumb_ptr<map_session_data> sd, Borrowed<map_local> m, int
xs = m->npc[i]->is_warp()->warp.xs;
ys = m->npc[i]->is_warp()->warp.ys;
break;
- case NpcSubtype::MESSAGE:
- assert (0 && "I'm pretty sure these are never put on a map"_s);
- xs = 0;
- ys = 0;
- break;
case NpcSubtype::SCRIPT:
xs = m->npc[i]->is_script()->scr.xs;
ys = m->npc[i]->is_script()->scr.ys;
@@ -703,9 +698,6 @@ int npc_touch_areanpc(dumb_ptr<map_session_data> sd, Borrowed<map_local> m, int
pc_setpos(sd, m->npc[i]->is_warp()->warp.name,
m->npc[i]->is_warp()->warp.x, m->npc[i]->is_warp()->warp.y, BeingRemoveWhy::GONE);
break;
- case NpcSubtype::MESSAGE:
- assert (0 && "I'm pretty sure these NPCs are never put on a map."_s);
- break;
case NpcSubtype::SCRIPT:
{
NpcEvent aname;
@@ -793,13 +785,6 @@ int npc_click(dumb_ptr<map_session_data> sd, BlockId id)
case NpcSubtype::SCRIPT:
sd->npc_pos = run_script(ScriptPointer(script_or_parent(nd->is_script()), 0), sd->bl_id, id);
break;
- case NpcSubtype::MESSAGE:
- if (nd->is_message()->message)
- {
- clif_scriptmes(sd, id, nd->is_message()->message);
- clif_scriptclose(sd, id);
- }
- break;
}
return 0;
@@ -825,7 +810,7 @@ int npc_scriptcont(dumb_ptr<map_session_data> sd, BlockId id)
nd = map_id_is_npc(id);
- if (!nd /* NPC was disposed? */ || nd->npc_subtype == NpcSubtype::MESSAGE)
+ if (!nd /* NPC was disposed? */)
{
clif_scriptclose(sd, id);
npc_event_dequeue(sd);
@@ -1023,11 +1008,6 @@ void npc_free_internal(dumb_ptr<npc_data> nd_)
nd->scr.script.reset();
nd->scr.label_listv.clear();
}
- else if (nd_->npc_subtype == NpcSubtype::MESSAGE)
- {
- dumb_ptr<npc_data_message> nd = nd_->is_message();
- nd->message = AString();
- }
if (nd_->name)
npcs_by_name.put(nd_->name, nullptr);
nd_.delete_();