summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-11-11Replace Event names with enums instead of stringsChuck Miller1-2/+2
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-5/+5
Reviewed-by: Freeyorp
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-7/+12
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-10-31Using tile coordinates for pick-upStefan Dombrowski1-2/+2
Since the tile coordinates are already avaible the calculation is not needed. Furthermore this avoids the correction of the tile, which was needed because the pixel coordinates are meant as coordinates for drawing the being. This resolves http://bugs.manasource.org/view.php?id=249 Reviewed-by: Thorbjorn
2010-10-11Implementing show IP for game mastersStefan Dombrowski1-1/+2
As an upcoming feature the TMW-Athena server sends IP addresses or IP hashes to game masters. The current client freezes if it receives such a packet, therefor the game masters need to use a new client before the server can use it. Normal players are not affected, because they do not get this packet. Showing the IP is optional and can be enable with the chat command "/showip 1". The IP is then shown behind the players name. Reviewed-by: Bertram
2010-10-08Remove the following systemStefan Dombrowski1-2/+0
Removed due to unresolved social issues. In master it had been already removed by Kage in commit 89f192b9039f9c000515f0a12f4bb9fb55c4691c.
2010-10-08Fixing pick-upStefan Dombrowski1-2/+2
If the player wanted to pick up an item one tile up, then he moved to that tile before he picked it up. The same fix is already used in Game::handleInput() for KEY_PICKUP. TODO: Understand why the position is wrong. As a reminder I made a mantis ticket: http://bugs.manasource.org/view.php?id=249
2010-10-05Send the server changed player direction if it changes during attackStefan Dombrowski1-4/+7
Reviewed-by: Jaxad0127
2010-10-04Remove the AFK response systemChuck Miller1-64/+1
This would be if it was handled by a addon later. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
2010-10-04Remove the following systemChuck Miller1-2/+0
The implamentation is poor, and this is something that would be better handled by the addon engine later down the road. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
2010-08-16Move more to the event systemJared Adams1-11/+18
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-08-12Simplify working with the event systemJared Adams1-1/+1
EventManager has been merged into Event, with some new convinience methods added. Reviewed-by: Chuck Miller
2010-08-05Have Being manage speech creation and add permissions to eventsJared Adams1-0/+2
The Being and Player Chat events now have the precomuted permissions for SPEECH_LOG and SPEECH_FLOAT. The Being class now acts on those events to show speech (if SPEECH_FLOAT is present). ChatWindow now checks for the SPEECH_LOG permission. Reviewed-by: Freeyorp
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-2/+2
Reviewed-by: Yohann Ferreira
2010-08-02Remove non-GUI references to MiniStatusWindowJared Adams1-51/+0
Reviewed-by: Freeyorp
2010-08-01Reduce localChatTab presence replacing it with the event systemChuck Miller1-4/+4
Reviewed-By: Jared Adams
2010-07-30Fixed weapon animations for manaserv.Yohann Ferreira1-0/+1
The beinghandler didn't tell to the being::setSprite() function if the equipment was a weapon or not. Resolves: Manasource-Mantis #157. Reviewed-by: Jaxad0127.
2010-07-29Changed the items loading to handle a new 'attack-action' parameter.Yohann Ferreira1-4/+4
The old behaviour was to load the weapon-type value and do many unnecessary checks and transformation on it: The weapon-type was transformed using hard-coded values into an integer enum value. The exact same thing was done on the opposite side in the animation files before comparing the two. As both data were string values, I simplified all of it by using the value taken in items.xml to call the corresponding action. This now also permit to set up new attack animation in items.xml and in the playerset.xml without having the need to modify the client code. Last but not least, the weapon-type value was used by both the skills and the actions and avoided the possibility to set up a definite action for a weapon-type. Note: The weapon-type parameter will become deprecated for the server in favor of a 'skill' parameter to reflect more it's actual use. This patch is the first step to fix Manasource issue: #157.
2010-07-19Fix showing xp messagesChuck Miller1-0/+2
Reviewed-by: Bertram
2010-07-19Merge branch '1.0'Yohann Ferreira1-3/+1
Conflicts: src/gui/itempopup.cpp src/item.cpp src/monster.cpp src/net/manaserv/playerhandler.cpp src/net/tmwa/partyhandler.cpp src/npc.cpp src/player.cpp src/resources/itemdb.cpp src/resources/monsterdb.cpp src/resources/monsterinfo.cpp src/resources/npcdb.cpp src/resources/spritedef.cpp
2010-07-18Add event.h to eventmanager.h and listener.h to reduce total number of includesChuck Miller1-1/+0
You'll have to include it anyways 99% of the time
2010-07-18Add old values to stat and attribute eventsJared Adams1-0/+18
Reviewed-by: Chuck Miller
2010-07-18Move more from LocalPlayer to PlayerInfoJared Adams1-55/+5
Also cleanup PlayerInfo a bit. Reviewed-by: Chuck Miller
2010-07-17Modify how attributes and stats are handledChuck Miller1-193/+0
Handling moved from LocalPlayer to PlayerInfo class Event system used to update windows Reviewed-by: Jared Adams
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-3/+1
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-07-08Fix crash in picking up an item that no longer existsremoitnane1-0/+11
Adds ActorSpriteListener to manage ActorSprite destruction as recommended by Jaxad0127. This likewise includes the changes made by Bertram. Reviewed-by: Jaxad0127, Bertram. Resolves: Manasource Mantis #160
2010-06-09Fix dead Beings not being removed using tmwAthenaJared Adams1-1/+1
Rename mWalkTime to mActionTime in Being and have Being manage death. Reviewed-by: 4144
2010-05-24Show selected target with bold font.Andrei Karas1-0/+9
Also fix possible memory corruption. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-05-21Merge branch '1.0'Thorbjørn Lindeijer1-8/+7
Conflicts: src/beingmanager.cpp src/beingmanager.h src/client.cpp src/localplayer.cpp
2010-05-21Fix some issues found by CppcheckJared Adams1-5/+6
2010-05-17Remove Monster, Player, and NPC classesJared Adams1-19/+9
Instead of having these three subclasses with minor differences, this commit merges them back into Being. In the future, we can make Beings that are talkable to some, attackable by others, etc. This also puts back support for monster equipment. Also changes remaining references to Being::Type and the constants to refer to ActorSprite::Type. Reviewed-by: Freeyorp
2010-05-09Move target cursor management into ActorSpriteJared Adams1-53/+5
This simplifies handling of target cursors, centralizing their logic into a single class, instead of two. Also make them more flexible and move the image files outside of the theme so servers can can control them and give them better names. Reviewed-by: Thorbjørn Lindeijer
2010-05-04Fix mouse attack (tmwa)Andrei Karas1-4/+2
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-04-23Add an Actor class to replace the Sprite classJared Adams1-5/+5
The Actor class manages the Map reference, position vector, and alpha float. These are the common parts from it's children.
2010-04-19Add afk mode for player.Andrei Karas1-1/+68
Add variable cur_time for current time. Add command /away [text] Reviewed by: Bertram
2010-04-17Changed eAthena protocol name to TmwAthena and changed the config files ↵Bertram1-5/+5
accordingly. This makes room for the actual eAthena protocol future inclusion.
2010-04-16Add race support for eAthenaJared Adams1-2/+2
The job/class field is used to select the race. If the given race isn't defined, it falls back on the first race (so servers can use jobs/classes without races). Also rename job to subtype for Being and subclasses, and begin support for changing monster and NPC subtypes on the fly (particle effects still need to be reset when they change). Reviewed-by: Bertram
2010-04-12Reviewed the LocalPlayer::nextTile() function. The ManaServ movement system ↵Bertram1-127/+347
is functional!! Introduced LocalPlayer::getNextWalkPosition(unsigned char dir) which takes care about the player next position while moving using keyboard. I removed the pixel scaler thing because it couldn't handle all the noticed cases and was rather heavy. There is still a bug in the movement system (nothing's perfect) but it's very rare and this is here in eAthena, too. So, I'll give a try at taking care of it once I'll have polished all of this a bit. Please try and give feedback!!
2010-04-12Forgot to remove Being::checkNodeOffset() function.Bertram1-2/+6
2010-04-12One step closer to the full movement system ready.Bertram1-32/+116
The LocalPlayer::nextTile() function has been sanitized and the movement system has been fine tuned, but yet not optimized. (Optimizations and riddance of 32 hard-coded value will come later.) There is just one case left not handled correctly when the character walked within one tile south-east of a blocking one and then the player click north-west (through the blocking tile) on a walkable location. Quite rare but still here.
2010-03-31Don't spam change direction packetsJared Adams1-2/+2
Reviewed-by: Chuck Miller
2010-03-25Remove the type boolean from InventoryWindowJared Adams1-2/+1
This moves inventory/storage type into the Inventory class, having size default to a call to the netcode to get the sive for the given type. Reviewed-by: Chuck Miller
2010-03-25Merge StorageWindow into InventoryWindowJared Adams1-1/+0
Reviewed-by: Chuck Miller
2010-03-25Eliminate the logic methods from InventoryWindow and StorageWindowJared Adams1-0/+15
2010-03-12Fix some issues with Being deletionJared Adams1-4/+5
Clear the Viewport's hover being when it gets removed and make sure LocalPlayer's target pointer get's cleared. Reviewed-by: Freeyorp
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-7/+6
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
2010-03-05Rename SkinLoader to ThemeJared Adams1-3/+3
Also merge the guialpha ConfigListener into Theme. Reviewed-by: Thorbjørn Lindeijer
2010-03-02Remove some unused membersJared Adams1-5/+0
Reviewed-by: Chuck Miller
2010-03-02Revert "Merge WindowContainer into Viewport and remove extra members"Jared Adams1-0/+5
This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746. Conflicts: src/gui/gui.cpp src/gui/viewport.cpp
2010-03-01Merge WindowContainer into Viewport and remove extra membersJared Adams1-5/+0
Reviewed-by: Chuck Miller