summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-01-29Removed unused includes in various filesThorbjørn Lindeijer1-3/+1
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-7/+6
modernize-loop-convert modernize-deprecated-headers
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-4/+4
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2013-05-22paths.xml content is now read from settings.xmlPrzemysław Grzywacz1-6/+6
2013-05-07items.xml can be used from settings.xmlPrzemysław Grzywacz1-154/+130
2012-02-11Made items equippable by double click in inventoryErik Schilling1-0/+1
+ Fixed disabling of use button when possible Reviewed-by: bjorn.
2012-02-02Fix to the hair colors and styles handling.Yohann Ferreira1-1/+10
- I made the charCreatedialog handle a possible max permitted color Id and a minimum hair style id for tA. - Added a foundation to later load the styles and colors from the same file, to handle the Mana-issue #224 for manaserv. - Support for non-contiguous hair color and style ids has also been added. - I also replaced the < and > arrow signs with images. Reviewed-by: Ben Longbons, Thorbjørn Lindeijer
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-24Fixed the crash in setupSpriteDisplayThorbjørn Lindeijer1-3/+3
This happened when an NPC, monster or item couldn't be found and it had to fall back on Being::Unknown. This instance was bugged since it had a 0 pointer in its sprites list, because when the Being::Unknown was created, the SpriteDef::Empty was not initialized yet (since both were global static variables, the initialization order was not well defined). Fixed it by removing SpriteDef::Empty and instead creating it in the BeingInfo constructor. I've also changed the SpriteReference instances to be inline values rather than instances on the heap, since they're quite small. That also fixed a leak since those instances were never getting deleted. Reviewed-by: Yohann Ferreira
2011-06-07Merged the unknown item definition loadingYohann Ferreira1-10/+13
and added the default hit effects on it. Reviewed-by: Jaxad0127.
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer1-1/+1
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-30Added customizable on-hit effects for characters.Yohann Ferreira1-2/+10
This patch adds support for the following two parameters in weapon items: hit-effect-id: Effect triggered on the victim on normal hit. critical-hit-effect-id: Triggered on the victim on critical hit. (Specified in effects.xml) The patch also permits the use of custom defaults set in paths.xml by setting the following keys: (Paths are relative to the 'particles' key value, here.) hitEffectId: defaulted to effect id 26. criticalHitEffectId: defaulted to effect id 28. Resolves: Mana-mantis #337. Reviewed-by: bcs86
2011-04-29Remove default assignment of an attack action to non-weaponsStefan Dombrowski1-2/+3
This avoids log warnings for missing weapon range. Reviewed-by: thorbjorn, bcs86
2011-04-29Making the check for the node name earlier while reading items.xmlStefan Dombrowski1-3/+6
Reviewed-by: Jaxad0127
2011-04-07Fix compiler warning about incorrect use of the logger's log memberChuck Miller1-1/+1
Reviewed-By: Jared Adams
2011-03-04Empty std::string don't need to be constructed from ""Thorbjørn Lindeijer1-3/+3
2011-01-24Refactored the item loading in a more extensible and per protocol way.Yohann Ferreira1-224/+344
This will greatly help into upgrading the need of each protocol separately. This is the first step to a new item and equipment system for manaserv. A subclassing of the EquipmentWindow will be done in the next commit, as requested by Thorbjorn. Reviewed-by: Thorbjorn.
2011-01-13Made the client handle better the lack of items.xml file.Yohann Ferreira1-3/+7
Now the client returns to server choice dialog with a warning instead of aborting. I'm kinda certain I'm not the only one getting crazy with such a lazy behaviour. Reviewed-by: Jaxad.
2011-01-13Moved the normalize() function in strungUtils where it belongs.Yohann Ferreira1-8/+2
(Preparation for bringing a smaller item loading refactoring patch.) Trivial.
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-0/+1
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-05Unloading mNamedItemInfosStefan Dombrowski1-0/+1
How to reproduce the bug: Switch login, then for every item there is this warning in the log file: "ItemDB: Duplicate name of item found". Reviewed-by: thorbjorn
2010-08-26Merged testing branch into master.Yohann Ferreira1-41/+114
2010-07-29Changed the items loading to handle a new 'attack-action' parameter.Yohann Ferreira1-19/+3
The old behaviour was to load the weapon-type value and do many unnecessary checks and transformation on it: The weapon-type was transformed using hard-coded values into an integer enum value. The exact same thing was done on the opposite side in the animation files before comparing the two. As both data were string values, I simplified all of it by using the value taken in items.xml to call the corresponding action. This now also permit to set up new attack animation in items.xml and in the playerset.xml without having the need to modify the client code. Last but not least, the weapon-type value was used by both the skills and the actions and avoided the possibility to set up a definite action for a weapon-type. Note: The weapon-type parameter will become deprecated for the server in favor of a 'skill' parameter to reflect more it's actual use. This patch is the first step to fix Manasource issue: #157.
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-1/+1
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-07-28Changed mAttackType to mWeaponAttackType were appropriate.Yohann Ferreira1-1/+1
To avoid misunderstanding between the actual attackType and this one. (Trivial fix.)
2010-07-19Merge branch '1.0'Yohann Ferreira1-2/+4
Conflicts: src/gui/itempopup.cpp src/item.cpp src/monster.cpp src/net/manaserv/playerhandler.cpp src/net/tmwa/partyhandler.cpp src/npc.cpp src/player.cpp src/resources/itemdb.cpp src/resources/monsterdb.cpp src/resources/monsterinfo.cpp src/resources/npcdb.cpp src/resources/spritedef.cpp
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-2/+4
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-06-13Merge remote branch '1.0/1.0'Jared Adams1-1/+1
Conflicts: data/graphics/CMakeLists.txt data/graphics/Makefile.am src/client.cpp
2010-06-03Unload loaded DBs before loading them againJared Adams1-1/+1
This greatly simplifies handling DBs when changing states. No more need to manage unloading in Client (except when exiting). Reviewed-by: Thorbjørn Lindeijer
2010-05-06Add support for floor item spritesJared Adams1-2/+30
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
2010-04-16Add race support for eAthenaJared Adams1-0/+11
The job/class field is used to select the race. If the given race isn't defined, it falls back on the first race (so servers can use jobs/classes without races). Also rename job to subtype for Being and subclasses, and begin support for changing monster and NPC subtypes on the fly (particle effects still need to be reset when they change). Reviewed-by: Bertram
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-10Adds missile-particle attribute to items and monster attacksChuck Miller1-0/+2
To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml" to the item's or monster's xml entry This will only work on equipped weapons, and on specified monster attacks. This patch also fixes a memory leak with target particles
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-01-17Fix equiping charm itemsChuck Miller1-0/+1
2010-01-12Standardize header orderJared Adams1-2/+2
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2009-07-27Merge of two gettext stringsKess Vargavind1-1/+1
As reported by swimmy on the forums
2009-05-24Merge branch '0.0.29'Bjørn Lindeijer1-3/+8
2009-05-24Fixed item links that aren't written in lowercaseBjørn Lindeijer1-3/+8
In commit 2a9f8e05312c210ec204e09861f47c3d017706eb I meant to move the normalizing of item names into the database, but the commit failed to include this change.
2009-05-23Merge branch '0.0.29'Bjørn Lindeijer1-13/+13
Conflicts: src/gui/widgets/chattab.cpp
2009-05-23Fixed a few strings for better translationKess Vargavind1-1/+1
Just a few notes that would help us translators immensly: * Please do not split one sentence into several strings * Please try to refrain from inserting extra spaces into the strings (cherry picked from commit 9712489ef67f95d6a5fa1fc3102bb7c4ee6a1f59)
2009-05-23Fixed the empty item link crash differentlyBjørn Lindeijer1-13/+13
The crash was due to an assertion which shouldn't have been there, so I removed the assertion instead. I've also made sure the unknown item has its id initialized to 0, so that it can be used to check against instead of the item name. Normalization of item names was moved within the item database.
2009-05-21Fixed a few strings for better translationKess Vargavind1-1/+1
Just a few notes that would help us translators immensly: * Please do not split one sentence into several strings * Please try to refrain from inserting extra spaces into the strings
2009-05-19Fixed targeting and warn on attack-range not being found in itemdb.David Athay1-0/+4
Tried to make the client continue attacking (it does not need to send attack packets, but just continue playing attack animation and sounds). Now logs a warning when a weapon is found without an attack-range (I keep finding weapons with an attack-range of 0 which makes it hard to target monsters).
2009-05-11Fixed the memory issues with the pointers to item stat modifiersBjørn Lindeijer1-5/+5
It was a list of pointers to Stat instances that had long been popped off the stack and deleted.
2009-05-08Don't complain in the logger about not having an image attribute forTametomo1-1/+1
negative items, since these aren't inventory items. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-05-03Moved strprintf into stringutils.{h,cpp}Bjørn Lindeijer1-1/+0
2009-04-16Merge branch '0.0.29'Bjørn Lindeijer1-3/+3
2009-04-16Some more cleanupsBjørn Lindeijer1-3/+3
Nothing in particular worth mentioning.