summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2023-05-15General code cleanupsThorbjørn Lindeijer25-77/+79
* Overall includes cleanup * Use std::make_pair * Make some functions const
2022-08-19Apply C++11 fixitsThorbjørn Lindeijer23-194/+136
modernize-loop-convert modernize-deprecated-headers
2022-08-19Apply C++11 fixitsThorbjørn Lindeijer49-239/+226
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2022-08-19Added net_accountListenToGameHost config optionThorbjørn Lindeijer1-1/+2
This is because the network interface on which the account server listens to the game server does not need to match the one on which the account server listens to the client.
2015-04-24Fix crash if the client sends garbage public id valuesErik Schilling1-1/+5
Indexing an array with a negative int as index is no good idea...
2014-03-02IdManager tweaksThorbjørn Lindeijer1-4/+2
2013-12-29Small cleanupErik Schilling5-14/+9
- Deleted empty constructor rather than throwing, resulting in compiletime errors rather than runtime errors. - Removed some remainings of currentMana - Fixed some compiler warnings regarding structs getting forward declared as classes.
2013-12-08Restored copy constructor protection for mapcompositeErik Schilling1-0/+1
2013-12-08deleted copy constructors in Component rather than all the subclassesErik Schilling4-16/+11
2013-12-08Delete some unused copy constructorsThorbjørn Lindeijer2-4/+4
2013-11-02Do not send dir changes back to the player itselfErik Schilling1-1/+1
2013-10-19Fixed negative attribute valuesErik Schilling1-1/+1
Note @Bertram25: c++11 comes with lowest() min() for float types only returns the next positive value > 0.
2013-10-13Added GPMSG_NPC_BUYSELL_RESPONSEThorbjørn Lindeijer1-7/+18
Without this message it is not possible to reliably know how many items were traded with an NPC at the client side. It helps with updating the shop's inventory.
2013-09-30Actually send and store the equipment slotErik Schilling1-7/+3
I was wrong to assume that we do not need it. The accountserver needs to send the info the the client in order to display the equipment on the character selection page.
2013-09-26Store questlog values in the databaseErik Schilling2-2/+151
2013-09-21Added @commands for setting attribute and correction pointsErik Schilling1-0/+74
2013-09-19Synchronized some tweaks to protocol file from the clientThorbjørn Lindeijer1-1/+1
2013-09-19Removed the unused OBJECT_ACTOR enum valueThorbjørn Lindeijer1-2/+0
NPCs, monsters and character are all actors, but no entity exists that has "actor" as its type. To avoid having to increment the protocol version, the values of the different entity types are now mentioned explicitly.
2013-09-19Some optimizations in GameHandlerThorbjørn Lindeijer3-38/+43
The findActorNear, findBeingNear and findCharacterNear functions in gamehandler.cpp were iterating over nearby entities in search for an entity with a specific ID. Now they do a quick lookup of exactly that entity, and then check whether it is in range.
2013-09-19Use constructor to initialize IdManager::mLastIdThorbjørn Lindeijer1-2/+2
Fixes compile error with GCC 4.6.3.
2013-09-19Have Lua use entity IDs instead of direct pointersThorbjørn Lindeijer3-0/+100
Allows to report access to removed entities instead of crashing.
2013-09-19Cleaned up mapcomposite.hThorbjørn Lindeijer2-291/+303
Moving class definitions for MapZone, ObjectBucket and MapContent into mapcomposite.cpp since they are not used anywhere else.
2013-09-19Removed unused being state enumsThorbjørn Lindeijer3-30/+1
2013-09-19Renamed actor.{h,cpp} to actorcomponent.{h,cpp}Thorbjørn Lindeijer5-7/+7
To match the class name.
2013-09-15Renamed sendFullStatus to markAllInfoAsChangedErik Schilling3-25/+17
Moved the actual sending of info out of update() and into sendStatus to prevent delay issues depending on the order of the components getting updated.
2013-09-15Fixed last commitErik Schilling5-14/+15
Renamed killConnection based on bjorns feedback. Do not send the info on each warp but only on reconnections.
2013-09-15Fixed handling of reconnects while the old connection is still validErik Schilling5-20/+32
The old connection is now terminated. And the new connection will receive the character data properly.
2013-09-14Removed unused variableErik Schilling1-2/+0
2013-09-13Fixed walking resetting the dead actionErik Schilling1-2/+2
2013-09-13Fixed small typoErik Schilling1-1/+1
2013-09-13Simplified removal of effectsErik Schilling1-2/+1
2013-09-10Fixed typoThorbjørn Lindeijer1-1/+1
2013-09-09Removed old unused functionsErik Schilling1-5/+0
2013-09-09Fixed Entity leak with effectsErik Schilling3-10/+4
2013-09-08Allow to use the name of attributes in @attributeErik Schilling1-11/+17
2013-09-08Actually send the info about beings using direction abilitiesErik Schilling2-1/+17
2013-09-08Added support for direction based ability targetsErik Schilling7-3/+65
I had to rearrange the protocol a bit in order to allow to keep the related things together.
2013-09-08Renamed character.cpp to charactercomponent.cppErik Schilling14-13/+13
Now we do not have two character.cpp files in the repository.
2013-09-08Cleaned up the inventory handlingErik Schilling6-513/+175
Things done: - Removed the equips table and added another column which keeps track about whether the item is equipped or not - Added a message to notify the client about failing equips instead of hardcoding to chat notification - Removed the move possibillity. It was a quite long function and our future idea of the inventory does not need any moves - Removed the inInventory and inEquipment parameters from chr_inv_count, but added a equipped key to the table that chr_get_inventory returns This change makes equipped items still being in the inventory. This means in-inventory triggers are still active! However it makes no sense to disable this triggers during equipping since it will appear as still in the inventory to the client.
2013-09-01Fixed inconsistent type of hairstyle networkingErik Schilling1-10/+5
2013-09-01Do not make all attributes persistentErik Schilling3-5/+15
By default they are not persistent now (meaning that they wont get stored in the database).
2013-08-31remove unused variableStefan Beller1-1/+0
2013-08-26Added forgotten filesErik Schilling2-0/+99
2013-08-26Moved AttributeInfo into a seperate fileErik Schilling13-99/+49
2013-08-26Secured the use of the AttributeInfo where nessecaryErik Schilling3-5/+21
In some cases no longer existing attribute ids sent by the account server or client were able to create crashs.
2013-08-26Allowed to push attributeinfos for the attribute recalculationErik Schilling21-201/+231
While on it I replaced the id usage in the server with the usage of the AttributeInfo directly. Next steps: - Dehardcode the core attribute ids and store their attributeinfos somewhere in AttributeManager (for now i simply wrapped the ids with getAttributeInfo(). - Move AttributeInfo out of AttributeManager to shorten the usage + to allow using a pointer in ModifierLocation without forward declaring it.
2013-08-26Unshared the serialization of charactersErik Schilling5-241/+166
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-26Fixed warning which used an invalid iteratorErik Schilling1-2/+1
2013-08-26Removed ability categoriesErik Schilling5-75/+9
2013-08-26Only call ability recharge callback if it is validErik Schilling1-5/+8