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/actions/commands.cpp | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r-- | src/actions/commands.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 9ec4ca28f..0bcca016c 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -254,7 +254,7 @@ impHandler(chatNuke) if (!being) return true; - actorManager->addBlock(static_cast<uint32_t>(being->getId())); + actorManager->addBlock(being->getId()); actorManager->destroy(being); return true; } @@ -268,7 +268,7 @@ impHandler(chatAdd) return true; const int id = atoi(event.args.c_str()); - if (!id) + if (id == 0) return true; Inventory *const inv = PlayerInfo::getInventory(); @@ -286,7 +286,8 @@ impHandler(chatAdd) return true; } - const FloorItem *const floorItem = actorManager->findItem(id); + const FloorItem *const floorItem = actorManager->findItem( + fromInt(id, BeingId)); if (floorItem) { |