summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.h
AgeCommit message (Collapse)AuthorFilesLines
2025-07-04Added logging priorities and use SDLs logging facilitiesThorbjørn Lindeijer1-3/+3
By using SDL logging, we can rely on SDL to filter the log messages by their priority before they get sent to our custom output function. For example, we now no longer get entries for created and destroyed Window instances by default, since these have only "debug" priority whereas the default priority for the "app" category is "info". We can also get log messages raised by SDL itself in our log now. Log levels can be controlled per category through the "SDL_LOGGING" environment variable. Many existing log messages have been assigned a category based on their existing prefix.
2025-04-25GUI: Added support for defining named icons to the themeThorbjørn Lindeijer1-0/+1
Now we can define icon names for each equipment box and then look up the icon image through the theme, enabling some shared control over equipment slot icons between the game data and GUI theme. The icon for an equipment slot is also no longer rendered when the slot has an item in it. Removed the needless storing of equipment box positions and images in the EquipmentWindow, because this information is readily available from the InventoryHandler and the images are already loaded by the Theme.
2025-03-07Removed the functionality to split item stacksThorbjørn Lindeijer1-2/+0
No longer supported by manaserv and not supported by tmwAthena.
2025-03-07General code cleanupsThorbjørn Lindeijer1-1/+1
2025-01-21Replaced include guards with #pragma onceThorbjørn Lindeijer1-4/+1
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to remove duplicated newlines at end of file: find src -type f -name '*.h' -exec \ sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof Fixes compile on macOS, which appears to have been due to the EVENT_H include guard.
2024-08-25Fixed initialization of equipment backendThorbjørn Lindeijer1-23/+17
For new characters (and in general, when logging in with a character that had nothing equipped), the equipment backend wasn't being initialized. This resulted in the equipment not being visible in the Equipment window. Fixes #83
2024-03-06General code cleanupsThorbjørn Lindeijer1-5/+3
* Use final for all message handlers, Client, LocalPlayer, Being::getType, Being::setPosition and Being::setMap. (avoids some warnings about virtual dispatch in constructors) * Use auto in more places * Use emplace_back instead of push_back in some places * Use default member initializers * Less else after return * Removed superfluous .c_str() * Removed type aliases that are only used once * Removed more unused includes
2024-02-13General code cleanupsThorbjørn Lindeijer1-14/+8
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-13/+13
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-05-05Removed the shared base classes of MessageIn and MessageOutThorbjørn Lindeijer1-1/+1
There wasn't a whole lot gained by sharing a common base class, and it makes extending the manaserv Message{In,Out} classes with a debugging mode unnecessarily complicated. Reviewed-by: Yohann Ferreira
2012-02-14Omit equipping of non-existing itemsStefan Dombrowski1-7/+16
Reviewed-by: Ablu and Bjorn
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-08-19Fixed visible equipment updates, and made it based on equip.xml.Yohann Ferreira1-0/+18
2011-08-18Improved equip slots description for both protocols.Yohann Ferreira1-0/+33
Now the itempopup is also telling what equip slot is under the mouse pointer.
2011-08-18Made the client able to successfully equip/unequip!Yohann Ferreira1-0/+10
2011-08-18Got rid of the superfluous definition of the slot number for tA.Yohann Ferreira1-2/+4
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer1-16/+5
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
2011-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer1-1/+2
I have to admit I contributed a large part of these. Sorry for that. Less empty space, more attention to the code. Acked-by: Jared Adams
2011-04-09Renamed Listener to EventListenerThorbjørn Lindeijer1-2/+2
Makes it clear what kind of listener it is, since there are other listener classes as well. Acked-by: Jared Adams
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-2/+2
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer1-1/+1
Acked-by: Jared Adams
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-1/+1
Reviewed-by: Freeyorp
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-0/+2
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
2010-09-08Adding missing updates for buttons in InventoryWindowStefan Dombrowski1-0/+2
Reviewed-by: Thorbjorn
2010-08-16Move more to the event systemJared Adams1-19/+4
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-07-18Move more from LocalPlayer to PlayerInfoJared Adams1-5/+5
Also cleanup PlayerInfo a bit. Reviewed-by: Chuck Miller
2010-04-17Changed eAthena protocol name to TmwAthena and changed the config files ↵Bertram1-0/+164
accordingly. This makes room for the actual eAthena protocol future inclusion.