diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-24 01:39:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-24 01:39:45 +0300 |
commit | 07a9b9009f7b05fc39540430fa6639b493ed9829 (patch) | |
tree | be4049d169daffd99122ecdc99ab0d0e974f54a5 /src | |
parent | bedfca1c1cb893c937d317dd658067166e9953e0 (diff) | |
download | manaplus-07a9b9009f7b05fc39540430fa6639b493ed9829.tar.gz manaplus-07a9b9009f7b05fc39540430fa6639b493ed9829.tar.bz2 manaplus-07a9b9009f7b05fc39540430fa6639b493ed9829.tar.xz manaplus-07a9b9009f7b05fc39540430fa6639b493ed9829.zip |
Add damaged attribute to floor items.
Diffstat (limited to 'src')
-rw-r--r-- | src/actormanager.cpp | 2 | ||||
-rw-r--r-- | src/actormanager.h | 2 | ||||
-rw-r--r-- | src/flooritem.cpp | 2 | ||||
-rw-r--r-- | src/flooritem.h | 3 | ||||
-rw-r--r-- | src/net/eathena/itemhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/itemhandler.cpp | 2 |
6 files changed, 15 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 43330a7c5..ef4eac8c6 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -307,6 +307,7 @@ FloorItem *ActorManager::createItem(const BeingId id, const int refine, const ItemColor color, const Identified identified, + const Damaged damaged, const int subX, const int subY, const int *const cards) { @@ -318,6 +319,7 @@ FloorItem *ActorManager::createItem(const BeingId id, refine, color, identified, + damaged, cards); floorItem->postInit(mMap, subX, subY); diff --git a/src/actormanager.h b/src/actormanager.h index 52aa3dfc8..09a0864a0 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -28,6 +28,7 @@ #include "enums/simpletypes/allowsort.h" #include "enums/simpletypes/allplayers.h" #include "enums/simpletypes/beingtypeid.h" +#include "enums/simpletypes/damaged.h" #include "enums/simpletypes/npcnames.h" #include "listeners/configlistener.h" @@ -88,6 +89,7 @@ class ActorManager final: public ConfigListener const int refine, const ItemColor color, const Identified identified, + const Damaged damaged, const int subX, const int subY, const int *const cards); diff --git a/src/flooritem.cpp b/src/flooritem.cpp index 4d549ba0a..a833ff935 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -52,6 +52,7 @@ FloorItem::FloorItem(const BeingId id, const int refine, const ItemColor color, const Identified identified, + const Damaged damaged, const int *const cards) : ActorSprite(id), mCards(), @@ -67,6 +68,7 @@ FloorItem::FloorItem(const BeingId id, mCursor(Cursor::CURSOR_PICKUP), mColor(color), mIdentified(identified), + mDamaged(damaged), mShowMsg(true), mHighlight(config.getBoolValue("floorItemsHighlight")) { diff --git a/src/flooritem.h b/src/flooritem.h index d2cfa2c26..3e203adbd 100644 --- a/src/flooritem.h +++ b/src/flooritem.h @@ -23,6 +23,7 @@ #ifndef FLOORITEM_H #define FLOORITEM_H +#include "enums/simpletypes/damaged.h" #include "enums/simpletypes/identified.h" #include "enums/simpletypes/itemcolor.h" @@ -56,6 +57,7 @@ class FloorItem final : public ActorSprite const int refine, const ItemColor color, const Identified identified, + const Damaged damaged, const int *const cards); A_DELETE_COPY(FloorItem) @@ -126,6 +128,7 @@ class FloorItem final : public ActorSprite Cursor::Cursor mCursor; ItemColor mColor; Identified mIdentified; + Damaged mDamaged; bool mShowMsg; bool mHighlight; }; diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp index 5ce7a1c6e..f25addbe0 100644 --- a/src/net/eathena/itemhandler.cpp +++ b/src/net/eathena/itemhandler.cpp @@ -113,6 +113,7 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg) 0, ItemColor_one, identified, + Damaged_false, subX, subY, nullptr); } @@ -146,6 +147,7 @@ void ItemHandler::processItemDropped2(Net::MessageIn &msg) refine, ItemColorManager::getColorFromCards(&cards[0]), identified, + damaged, subX, subY, &cards[0]); } @@ -198,6 +200,7 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) 0, ItemColor_one, identified, + Damaged_false, subX, subY, nullptr); } @@ -231,6 +234,7 @@ void ItemHandler::processItemVisible2(Net::MessageIn &msg) refine, ItemColorManager::getColorFromCards(&cards[0]), identified, + damaged, subX, subY, &cards[0]); } diff --git a/src/net/tmwa/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp index 58deac0c2..60daadb75 100644 --- a/src/net/tmwa/itemhandler.cpp +++ b/src/net/tmwa/itemhandler.cpp @@ -89,6 +89,7 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg) 0, ItemColor_one, identify, + Damaged_false, subX, subY, nullptr); } @@ -116,6 +117,7 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) 0, ItemColor_one, identified, + Damaged_false, subX, subY, nullptr); } |