From 6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 24 Mar 2016 14:32:09 -0400 Subject: remove MESSAGE npc subtype --- src/map/npc.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/map/npc.cpp') 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 sd, Borrowed 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 sd, Borrowed 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 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 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 nd_) nd->scr.script.reset(); nd->scr.label_listv.clear(); } - else if (nd_->npc_subtype == NpcSubtype::MESSAGE) - { - dumb_ptr nd = nd_->is_message(); - nd->message = AString(); - } if (nd_->name) npcs_by_name.put(nd_->name, nullptr); nd_.delete_(); -- cgit v1.2.3-70-g09d2