summaryrefslogtreecommitdiff
path: root/src/account-server/character.h
AgeCommit message (Collapse)AuthorFilesLines
2023-05-15Manage CharacterData using std::unique_ptrThorbjørn Lindeijer1-1/+2
Fixes many memory leaks, but also made it clear that we're very often loading all the character data only to immediately throw it away again, even when most of the time all we really need is the database ID or the name.
2023-05-15General code cleanupsThorbjørn Lindeijer1-2/+1
* Overall includes cleanup * Use std::make_pair * Make some functions const
2022-08-19Apply C++11 fixitsThorbjørn Lindeijer1-2/+2
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2013-12-08Delete some unused copy constructorsThorbjørn Lindeijer1-4/+2
2013-09-26Store questlog values in the databaseErik Schilling1-0/+10
2013-08-26Unshared the serialization of charactersErik Schilling1-1/+3
This getting annoying while trying to do multiple changes. Types/structures had to be shared all the time making it nessecary to find ugly workarounds.
2013-08-26Made cooldowns of abilities scriptableErik Schilling1-33/+5
- Removed hardcoded using of attributes - Simply introduced lua functions to set global and ability cooldowns - Requires database update - Bumps the protocol
2013-08-26Readded level handlingErik Schilling1-5/+5
Things done: Wrote a entity:give_experience function (lua side only). Renamed characterpoints to attributepoints (no db update. Did not want to do one for a simple rename). Temponary introduced a ATTR_LEVEL constant. TODO: dehardcode this. Script binds for settings the correction and attribute points.
2013-08-26Removed skillsErik Schilling1-26/+0
This removes support for skills. The plan is to allow to implement the skills as they were implemented before via attributes. This adds a lot more flexibility to the server creators while also removing the confusion about skills and attributes. So this change does: - Remove the skillmanager with all its calls, the skill xml file, etc - Move exp giving to the script engine: --> Allows to implement the old behaviour (and more) in the scripts - Remove the exp tag from the monster definition: + Since the server itself does not require it anymore it feels wrong to require it for EVERY monster. TODO: Add a system to add properties to the monsters/items.xml which allow defining things like the exp and allows to read the value from the script engine. + Small drawback, but it should not be hard to implement this property system. - Drop the level networking and calculation. + level calculation will happen via the attribute system later but i would prefer to do this in a seperate patch since this patch already got longer than expected especially since this requires to make setting correction points and available status points scriptable. + The level would be simply set as a attribute, the int number of it will be the level, the remaining digits will be the % number till the next levelup. - NOT remove any existing skill tables in the database update scripts. + There is no way to move them into the attribute table in a unified way (there are too many different way they could have been used). So server admins have to care about moving theirs skills to attributes themselves. + Keeping the old tables does not hurt for existing databases. So removing does not give any advantage/is required anyway. The now obsolote info about the EXP transaction is not removed for updated databases either. (The update script basically only bumps the version number without doing anything else. - bump the network protocol version --> old clients won't be able to connect. - bump the database version --> serveradmins need to update their db.
2013-08-26[Abilities] Made the rechargespeed depending on attributesErik Schilling1-1/+1
This allows a lot more flexibility and makes stuff like magical items a lot easier to implement. We will also use this for the attack system in the future. So a attack (abilitiy) would simply depend on some value like Agility (or a derived attribute from it). Which sets the recharge speed. The recharge speed is the modified value of the attribute per game tick.
2013-08-26[Abilities] Renamed specials to abilitiesErik Schilling1-19/+19
2013-04-11Converted the Character class into a componentErik Schilling1-8/+23
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-04-11Renamed Character -> CharacterData in the accountserverErik Schilling1-5/+5
2013-01-09Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer1-10/+10
Same thing, but shorter.
2012-04-04Enhanced special supportErik Schilling1-8/+23
- Made the current charge being saved. - Added script binds: - chr_set_special_recharge_speed - chr_get_special_recharge_speed - chr_set_special_mana - chr_get_special_mana - get_special_info - Added special info lua class. Functions: - name - needed_mana - rechargeable - on_use - on_recharged - category Further the engine no longer sets charge to 0 after using of specials this allows more flexbilillity (like failing specials). Changes on the xml database: - recharge renamed to rechargeable (needed by client and server) - needed - the needed mana to trigger a special (server only) - rechargespeed - the defailt recharge speed in mana per tick (server only) - target - the type of target (either being or point) (server and client) I also made the lua engine pushing nil instead of a 0 light userdata when the pointer was 0. Database update needed. Change is tested. Mana-Mantis: #167, #156 Reviewed-by: bjorn.
2011-03-20Moved defines.h and manaserv_protocol.h into 'common'Thorbjørn Lindeijer1-1/+1
Just seems a bit more organized to me.
2011-03-15Introduced an AttributeValue class for convenience and readabilityThorbjørn Lindeijer1-12/+24
Easier to understand than a std::pair with its 'first' and 'second' members, and it also provides an implicit constructor so that AttributeValue is implicitly constructed from a double. Reviewed-by: Freeyorp
2011-01-09Removed the superfluous point struct.Yohann Ferreira1-1/+1
It was too close from the Position class and it leads to making the server handle one or another type through the code. Still bugged me many times while making changes. Reviewed-by: Jaxad.
2010-12-29Made the server handle properly the characters slots.Yohann Ferreira1-1/+11
I turned the vector storing character data into a map, keeping the character's slot. Fixed a memleak along the way. Reviewed-by: Crush.
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+275
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.