summaryrefslogtreecommitdiff
path: root/src/net/manaserv
AgeCommit message (Collapse)AuthorFilesLines
2011-06-22Merge branch 'master' of gitorious.org:~bertram/mana/mana-any-square-tile-sizeYohann Ferreira1-3/+2
2011-06-22Applied fixes requested by cody.Yohann Ferreira1-5/+3
- Made the map teleport distance fixed for manaserv. - Small cleanups. The branch is considered reviewed by: Cody. Resolves Mana-Mantis: #74.
2011-06-19Making party invite functionalStefan Dombrowski2-34/+54
Reviewed-by: Bjorn
2011-06-17First pass on removing tile hard coded values.Yohann Ferreira1-5/+6
Every files has been checked against the hard coded 32 values except the map.cpp file. I also added convenience functions in the Game class, centralized the default item icon size, and removed two unused defines in being.cpp.
2011-06-17Made the client officially handle attack ids.Yohann Ferreira2-3/+3
It already was, but now the the api is clear about it. Client part of the mana issue: #363. Reviewed-by: Bjorn.
2011-06-16Remove useless ping packetBen Longbons2-7/+0
The comment in game.cpp about the server waiting for this is a lie. Reviewed-by: Bertram.
2011-06-03Replace SDL_types.h with cstdintJared Adams8-20/+20
This required moving to C++0x, so it does that too, and fixes a few errors with that. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2011-06-03Cleanup network code to use unsigned integers of the relevant sizeBen Longbons4-12/+12
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer1-1/+1
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
2011-06-02Some work on the manaserv equipment backendThorbjørn Lindeijer2-35/+166
Currently the same equipment window is used as for tmwAthena so that at least something is visible. This means the location of equipped items is currently illogical. It is now possible to equip and unequip items. Mantis-issue: 164 Reviewed-by: Stefan Dombrowski
2011-05-30Routing party invite through the map serverStefan Dombrowski2-5/+17
The player sends party invites to the game server. If the invitee is within the visual range of the inviter, then the game server forwards the invite to the chat server. Reviewed-by: Bjorn, Jaxad0127
2011-05-15Starting to fix party inviteStefan Dombrowski2-8/+16
2011-05-01Fixing checking of being positions send by the serverStefan Dombrowski1-6/+6
Reviewed-by: thorbjorn
2011-05-01Checking being positions send by the serverStefan Dombrowski1-0/+26
Reviewed-by: Bertram
2011-04-30Merge branch '0.5'Yohann Ferreira1-1/+1
Conflicts: CMakeLists.txt po/fi.po po/fr.po src/gui/skilldialog.cpp src/localplayer.cpp src/net/manaserv/generalhandler.cpp src/net/tmwa/buysellhandler.cpp src/net/tmwa/generalhandler.cpp src/net/tmwa/playerhandler.cpp src/net/tmwa/specialhandler.cpp src/winver.h
2011-04-29Made the client load the skills.xml again.Yohann Ferreira1-1/+1
This, instead of the protocol specific filenames that are mana-skills.xml and ea-skills.xml. This is backward compatible as the old skills.xml file was once used before the 0.0.29.1 release which is the last alive from the 0.0.x serie. The skills.xml will have to added to world data to make this working, though. (Done in another patch.)
2011-04-27Avoiding compiler warnings about possible uninitialized variablesStefan Dombrowski1-1/+1
Reviewed-by: Bertram
2011-04-26Made the client use a unique kind of movement code.Yohann Ferreira6-65/+40
This is fixng many issues and (hopefully) will make the movement rendering much smoother. Merge branch 'master' of gitorious.org:~bertram/mana/mana-movement-code-merge Conflicts: src/being.cpp src/net/manaserv/beinghandler.cpp Resolves: TMW-Mantis #946. Reviewed-by: Thorbjorn.
2011-04-18Added a client-side position tolerance check.Yohann Ferreira2-10/+26
This is based on the information given by the server which now permit resyncs when necessary. Reviewed-by: Thorbjorn.
2011-04-16Removed ENet version checks since only 1.3 should be used anywayThorbjørn Lindeijer3-14/+0
Reviewed-by: Stefan Dombrowski
2011-04-16Removing unused enum EMAILCHG_EXISTS_EMAILStefan Dombrowski1-5/+0
The protocol uses ERRMSG_EMAIL_ALREADY_EXISTS instead. Reviewed-by: Jaxad0127
2011-04-16Post-review fixes.Yohann Ferreira1-3/+0
- Removed unnecessary comments - Removed a useless contains() check in getTileCenter() - Fix the above function documentation - Don't permit FloorItem to be created without a map object. Reviewed-by: Thorbjorn Lindeijer.
2011-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer2-9/+0
I have to admit I contributed a large part of these. Sorry for that. Less empty space, more attention to the code. Acked-by: Jared Adams
2011-04-09Renamed Listener to EventListenerThorbjørn Lindeijer3-5/+5
Makes it clear what kind of listener it is, since there are other listener classes as well. Acked-by: Jared Adams
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer7-62/+62
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer7-29/+29
Acked-by: Jared Adams
2011-04-09Moved Events to Mana::Event::TypeThorbjørn Lindeijer5-28/+29
Acked-by: Jared Adams
2011-03-30Fixing zombies in char select dialogStefan Dombrowski1-2/+21
How to reproduce the bug: * Delete a character. * Create a new character in another slot. * Now the deleted character reappears. Also fixing handling of error messages from character select response. This resolves http://bugs.manasource.org/view.php?id=322 Reviewed-by: Jaxad0127, VUT
2011-03-29Made the flooritems position set back in pixels.Yohann Ferreira1-17/+1
The position is centered to the nearest tile center in tA.
2011-03-28Random code cleanups requested righteously by Thorbjorn - part 1.Yohann Ferreira2-10/+11
- Fixed bogus documentation. - Fixed Vector parameters to const Vector& where releavant. - Removed a false comment. - Removed superfluous headers in src/net/tmwa/beinghandler.h. - Optimize a bit the tmwa::beingHandler::getPixelsPerTickMoveSpeed() function.
2011-03-17Simplified the get/setAttackRange() functions as requested.Yohann Ferreira1-1/+2
The attack range is still hardcoded for Manaserv as long as generic equipment handling hasn't been implemented.
2011-03-17Now the client centers the pixel positions when using tA.Yohann Ferreira1-0/+3
I made it so that the behaviour can be changed with only a boolean setting in the playerhandler.
2011-03-15Implemented a screen shake effect system in the viewport class.Philipp Sehmisch3-0/+40
The screen can either be "nudged" in a random direction with a specific intensity or you can define an exact x and y intensity, decay factor and duration. On a tmwAthena server an effect is triggered when the player character dies. A method for stopping all shake effects is also implemented, but not used yet. I added a netcode message for Manaserv to trigger an effect server-sided. Because our protocol has currently no way to transport floating point values, the decay is transported as a fixed point value with 4 decimals which is entirely sufficient for this purpose.
2011-03-15Basically merged the two movement algorithms into one.Yohann Ferreira4-48/+36
This was made in favour of the manaserv way of doing things. I also added a way to keep the original server speed value so the pixel value can be recomputed at each map change, as this was necessary since the speed is given before the first map is loaded. The code is much more simpler now about movement handling, and we can already see improvements on other characters movements in The Mana World with this. Everything can't be perfect the first time; here are bugs identified so far: - Monsters direction isn't updated on TmwAthena for obscure reasons. - Remote players walking animation is sometimes reset on each steps. - When changing map, the local player sometimes walks randomly until the player reacts. Stay tuned!
2011-02-21Fixing segmentation fault in chathandlerStefan Dombrowski1-5/+7
Reviewed-by: Jaxad0127, Thorbjorn
2011-01-27Send the correct protocol version when registering on Manaserv.Yohann Ferreira1-1/+1
2011-01-25Upgraded the manaserv protocol version to 1.Yohann Ferreira1-1/+1
Yeah, I know Jaxad, we're not releasing but as agreed with Thorbjorn, the protocol is incompatible even when moving, so better get rid of old clients early.
2011-01-24Refactored the item loading in a more extensible and per protocol way.Yohann Ferreira1-3/+3
This will greatly help into upgrading the need of each protocol separately. This is the first step to a new item and equipment system for manaserv. A subclassing of the EquipmentWindow will be done in the next commit, as requested by Thorbjorn. Reviewed-by: Thorbjorn.
2011-01-11Remove the protocol version magic number.Yohann Ferreira2-1/+3
This follows the changes made on the server. Reviewed-by: Jaxad.
2011-01-09Fix other direction discrepancies on the client.Yohann Ferreira2-23/+10
This fix the change dir (with alt key), attacks directions, and the direction of a being standing when you come in its range. Reviewed-by: Jaxad. Resolves: Mana-mantis #257
2011-01-03Sync the manaserv_protocol.h file witht the one of the server.Yohann Ferreira1-4/+55
Trivial.
2010-12-30Renamed protocol.h to manaserv_protocol.h to follow server's changes.Yohann Ferreira17-16/+16
I'll sync the two files as for the new enums in a separate commit. Trivial fix. Resolves: Mana-mantis #278.
2010-12-29Made the client handle the characters slots properly for Manaserv.Yohann Ferreira2-6/+11
Reviewed-by: Crush.
2010-12-17Update the net/manaserv/protocol.h file with latest description.Yohann Ferreira1-2/+2
Trivial fix.
2010-12-16Made the client handle the number of slots given by the server.Yohann Ferreira2-4/+11
I turned the CharacterEntries into a vector. As for now, it's basically working but I discovered bugs about slots handling mainly for Manaserv that were already present before that patch. Hence, there are three remaining issues: - Under ManaServ, the character's slots numbers aren't handled when loading the characters but used when sending selection or deletion attempts. For instance, if you delete the character at slot 1, you won't be able to select or delete characters at slots 2 and 3, since the server believes that the characters are now in slots 1 and 2, even thought the client still displays them at the former slots. - Also under manaserv, you won't be able to create a character at slot 1 and 3, the server will automatically add the new one to the next slot, which is not corresponding to where you clicked to the 'Create' button. I propose to make Manaserv send again the character slots numbers and store them in database since we used them in creation, selection, and deletion attempts. It would make more sense IMHO. - The last remaining issue found is that when switching between different servers, the loginData don't get cleaned up, make the characterSelect dialog look crazy when the number of slots is different between two servers. If this one is accepted, my next patch will make the logindata be cleaned up between each login attempts (as for the slot number, and maybe other sensible data) and the next ones will readd character slot handling server and client side. Reviewed-by: Jaxad0127.
2010-12-15Unlock the char select dialog even if we've got an error.Yohann Ferreira1-1/+1
This permit not to be stuck at character deletion when something goes wrong. Trivial fix.
2010-11-12Change NPC handling in the net codeChuck Miller2-54/+104
Instead of using events to invoke netcode, invoke netcode directly and have it send events Reviewed-by: Freeyorp
2010-11-11Replace Event names with enums instead of stringsChuck Miller5-27/+28
2010-11-11Have the event system channels use enums instead of stringsChuck Miller8-26/+26
Reviewed-by: Freeyorp
2010-11-09Fix client successful unregister behaviour for manaserv.Yohann Ferreira1-1/+1
Resolves: Mana-Mantis #250. Reviewed-by: Freeyorp, thorbjorn.