summaryrefslogtreecommitdiff
path: root/src/net/tmwa/npchandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/npchandler.cpp')
-rw-r--r--src/net/tmwa/npchandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index 898e9fff4..0c0b13116 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -52,7 +52,7 @@ NpcHandler::NpcHandler() :
void NpcHandler::talk(const Being *const being) const
{
- if (!being)
+ if (being == nullptr)
return;
createOutPacket(CMSG_NPC_TALK);
outMsg.writeBeingId(being->getId(), "npc id");
@@ -74,7 +74,7 @@ void NpcHandler::closeDialog(const BeingId npcId)
if (it != NpcDialog::mNpcDialogs.end())
{
NpcDialog *const dialog = (*it).second;
- if (dialog)
+ if (dialog != nullptr)
dialog->close();
if (dialog == Ea::NpcRecv::mDialog)
Ea::NpcRecv::mDialog = nullptr;
@@ -110,7 +110,7 @@ void NpcHandler::stringInput(const BeingId npcId,
void NpcHandler::buy(const Being *const being) const
{
- if (!being)
+ if (being == nullptr)
return;
createOutPacket(CMSG_NPC_BUY_SELL_REQUEST);
outMsg.writeBeingId(being->getId(), "npc id");
@@ -223,7 +223,7 @@ BeingId NpcHandler::getNpc(Net::MessageIn &msg,
{
CREATEWIDGETV(Ea::NpcRecv::mDialog, NpcDialog, npcId);
Ea::NpcRecv::mDialog->saveCamera();
- if (localPlayer)
+ if (localPlayer != nullptr)
localPlayer->stopWalking(false);
NpcDialog::mNpcDialogs[npcId] = Ea::NpcRecv::mDialog;
}
@@ -231,10 +231,10 @@ BeingId NpcHandler::getNpc(Net::MessageIn &msg,
else
{
NpcDialog *const dialog = diag->second;
- if (Ea::NpcRecv::mDialog && Ea::NpcRecv::mDialog != dialog)
+ if (Ea::NpcRecv::mDialog != nullptr && Ea::NpcRecv::mDialog != dialog)
Ea::NpcRecv::mDialog->restoreCamera();
Ea::NpcRecv::mDialog = dialog;
- if (Ea::NpcRecv::mDialog)
+ if (Ea::NpcRecv::mDialog != nullptr)
Ea::NpcRecv::mDialog->saveCamera();
}
return npcId;