diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/gui/windows/npcdialog.h | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/gui/windows/npcdialog.h')
-rw-r--r-- | src/gui/windows/npcdialog.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h index 0ed4096e8..378bbd5e9 100644 --- a/src/gui/windows/npcdialog.h +++ b/src/gui/windows/npcdialog.h @@ -23,6 +23,7 @@ #ifndef GUI_WINDOWS_NPCDIALOG_H #define GUI_WINDOWS_NPCDIALOG_H +#include "enums/simpletypes/beingid.h" #include "enums/simpletypes/visible.h" #include "gui/models/extendedlistmodel.h" @@ -44,7 +45,7 @@ class PlayerBox; class ScrollArea; class TextField; -typedef std::map<int, NpcDialog*> NpcDialogs; +typedef std::map<BeingId, NpcDialog*> NpcDialogs; /** * The npc dialog. @@ -62,7 +63,7 @@ class NpcDialog final : public Window, * * @see Window::Window */ - explicit NpcDialog(const int npcId); + explicit NpcDialog(const BeingId npcId); A_DELETE_COPY(NpcDialog) @@ -196,7 +197,7 @@ class NpcDialog final : public Window, void refocus(); - void showAvatar(const uint16_t avatarId); + void showAvatar(const BeingId avatarId); void setAvatarDirection(const uint8_t direction); @@ -211,7 +212,8 @@ class NpcDialog final : public Window, int isCloseState() const { return mActionState == NPC_ACTION_CLOSE; } - static void copyToClipboard(const int npcId, const int x, const int y); + static void copyToClipboard(const BeingId npcId, + const int x, const int y); static NpcDialogs mNpcDialogs; @@ -233,7 +235,7 @@ class NpcDialog final : public Window, void placeItemInputControls(); - int mNpcId; + BeingId mNpcId; int mDefaultInt; std::string mDefaultString; |