summaryrefslogtreecommitdiff
path: root/src/being.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-07-19Merge branch '1.0'Yohann Ferreira1-1/+2
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-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-1/+2
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-06-12Prevent removing dead players by timer.Andrei Karas1-1/+4
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-06-10Merge BeingManager and FloorItemManager as ActorSpriteManagerJared Adams1-2/+2
No need for two different classes to manage ActorSprites. Reviewed-by: Chuck Miller
2010-06-09Fix dead Beings not being removed using tmwAthenaJared Adams1-8/+22
Rename mWalkTime to mActionTime in Being and have Being manage death. Reviewed-by: 4144
2010-06-09Remove hard-coded frame counts from Being classJared Adams1-69/+71
Also removes the Monster/Player difference in tmwAthena's Being::logic and moves the particle code from Being::setAttack to Being::Logic for tmwAthena. Reviewed-by: Chuck Miller
2010-05-24Show selected target with bold font.Andrei Karas1-3/+13
Also fix possible memory corruption. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-05-23Fix attack display for beings without an attack definedJared Adams1-7/+2
Reviewed-by: 4144
2010-05-20Buffer layered sprites under SDLJared Adams1-8/+4
This improves framerate and allows transparent overlay for complex sprites. Two copies of the buffer are kept, one at full opacity, one with variable opactiy, to reduce calls to setAlpha. Reviewed-by: Bertram
2010-05-17Remove Monster, Player, and NPC classesJared Adams1-38/+469
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-06Add support for floor item spritesJared Adams1-279/+12
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
2010-04-23Add an Actor class to replace the Sprite classJared Adams1-14/+2
The Actor class manages the Map reference, position vector, and alpha float. These are the common parts from it's children.
2010-04-17Changed eAthena protocol name to TmwAthena and changed the config files ↵Bertram1-4/+4
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-6/+1
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-12Added the player collision rectangle and tweaked colorsBertram1-3/+13
2010-04-12Forgot to remove Being::checkNodeOffset() function.Bertram1-72/+9
2010-04-12Move path finding related code to the Map class and small fixes.Bertram1-37/+20
It permits two things: 1. It simplifies and demystifies Being::SetDestination() code. 2. It will permit to show the *real* calulated path when using the drawDebugPath feature for ManaServ.
2010-04-12One step closer to the full movement system ready.Bertram1-14/+18
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-04-12Finished Being::checkNodeOffsets function.Bertram1-8/+28
2010-03-31A hack to prevent NPCs from walking off screen on ManaServChuck Miller1-0/+4
This should really be fixed a different way, but until I find the cause of the issue, this will have to hold.
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-12/+12
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-08Revert "Added diagonal movement corrections and corrected some comments."Bertram1-29/+10
This reverts commit b1845e9e081df1fc77d9bcbed3ab95792d6ba682.
2010-03-04Merge branch 'master' of gitorious.org:mana/manaBertram1-1/+15
2010-03-04Show gender near player names.Andrei Karas1-1/+15
Configuring in Setup / Players / Show gender. Reviewed-by: Jared Adams <jaxad0127@gmail.com> Signed-off-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-03-03Merge branch 'master' of gitorious.org:mana/manaBertram1-22/+11
Conflicts: src/being.cpp
2010-02-24Some code cleanupsThorbjørn Lindeijer1-23/+12
Reviewed-by: Jared Adams
2010-02-23Added diagonal movement corrections and corrected some comments.Bertram1-10/+29
2010-02-23Sanitized ManaServ movement protocol, by mainly moving code from LocalPlayer ↵Bertram1-3/+61
to Being. This fixes some movement glitches under ManaServ and make the code much cleaner even if it's not perfect enough yet. First of all, many checks have been gathered in the Being::setDestination() calls. Also, now all path nodes including destination are checked against surrounding tiles to correct the path when necessary. The LocalPlayer::nextTile() still needs to be reviewed and some checks are missing but it's almost done :)
2010-02-21Handle packet 0x0195, and shows player's party name in a popupChuck Miller1-0/+11
2010-02-21Made tick counter and framerate limiter work during login sequenceThorbjørn Lindeijer1-2/+1
Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ...
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-19Fixed a crash when trying to switch serversThorbjørn Lindeijer1-4/+4
Ownership of the charInfo global variable wasn't well defined. It was being locked, unlocked and generally modified from a lot of places, and somewhere in this mess it ended up crashing when switching servers. Now the CharHandler instances, for eAthena and manaserv respectively, own this list of characters. A new class, Net::Character wraps up the slot index in combination with the player dummy. The list is passed on to the CharSelectDialog each time it changes. Both related and unrelated cleanups were made as well. Reviewed-by: Jared Adams
2010-02-10Adds missile-particle attribute to items and monster attacksChuck Miller1-14/+22
To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml" to the item's or monster's xml entry This will only work on equipped weapons, and on specified monster attacks. This patch also fixes a memory leak with target particles
2010-02-09Got rid of non-sensical Vector operator overloadsThorbjørn Lindeijer1-2/+4
Just because something is the kind of calculation that seems to be required does not mean it makes sense in general. Let's try to keep things understandable.
2010-02-09Got successfully rid of tile width/height fallback values as asked by Jaxad.Bertram1-9/+1
But I added some logs when speed and other actions where refused due to game/map uninitialized. This could help.
2010-02-09Separated fallback defaults for tile width and height.Bertram1-2/+5
2010-02-09Made the Beings' logic be able to handle any tile height/width.Bertram1-4/+18
This is the First step to get rid of most hardcoded 32 values.
2010-02-07Nicer way of indicating that we're waiting on the serverThorbjørn Lindeijer1-14/+12
No longer a dialog with an annoying progress bar (due to going back and forth), but rather a progress indicator that integrates better with the background.
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-02-07Renamed TakedDamage to DamageTakenThorbjørn Lindeijer1-3/+3
Sounds a bit better.
2010-02-01Small cleanups.Bertram1-2/+2
2010-02-01Reduced CPU consumption by setting speed per ticks value only once.Bertram1-7/+1
2010-01-31Unify eAthena and manaserv support in to one build.Daniel Bradshaw1-38/+30
Finish support for server types in the server dialog. Using the new server type function, strip out ifdefs, replacing them with if blocks for later merging in smaller atomic commits. Remove any remaining references to the support defs, including in build system.
2010-01-28Added virtual destructors, some implicit casts, and a couple of type changes.Daniel Bradshaw1-4/+4
Many warnings removed. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-01-25Simplify Being position a bitJared Adams1-21/+15
2010-01-24Remove some more _SUPPORT ifdefsJared Adams1-0/+1
2010-01-21No point in differentiating between int and Uint16Thorbjørn Lindeijer1-1/+1
2010-01-15Fixes drawing sprite in the playerbox widget.Chuck Miller1-0/+14