summaryrefslogtreecommitdiff
path: root/src/net/tmwa
AgeCommit message (Collapse)AuthorFilesLines
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-1/+1
2024-01-24Increased client version to 20Thorbjørn Lindeijer1-1/+1
It is unclear whether there are any protocol differences that should be dealt with at this point, but without this the login fails with "Client too old." error.
2024-01-24Add error for non tradable items.Andrei Karas1-0/+5
2024-01-24Fixed compilation issues and use of deprecated C++ featuresThorbjørn Lindeijer1-1/+1
* Fixed compiler errors due to dynamic exception specifications * Replace std::auto_ptr with std::unique_ptr * Replace std::mem_fun with std::mem_fn * Prefix for_each with std:: (apparently not needed before) * Just use lambda instead of std::bind2nd * Removed usages of std::unary_function
2013-09-08Fixing packet length of CMSG_NPC_STR_RESPONSEStefan Dombrowski1-1/+1
The CMSG_NPC_STR_RESPONSE packet transmits a string of variable length.
2013-06-08Fixed MessageIn::getUnreadLengthThorbjørn Lindeijer1-1/+4
It should not return large numbers after reading past the end of a message. This can cause infinite loops in several places in the client when a message happened to be shorter than expected.
2013-05-04Client-side settings are now available from settings.xmlPrzemysław Grzywacz1-13/+1
2013-05-02Fixed network layer doing delayed actor deletionThorbjørn Lindeijer2-2/+2
The delayed actor deletion was meant to be used during the logic calls, to avoid modifying the container while it is being iterated. The deletions happening from the network layer are not done while iterating the set of actors, so it can delete immediately. This fixes an issue where an NPC would disappear when changing appearance on tmwAthena, because this was implemented as a remove + add, which broke due to the delayed deletion. Mantis-issue: 507 Reviewed-by: Jared Adams
2013-04-27Added support for charcreation.xml settingsThorbjørn Lindeijer2-13/+26
This file was introduced by ManaPlus as a way of configuring the character creation process. It defines the number of hair styles and colors, how stat points should be divided and what the starting equipment of the player is. The minimum and maximum hair color/style IDs are not supported at the moment. This is mostly a backport of ManaPlus commits 10cf52b5 and dcc18eba, with some style changes. Mantis-issue: 501 Reviewed-by: Ablu
2013-04-27Always read the attributes.xml fileThorbjørn Lindeijer2-4/+21
This way it can also be used when connecting to a tmwAthena server for customizing the min/max of attributes and the amount of starting points. Mantis-issue: 501 Reviewed-by: Ablu
2012-12-05Ignore unsupported messages in public chatAndrei Karas1-0/+5
Reviewed-by: Erik Schilling.
2012-05-05Removed the shared base classes of MessageIn and MessageOutThorbjørn Lindeijer38-85/+338
There wasn't a whole lot gained by sharing a common base class, and it makes extending the manaserv Message{In,Out} classes with a debugging mode unnecessarily complicated. Reviewed-by: Yohann Ferreira
2012-04-02Fixed problems with using the last emotev0.6.1Thorbjørn Lindeijer1-3/+2
The tmwa/BeingHandler was adjusting the effect id rather than the emote id, causing it to not find the last emote (and the rest of the emotes only worked correctly because the effect ids were consecutive in the same order as the emote ids). Furthermore, the EmoteShortcutContainer refused to draw the icon for the last emote due to an off-by-one error in dealing with the 1-adjusted emote ids used by the EmoteShortcut class. Also cleaned up some old remains of a player ignore strategy that used to use the two balloon emotes (this had been their original purpose). Reviewed-by: Erik Schilling
2012-02-15Deswapped the ring2 and necklace equip slots for tA.Yohann Ferreira1-2/+2
I tested it with the Towel and the Wedding Ring on the testing server. Spotted-by: Jenalya, cody. Reviewed-by: Erik Schilling
2012-02-14Omit equipping of non-existing itemsStefan Dombrowski1-7/+16
Reviewed-by: Ablu and Bjorn
2012-02-14Removing NPC trade messages from chatStefan Dombrowski1-8/+2
The thanks messages got removed, because they are useless and when selling many items they completely trashed the chat. In Mana 0.5 this was already fixed, see commit 13c4a1131854887ac9ec83f80c7964f6b2949c87. Reviewed-by: Ablu
2012-02-12Ignore ManaPlus shop commandsThorbjørn Lindeijer1-0/+13
This shopping mechanism is not supported by this client at the moment, and it's annoying to have these turn up in whispers. Reviewed-by: Stefan Beller Reviewed-by: Erik Schilling
2012-02-10Corrected two spelling mistakesjurkan1-1/+1
Reviewed-by: Erik Schilling
2012-02-07Fixed color updates of magic barErik Schilling1-0/+4
Resolves: Mana-Mantis #457. Reviewed-by: Bertram.
2012-02-03Simplified and made generic the way the pickup is handled.Yohann Ferreira2-0/+11
I also made the range be taken from the server type as for the pickup and npc talk ranges. Last but no least, I fixed the parameters sent with PGMSG_PICKUP to send the (item) position where to pickup at as described in the manaserv protocol. The pickup is still not 100% functional due certainly to two problems: 1. The client item coordinates might not be the exact same as in the server. 2. The client seems to try to pick up the item a bit too soon, probably for the reason given in 1. I'll investigate this in another patch. Reviewed-by: Thorbjørn Lindeijer, Erik Schilling.
2012-02-02Fix to the hair colors and styles handling.Yohann Ferreira3-4/+18
- I made the charCreatedialog handle a possible max permitted color Id and a minimum hair style id for tA. - Added a foundation to later load the styles and colors from the same file, to handle the Mana-issue #224 for manaserv. - Support for non-contiguous hair color and style ids has also been added. - I also replaced the < and > arrow signs with images. Reviewed-by: Ben Longbons, Thorbjørn Lindeijer
2012-02-02Fixed the use of custom particle effects for attacks.Yohann Ferreira1-3/+2
The tA beingmanager was wrongly using the attack type in the Being::handleAttack() function, which is in fact used to set the attack id. Thus, breaking the attack id given and all its attack parameters. I noticed that while updating the client data for TMW. Reviewed-by: Thorbjørn Lindeijer
2012-01-31Added missing copyright notices.Yohann Ferreira2-0/+2
Reviewed-by: Erik Schilling
2012-01-28Moved mTrading into the TradeHandlerThorbjørn Lindeijer2-6/+9
Really only the trade handler is concerned about whether the player is currently in a trade or not. Reviewed-by: Erik Schilling
2012-01-27Random hacking cleanups in the LocalPlayer classYohann Ferreira1-2/+2
- Renamed mLastTarget to mLastTargetTime, and mLastAction to mLastActionTime to clarify their use. - NULL -> 0. - Removed the unused mLocalWalkTime member. + Change requested by bjorn. Reviewed-by: Thorjørn Lindeijer
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer44-44/+44
2012-01-19Fixed handling of problems with loading the initial mapThorbjørn Lindeijer1-7/+8
This can always happen, either due to mismatching local data or a server-side error. The client displays a pop-up in this case, but it's not possible to read that when it crashes as well. Reviewed-by: Yohann Ferreira
2012-01-18ColorDB -> HairDB.Yohann Ferreira2-6/+6
This will ease the reading of the next patch about hair handling at character creation time in tAthena. As requested by bjorn. Reviewed-by: bjorn
2012-01-18Found a better way to fix the movement glitches on both servers.Yohann Ferreira2-7/+0
The patch also takes care of not spamming the different servers, when the servers are setting the being speed correctly. The most problems were coming from the keyboard movement functions handling 1 tile paths. To void the issues seen in #405, #439, and #440, I simply prevented to set a new path before reaching the destination of the former one, when using the keyboard. The mouse path system remains unchanged. I also made some functions private (or here protected) to show they shouldn't be called by something else than the localplayer object. And I removed the nextTile() function, since it was obsolete, unused, and replaced by the nextTile(direction) function. That patch was tested on both servers with mouse/keyboard mixed use. Resolves: Mana-Mantis #405, #439, #440. Reviewed-by: bjorn
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer5-9/+9
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira
2012-01-10player_node -> local_playerYohann Ferreira10-43/+43
Reviewed-by: Ablu
2012-01-09Changed INT and DELETE enum names to fix C::B compilation.Yohann Ferreira4-38/+39
This was introduced since Crush updated his mana lib pack. I simply changed the names to avoid a collision. Reviewed-by: Ablu.
2011-09-16Improve handling of packet lengths.Ben Longbons1-42/+46
* Use a symbol, VAR, instead of -1 for variable-length packets. * Also change it's value to 1, so the length can be properly unsigned. Note: A packet can't actually have length 1, since packet ID is 2 bytes. * Use correct type (uint16_t) for packet id and length in more places. * Avoid reading beyond the length of the array. * Immediately parse variable length packets with length 4 (i.e. no body) instead of waiting for another byte to arrive first. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2011-09-16Instead of SDL_mutex, use Mutex wrapper and MutexLocker for safetyBen Longbons2-23/+12
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2011-08-19Merge git://gitorious.org/~bertram/mana/mana-equipment-fix into equipment-fixYohann Ferreira2-2/+70
2011-08-19Fixed visible equipment updates, and made it based on equip.xml.Yohann Ferreira1-0/+18
2011-08-18Improved equip slots description for both protocols.Yohann Ferreira1-0/+33
Now the itempopup is also telling what equip slot is under the mouse pointer.
2011-08-18Made the equipment window not use server specific code again.Yohann Ferreira1-0/+5
I also made the number of slots displayed taken from the equip.xml file for manaserv.
2011-08-18Made the client able to successfully equip/unequip!Yohann Ferreira1-0/+10
2011-08-18Got rid of the superfluous definition of the slot number for tA.Yohann Ferreira1-2/+4
2011-08-11Made the delay between to keyboard move calls functional.Yohann Ferreira2-0/+8
It has been fixed and be made adapted to the being movement speed. Now, for instance, the client sends 3x times less move calls to the tA server, and roughly 20x times for the Manaserv's one. Resolves: Mana-Mantis #346.
2011-07-01make update-po + gettext special comment added.Yohann Ferreira1-0/+5
I added the //xgettext:no-c-format comment because gettext was wrongly guessing the no-c type of those strings. Nicely suggested by Byakushin a lot of time ago.
2011-06-24Made use of the attack speed sent by the tA server.Yohann Ferreira1-2/+5
Part of issue #343.
2011-06-23Fixed type in the guildhandler message as reported by Der Loisl.Yohann Ferreira1-1/+1
Thanks for the report. :) Resolves: Mana-issue: 367.
2011-06-22Applied fixes requested by cody.Yohann Ferreira3-5/+5
- Made the map teleport distance fixed for manaserv. - Small cleanups. The branch is considered reviewed by: Cody. Resolves Mana-Mantis: #74.
2011-06-16Remove useless ping packetBen Longbons3-16/+0
The comment in game.cpp about the server waiting for this is a lie. Reviewed-by: Bertram.
2011-06-04Fixing movement on tAStefan Dombrowski1-2/+2
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-06-04Revert "Fix sending coordinates for tmwAthena"Jared Adams1-12/+6
This reverts commit d2c548e091f203196d93c011fc65944fb1cdc986.
2011-06-04Fix sending coordinates for tmwAthenaJared Adams1-6/+12
2011-06-04Fix handling of 16- and 32-bit number in tmwAthena netcodeJared Adams2-8/+29