summaryrefslogtreecommitdiff
path: root/src/common/manaserv_protocol.h
AgeCommit message (Collapse)AuthorFilesLines
2023-05-26Fixed login in case an account gets two pending tokens assignedHEADmasterThorbjørn Lindeijer1-1/+1
Not entirely sure if this is what was happening, but if a PAMSG_LOGIN_RNDTRGR was handled, a new pending account was always created and appended to mPendingAccounts. However, when handling the follow-up PAMSG_LOGIN, only the first pending account with matching username was checked, which could result in a failed login due to mismatching token. Resolved this issue by unifying the client-specific random token with the Stellar token stored on the AccountClient. This means the username value in PAMSG_LOGIN_RNDTRGR could be removed. Eventually it would also be nice to simplify this further such that the token is automatically sent to the client after connecting rather than being something that needs to be requested.
2023-05-16Allow account email to be null in the databaseThorbjørn Lindeijer1-1/+1
When using login with Stellar, the email address remains empty. This was causing issues since the email is also required to be unique, in effect only a single Stellar account could exist. Resolved this by allowing the email column to be null, since the unique requirement does not cover null values. An empty email will now be stored as null value. For non-Stellar logins, an email address is still required.
2023-05-05Added net_stellarLoginUrl configurationThorbjørn Lindeijer1-1/+1
The client needs to know the URL to open in the browser. The bare token is still sent as well, which might allow the client to directly interact with a Stellar wallet in the future.
2023-05-05Added support for logging in with StellarThorbjørn Lindeijer1-0/+2
* Added PAMSG_STELLAR_LOGIN / PAMSG_STELLAR_LOGIN_RESPONSE, which is used by the client to request a login token that can be signed using a Stellar wallet. * Added uWebSockets dependency, used to listen for a separate server that verifies signed tokens (the Stellar Bridge). When a token is verified, it is sent to manaserv-account, which then sends a APMSG_LOGIN_RESPONSE to the client matching the token. * Added RapidJSON dependency to parse the JSON WebSocket messages. * To keep everything in a single thread, uWebSockets is now driving the event loop. Processing of ENet hosts, writing stats and expired bans have been moved to uSocket timers. * C++ standard updated to C++17, as required by uWebSockets. When Stellar is used to login, the public key is used as the username. It might be better to introduce an explicit field for this, especially when we want to enable an account to feature both Stellar login as well as login with username / password.
2013-11-28Include the list of characters in the login responseThorbjørn Lindeijer1-2/+3
This makes it easier on the client to decide whether to immediately open the Create Character page or to go to the Choose Character page. Still supports client version 9 as well.
2013-10-16Fixed protocol descriptionErik Schilling1-1/+1
2013-10-13Added GPMSG_NPC_BUYSELL_RESPONSEThorbjørn Lindeijer1-0/+1
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-10-01Send the character data in a single messageErik Schilling1-7/+7
2013-09-26Store questlog values in the databaseErik Schilling1-2/+2
2013-09-19Synchronized some tweaks to protocol file from the clientThorbjørn Lindeijer1-4/+4
2013-09-19Removed the unused OBJECT_ACTOR enum valueThorbjørn Lindeijer1-9/+6
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-15Fixed handling of reconnects while the old connection is still validErik Schilling1-1/+2
The old connection is now terminated. And the new connection will receive the character data properly.
2013-09-13Added basic questlog supportErik Schilling1-0/+59
I did this patch quite a while ago. Big thx to Stefan Beller for "rebasing" it.
2013-09-09Send equipment data for character selectionErik Schilling1-2/+3
2013-09-08Actually send the info about beings using direction abilitiesErik Schilling1-0/+1
2013-09-08Added support for direction based ability targetsErik Schilling1-33/+34
I had to rearrange the protocol a bit in order to allow to keep the related things together.
2013-09-08Cleaned up the inventory handlingErik Schilling1-3/+5
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-3/+3
2013-08-26Made cooldowns of abilities scriptableErik Schilling1-3/+3
- 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-0/+1
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-8/+3
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] Removed the old autoattack systemErik Schilling1-17/+0
As a side effect i had to remove the monster attack AI for now. I will readd this as next thing.
2013-08-26[Abilities] Inform other players about ability usesErik Schilling1-0/+2
2013-08-26[Abilities] Added support for a global cooldownErik Schilling1-0/+1
Each ability can now define a cooldown that prevents the player from using other abilities for a while. The time of this cooldown can be set to any attribute. The modified value of the attribute is the value of the cooldown in game ticks. The cooldown will be automatically started if the ability has `autoconsume` set to true. Otherwise a script has to call entity:cooldown_ability(ability).
2013-08-26[Abilities] Added network message for removed abilityErik Schilling1-0/+1
This prevents really nasty code clientside
2013-08-26[Abilities] Renamed specials to abilitiesErik Schilling1-4/+4
2013-04-30Bumped the protocol version to 3Thorbjørn Lindeijer1-1/+1
Version 2 was on the lpc2012 branch. With version 3 the lpc2012 and master branches use again the same protocol.
2013-02-24Added possibility to reserve mapsErik Schilling1-1/+1
If you set net_gameServerName you can now reserve maps in the maps.xml. There you have to add the servername - property to the <map> tag. Then the map will only be activated by that server. Also changed the activate sequence that the account server now tells the game server what maps to activate (previously the server requested all maps and the account server said yes or no). TODO: Fix general inter server map switching.
2013-02-01Added emote support.Yohann Ferreira1-0/+2
2012-10-11Moved order of sending genderErik Schilling1-4/+4
Gender is shared. There is no reason in duplicating code *Breaks compatbility with old clients* *Requires clientside patch* Reviewed-by: Stefan Beller.
2012-07-17Added lua bind to send text effect particle to clientsErik Schilling1-0/+1
Change is tested. Reviewed-by: bjorn.
2012-05-25Fixed handling of skillsErik Schilling1-1/+1
- Removed possibility of skills getting mixed with attributes - Made the server sending the level of the current skill on exp change (currently the client could calculate it itself, but it allows more flexibillity in future this way) - Fixed reading of skills out of the database (for some reason the status effects were added as skills) ** Needs clientside patch as well (coming soon) ** Reviewed-by: Bertram.
2012-05-05Added debugging mode to the protocolThorbjørn Lindeijer1-5/+18
Allows inspection of message data. It is off by default since it consumes additional bandwidth, but it can be turned on using the net_debugMode option in manaserv.xml. Currently the option only affects outgoing data for each host individually. In particular, enabling this debug mode for the server does not automatically make the client annotate its messages. Reviewed-by: Erik Schilling
2012-04-19Fixed guild supportErik Schilling1-2/+4
List of things fixed: - fixed having multiple guild support everywhere - implemented kick code (untested due to missing kick possiblity in client) - fixed giving owner rights to next member when owner leaves guild - fixed potentional segmention fault when trying to access deleted guild after all members left - fixed saving right changes to database - made searching for guilds faster a bit (at least when having many guilds) TODO: + Fix conflict between guild and normal channels + Fix being able to leave guild channel without leaving guild itself + Add kick possiblity to client Reviewed-by: bjorn.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-3/+3
In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira
2012-04-04Enhanced special supportErik Schilling1-2/+3
- 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.
2012-03-13Fixed problems with map-bound world state variablesThorbjørn Lindeijer1-1/+1
Due to a wrong primary key, which covered only the state name, it was impossible to use the same state name on different maps. This has now been fixed. Another problem was that the map variables were being included in the global variables, because the related database query did not filter on the map_id column properly. While fixing that, the map_id column now allows explicitly marking a state variable as global (with the value 0) or system variables (with the value -1). System variables are currently not accessible from scripts, but that could be changed later. Reviewed-by: Yohann Ferreira Reviewed-by: Erik Schilling
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-2/+2
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-01-21Made @announce fully functionalErik Schilling1-2/+2
- Added announcements having senders now. - Removed /announcement support. Reviewed-by: Bjorn.
2012-01-02Made all beings capable of having a genderErik Schilling1-2/+37
Reviewed-by: o11c, bjorn, Bertram.
2011-12-03Allowed larger item amounts for mysql database.Erik Schilling1-1/+1
Changed range of amount to unsigned int(10). Sqlite update scripts is empty since no change was required here. Reviewed-by: Bertram.
2011-11-01Renamed the db update 15 to 18 as requested by Bjorn.Yohann Ferreira1-1/+1
2011-11-01Merge github.com:mana/manaservYohann Ferreira1-2/+0
Conflicts: src/game-server/character.cpp src/scripting/lua.cpp
2011-11-01dos2unix src/common/manaserv_protocol.hYohann Ferreira1-448/+448
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira1-1/+13
Reviewed-by: o11c.
2011-09-28Officially added the being gender to the protocol.Yohann Ferreira1-0/+12
2011-09-09Add persistent items support based on seeseekey's work.Yohann Ferreira1-2/+4
Also made some random changes where useful, including: - Code formatting fixes, - Design fix about the fact that only the game config option should be checked. - Fixed the size of the values sent and receive to follow the rest of the development. - Fixed variables names to make them show what they are, and not why they are used. Resolves: Mana-Mantis #142.
2011-09-08Merge github.com:mana/manaservYohann Ferreira1-1/+1
Conflicts: src/account-server/storage.cpp src/game-server/mapreader.cpp src/sql/mysql/createTables.sql
2011-08-30Made the db version an official pre-requisite.Yohann Ferreira1-1/+4
It was uneasy to not miss something when updating the db. And as the db version is somewhat corresponding to a certain protocol version, adding it in the protocol file sounds relevant to me, and helps when updating it.
2011-08-19Merge git://gitorious.org/~bertram/mana/manaserv-equipment-fix into ↵Yohann Ferreira1-19/+2
equipment-fix Conflicts: example/serverdata/scripts/maps/desert.lua