summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-25 07:03:38 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-25 07:03:38 -0700
commita996d4bff3cc5a35ee5cdb6cb5bdef920cf44120 (patch)
tree0591f75cc18f7b7b20e39a0627a1606867e12edc /src/npc.cpp
parente116e2a34ec507ab0f2ab65662a7c4ae8f587341 (diff)
downloadmana-a996d4bff3cc5a35ee5cdb6cb5bdef920cf44120.tar.gz
mana-a996d4bff3cc5a35ee5cdb6cb5bdef920cf44120.tar.bz2
mana-a996d4bff3cc5a35ee5cdb6cb5bdef920cf44120.tar.xz
mana-a996d4bff3cc5a35ee5cdb6cb5bdef920cf44120.zip
If no network is set, then don't continue
Only checks in these two palces for now, as missing network in the others would indicate a design flaw.
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index 0d568309..701e280b 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -112,6 +112,7 @@ Being::Type NPC::getType() const
void NPC::talk()
{
+ if (!mNetwork) return;
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_NPC_TALK);
outMsg.writeInt32(mId);
@@ -120,6 +121,7 @@ void NPC::talk()
void NPC::nextDialog()
{
+ if (!mNetwork) return;
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_NPC_NEXT_REQUEST);
outMsg.writeInt32(mId);