summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2010-12-08Fix many compiler warnings.Freeyorp6-22/+25
Reviewed-by: Bertram
2010-12-06Improve warp commandsJared Adams1-15/+120
@warp no longer takes a character. @charwarp was added to handle that ('#' still means the player). Both can take a map name, map id (preceded by '#') or '#' for the player's current map. Logging of warp commands now logs destination map and player warped (for @charwarp).
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira66-312/+352
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-11-13Readd the calculation of base attributes at character's login.Yohann Ferreira1-0/+3
Reviewed-by: CodyMartin.
2010-11-04Fully shift being scope attributes into being.Freeyorp4-66/+115
Also split updateDerivedAttributes and remove the calc check workaround. Reviewed-by: Bertram.
2010-11-04Fix some errors in dispelling non-timed attributesFreeyorp3-17/+48
Reviewed-by: Bertram.
2010-11-04[PATCH 1/3] Alter the way attribute dependencies are updated.Yohann Ferreira1-32/+50
Also fix movement speed dependency. Reviewed-by: Bertram
2010-11-03Renamed write{Byte,Short,Long} to writeInt{8,16,32}Thorbjørn Lindeijer7-217/+217
Mainly for consistency with the client, and the general consensus was that these numbered versions were clearer.
2010-11-02Some random code cleanups.Yohann Ferreira4-72/+112
Also renamed MonsterClass::getType() to getId() since it was misleading with the use of ThingType::getType() and didn't represent the actual meaning, IMHO. Trivial.
2010-11-01Prevented a crash in the monster loading code.Yohann Ferreira2-1/+12
The server was trying to insert attributes value not in monster scope. The monster code is to be rewritten anyway. Resolves: Mana-Mantis #212.
2010-10-26Some none-changesThorbjørn Lindeijer1-75/+33
Mainly merging a lot of short lines and removing pointless comments that are just repeating what the code says.
2010-10-25Avoid assertion when removing unknown itemsThorbjørn Lindeijer1-3/+3
Don't try to notify the client when automatically removing unknown items, since at this point the client hasn't connected yet. Reviewed-by: Freeyorp
2010-10-25Fixed crash when the server tries to remove unknown itemsThorbjørn Lindeijer3-24/+29
Whether it's a good idea to automatically remove unknown items from the inventory in the first place is something to be considered. Reviewed-by: Freeyorp
2010-10-22Made the servers check for positive id in xml db loading.Yohann Ferreira7-45/+96
Also fixed a memleak when loading an invalid monster attack. Resolves: Mana-Mantis #215. Reviewed-by: Thorbjorn.
2010-10-20Fixed the append behaviour of logger::setLogFile().Yohann Ferreira1-1/+1
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 Ferreira10-51/+91
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-17Fix hp regeneration units.Freeyorp1-2/+2
Reviewed-by: Bertram
2010-10-17Get rid of some unneeded direct calls to setBase for attributes.Freeyorp1-8/+5
setAttribute should be used for this, which also calls updateDerivedAttributes as needed. Reviewed-by: Bertram
2010-10-17Synchronise defaults between configuration file and source.Freeyorp1-1/+1
Reviewed-by: Bertram
2010-09-29Add log file rotation support based on ExceptionFault's work.Yohann Ferreira1-0/+10
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-22Added options to disable the server log to standard output to the minimum.Yohann Ferreira1-9/+13
Also made some small cleanups. Resolves: Mana-Mantis #241 Reviewed-by: Jaxad0127.
2010-09-22Centralized the servers' exit values.Yohann Ferreira3-14/+18
Also made random code format clean-ups. Resolves: Mana-Mantis #217 Reviewed-by: Jaxad0127.
2010-09-19Small fixes.Freeyorp4-16/+11
There is no longer any need to send attribute change information for character or correction point changes to the account server. This is now handled elsewhere in a dedicated function. The account server was already doing this but the game server hadn't been updated. This wasn't causing any major problems since this data was being sent at the end of the packet. Update documentation for the functions accordingly. Also adjust a misplaced opening curly brace in attribute calculation which could cause modifiers to be applied wrongly in certain cases. Reviewed-by: Kage
2010-09-16Changed maxSkillCap to game_maxSkillCap as I forgot in last commit.Yohann Ferreira1-42/+54
Also made some random code format cleaups. Trivial fix.
2010-09-15Reordered the manaserv.xml.example file and made related code cleanups.Yohann Ferreira7-34/+49
Reviewed-by: Thorbjorn.
2010-09-08Centralized stringToBool conversion.Yohann Ferreira4-35/+43
Also moved the trim() function into the utils namespace where it belongs more, and made some random code cleanups. Reviewed-by: Thorbjorn.
2010-09-07Added config options to set stats and log files and paths.Yohann Ferreira1-9/+10
Also turned the absence of an inter-server password into a fatal error while documenting it in the manaserv.xml example file. Reviewed-by: Jaxad0127.
2010-08-31Added a --config manaserv.xml file path options to both servers.Yohann Ferreira1-24/+71
Now, it's possible to set a different config filename and path on the command line. Reviewed-by: Jaxad, Kage.
2010-08-30Change primary and secondary tags in attributes.xml from stats and stat to ↵Freeyorp1-2/+2
attributes and attribute respectively.
2010-08-30Added @mute chat command.Philipp Sehmisch4-4/+69
The @mute command stops another character from talking in the public chat for a specified amount of seconds. It doesn't survive a reconnect of the client, but I don't think that this is necessary because a mute by a GM is usually intended as a slap on the wrist with more severe consequences to follow (like @ban).
2010-08-29Merge branch 'testing'Freeyorp33-1575/+2702
Conflicts: src/account-server/storage.cpp src/game-server/being.cpp src/game-server/being.hpp src/game-server/character.cpp src/game-server/character.hpp src/game-server/gamehandler.cpp src/game-server/inventory.cpp src/scripting/lua.cpp src/sql/mysql/createTables.sql src/sql/sqlite/createTables.sql
2010-08-22Some coding style tweaksThorbjørn Lindeijer2-14/+4
2010-08-22Pass a script name to Lua for proper reporting of error locationsThorbjørn Lindeijer1-1/+2
Now the Lua file name shows up in the error message and stack traceback, or the map file and object name in case of a script embedded in a map file.
2010-08-22Rename some stuff to conform to naming conventionsThorbjørn Lindeijer2-7/+6
2010-08-22Changed the location of configuration, logs and statsThorbjørn Lindeijer1-49/+18
Instead of searching for the configuration file in ~/.manaserv.xml, the file is now expected to be in the working directory of the server. The logs and statistics will also be written there. This should make it easier to run differently configured servers on the same machine, and should also be a bit more straight-forward to setup. Reviewed-by: Yohann Ferreira
2010-08-07Fixed typoThorbjørn Lindeijer1-1/+1
2010-08-07Renamed modifiedAttribute to updateDerivedAttributesThorbjørn Lindeijer6-17/+17
This describes the purpose of the method better.
2010-08-03Add sanity checks for hp when hp or max hp change.Freeyorp1-0/+6
Reviewed-by: Bertram.
2010-08-03Allow default values for attributes at character creation time.Freeyorp1-7/+17
TODO: The game-server also needs to keep track of this for when new attributes or attributes not in the default scope need to be created. Also hopefully fix attribute calculation order for derived attributes. Still hardcoded for now. Reviewed-by: Bertram.
2010-08-02Changed the stat file name to attributes.xml.Yohann Ferreira2-3/+5
I also made it required to start properly since it's now the case. Reviewed-by: Jaxad0127.
2010-07-30Fixed a little mistake done in Monster::setAttribute.Yohann Ferreira1-4/+4
It was using at() for setting. Also I changed the unsigned int to int as the default returned was -1 in the MonsterManager::reload() function.
2010-07-30Merge branch 'master' of gitorious.org:mana/manaservYohann Ferreira2-15/+121
Conflicts: src/game-server/itemmanager.cpp
2010-07-28Added back the forgotten Being::attackType enum in the server.Yohann Ferreira1-1/+15
It has to be in sync with the client, even now, and explains the return value of the Being::getAttackType() function.
2010-07-22Upgraded Skill Map loading.Yohann Ferreira2-19/+112
- 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-10Add in stubs for scripted item effectsFreeyorp3-0/+41
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp33-1577/+2653
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-07-09Added LUA script bindings for manipulating the specials available to a ↵Philipp Sehmisch4-22/+59
character. Added script call for getting the cost of a special (recharge only for now) Deleting specials works server-sided but the client isn't informed about it properly. Specials without recharge cost don't appear for the player. Both of these features require an additional netcode message. Reviewed-by: Freeyorp
2010-07-08Made Manaserv accept parameters enclosed with double-quotes.Yohann Ferreira1-3/+34
Reviewed-by: Jaxad0127. Resolves: Manasource-Mantis #22
2010-06-22Fixed the up down monster attack direction and comment trivial fixes.Philipp Sehmisch2-4/+4
Resolves: Manasource Mantis #144. Signed-off-by: Philipp Sehmisch <mana@crushnet.org>
2010-06-06Arbitrary cleanups and marked GameHandler::getClientByNameSlow constThorbjørn Lindeijer4-21/+18