summaryrefslogtreecommitdiff
path: root/src/utils
AgeCommit message (Collapse)AuthorFilesLines
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira16-26/+26
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-10-20Fixed the append behaviour of logger::setLogFile().Yohann Ferreira1-1/+2
Also made both servers appends on the main log at start if they aren't empty. This permits not to lose the previous logs when quicky restarting the servers. Trivial fix.
2010-10-17Dehardcode the tileWidth and height, except for the speed conversion.Yohann Ferreira1-1/+1
The speed conversion needs a standard tile length anyway and can be improved later once the movement code will start to handle beings size. Reviewed-by: Crush.
2010-10-14Hopefully fix the logging rotation this time.Yohann Ferreira1-23/+23
Added an extension to the ResMan::exist() function in order to get file existence even not in search path. Reviewed-by: CodyMartin.
2010-09-29Add log file rotation support based on ExceptionFault's work.Yohann Ferreira3-19/+192
This patch adds options to enable log rotations base on files size and or change of date. Note: Zip support will be added in a second commit. Reviewed-by: CodyMartin, Thorbjorn.
2010-09-08Centralized stringToBool conversion.Yohann Ferreira4-61/+70
Also moved the trim() function into the utils namespace where it belongs more, and made some random code cleanups. Reviewed-by: Thorbjorn.
2010-07-30Merge branch 'master' of gitorious.org:mana/manaservYohann Ferreira2-0/+39
Conflicts: src/game-server/itemmanager.cpp
2010-07-22Upgraded Skill Map loading.Yohann Ferreira2-0/+39
- Added a new 'default' boolean parameter in mana-skills.xml. If set to true, unknown weapon types will be defaulted to the given value. - Added better checks on skill id and names and improved error reporting. - Corrected minor typos, and made small cleanups. Reviewed-by: jaxad0127
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp3-0/+81
Attribute system: Structure is no longer completely hardcoded. Attributes and structure is defined by new xml file (defaulting to stats.xml) Structure defines non-base modifications to an attribute, to be used by modifiers from items, effects, etc. Calculating the base value for core attributes is still done in C++ (and for such fundamental elements the only reason I can think of to do it any other way is perhaps being able to quickly change scripts without a compile could be useful for testing, but such things are a low priority anyway) Item structure: Modifiers are now through triggers rather than single events. This also removes hardcoded types - an item could be both able to be equipped and be able to be activated. Item activation no longer consumes by default, this must be specified by the property <consumes /> inside the trigger. Currently only attribute modifications, autoattacks, and consumes are defined as effects, but stubs for others do exist. Autoattacks are currently non-functional, and this should be rectified with some urgency. Auto Attacks: AutoAttacks are now separate entities, though not fully complete, nor fully integrated with all beings yet. Integration with the Character class is urgent, integration with other Being children less so. When fully integrated this will allow for multiple autoattacks, through equipping multiple items with this as an equip effect or even through other means if needed. Equipment structure: As ItemClass types are no longer hardcoded, so too are equip types. An item have multiple ways to be equipped across multiple equipment slots with any number in each slot. Character maximums are global but configurable. Miscellaneous: Speed, money, and weight are now attributes. Some managers have been changed into classes such that their associated classes can have them as friends, to avoid (ab)use of public accessors. The serialise procedure should also be set as a friend of Character (both in the account- and game- server) as well; having public accessors returning iterators is simply ridiculous. Some start for such cleanups have been made, but this is not the primary focus here. Significant work will need to be done before this is resolved completely, but the start is there. BuySell::registerPlayerItems() has been completely disabled temporarily. The previous function iterated through equipment, yet in the context I think it is intended to fill items? I have been unable to update this function to fit the modifications made to the Inventory/Equipment/Possessions, as I am unsure what exactly what it should be doing. ItemClass::mSpriteId was previously unused, so had been removed, but I notice that it was used when transmitting equipment to nearby clients. Experimentation showed that this value was never set to anything other than 0, and so has been left out of the ItemManager rewrite. I am not entirely sure what is happening here, but it should be worth looking into at a later time, as I am not sure how equipment appearences would be sent otherwise.
2010-05-16Random cleanups, adding const, removing unnecessary clear callsThorbjørn Lindeijer2-21/+12
Reviewed-by: Jared Adams
2010-05-16Changed and split up the default location for loading dataThorbjørn Lindeijer2-36/+168
Instead of loading data from a 'data' directory in the current working directory, the server now uses clientDataPath and serverDataPath as specified in the configuration. This removes the need to set up symbolic links in order to merge these two types of data. The default values point to example/clientdata and example/serverdata, where a minimal example world can be developed to make setting up an initial server quick and easy. The XML::Document convenience class was copied over from the client. Also, the ResourceManager is now shared between both servers, since the account client is reading items.xml. Reviewed-by: Jared Adams
2010-02-07Update Copyright date for Manaserv.Bertram27-27/+27
2010-01-29Rename enum elements to avoid clashing with macrosBernd Wachter2-17/+17
2009-12-09Fix detecting collision layer for mapsJared Adams2-3/+34
2009-12-06Fixed name of the project in copyright headersThorbjørn Lindeijer27-298/+282
Also updated the headers to refer to the GPL by URL instead of suggesting to contact the FSF by snail mail, as per the latest GPL usage instructions.
2009-12-06Removed "TMW" and "TMWSERV" from header guardsThorbjørn Lindeijer15-39/+39
2009-12-06A host of code style changesThorbjørn Lindeijer2-22/+8
Removed pointless void in method parameter lists, fixed methods and variables that started with upper case, removed pointless 'const' for stuff passed by value, made some getters const, etc.
2009-12-06Moved rectangle intersection to the Rectangle classThorbjørn Lindeijer2-35/+39
Also a bit of pointless cleanup in the math utils.
2009-10-09Synced the protocol file with client in protocol.h, letting other defines in ↵Bertram2-2/+0
defines.h, and removing some overheading along the way.
2009-10-03Limit login attempt frequency based on IP addressThorbjørn Lindeijer1-1/+1
The previous method was broken because it set the "last time" to the current time when the client connected. So login would fail when the username and password were sent within a second from connecting, which is not desirable. If I'd have fixed this by setting the "last time" to login time minus one second, then an attacker would just need to reconnect for each login attempt. So now it uses an IP address based approach, where each IP can only try to log in once per second.
2009-05-24Fixed compilation problem with GCC 4.4Bjørn Lindeijer2-5/+9
Fix ported from the client.
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer6-23/+30
Same as for the client.
2009-04-26Merged MovingObject into the Being classBjørn Lindeijer1-1/+1
Also renamed Object to Actor, to make it sound a little less generic. Cleans up a bit the rather big hierarchy of different object types we have.
2009-03-10Fixes for some compile warningsBjørn Lindeijer1-3/+5
Mostly comparisons between signed and unsigned integers
2009-02-24Made a lot of hard-coded values configuration optionsPhilipp Sehmisch1-2/+2
2008-12-28Removed unused md5sum calculation codeBjørn Lindeijer2-199/+0
Reported by seeseekey
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer30-61/+0
2008-11-05Use a string util for converting strings toDavid Athay2-0/+13
integers, as per Bjorns suggestion.
2008-10-31Changed command system to handle commands without template magic.David Athay2-0/+14
2008-10-23Fixed crash introduced in utils::toupperBjørn Lindeijer1-1/+1
2008-10-23Fixed compiler warnings, including a forgotten initialization of an item'sBjørn Lindeijer2-7/+8
script pointer.
2008-10-23ignore case in map object types (by Chuck Miller)Roderic Morris2-0/+62
2008-05-22Fixed compilation with GCC 4.3 (patch by rodge).Bjørn Lindeijer2-0/+2
2008-04-23Switched to alternative SHA-256 implementation from InspIRCd.Bjørn Lindeijer6-1024/+419
2008-04-22Fixed some small issues.Bjørn Lindeijer1-0/+1
2008-04-21Removed our copyright header since these files are not copyright by us.Bjørn Lindeijer2-52/+0
2008-04-21Added password and email encryption server-side using SHA256.Yohann Ferreira4-0/+1075
2008-04-20Fix a possible memleak in inflateMemory if the stream fails to uncompress ↵Dennis Friis1-0/+4
cleanly.
2008-02-21Moved the functions which translate strings into enumerations from the XML ↵Philipp Sehmisch2-72/+0
library into the item and monstermanager modules and reimplemented them using std::maps.
2008-02-20Implemented different monster attacks read from monsters.xmlPhilipp Sehmisch2-0/+95
2007-11-19Removed useless win32 implementation of gettimeofday.Eugenio Favalli3-119/+1
2007-11-13Trimed script filenames from spaces.Guillaume Melquiond1-0/+53
2007-10-27Made it compile with GCC 4.3Guillaume Melquiond2-1/+5
2007-09-22Cleaned both configuration and resource managers.Guillaume Melquiond2-13/+8
2007-08-30Got rid of abstract storage and reference-counted pointers. Fixed lifetime ↵Guillaume Melquiond1-167/+0
of accounts and characters in server memory. Cleaned some code.
2007-08-17Simplified TokenCollector and fixed a few bugs. Moved its implementation ↵Guillaume Melquiond2-265/+205
outside the header file.
2007-07-17Implemented loading of warp and spawn areas from map files.Eugenio Favalli1-0/+3
2007-06-16Forgot the changelog entry. Work around compilers that have trouble dealing ↵Guillaume Melquiond1-1/+1
with zero-sized arrays.
2007-06-16Fix rsqrt and sqrt.Guillaume Melquiond1-7/+8
2007-03-23Mostly fixed some compilation issues.Bjørn Lindeijer1-1/+1