summaryrefslogtreecommitdiff
path: root/src/npc.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-90/+18
Conflicts: A lot of files.
2009-03-23Move all TMWServ-specific code to net/tmwservJared Adams1-1/+1
Also fix several instances where the same net handler was being used for both servers, and a few other related oddities.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-4/+44
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-03-12Make use of the new available colorsMajin Sniper1-2/+4
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
2009-03-06Got rid of Sint{8,16,32} and Uint32 for being IDBjørn Lindeijer1-1/+1
Using unsigned rarely makes sense, especially when the server doesn't use it either. Other uses of unsigned should be reviewed. In all other cases, int is the fastest integer type on any architecture. Using 8 or 16 bits can basically only be a memory optimization.
2009-02-26Merge branch 'aethyra/master'Bjørn Lindeijer1-7/+4
Conflicts: data/graphics/images/login_wallpaper.png src/being.cpp src/beingmanager.cpp src/engine.cpp src/game.cpp src/gui/buysell.cpp src/gui/buysell.h src/gui/gui.h src/gui/npc_text.cpp src/gui/npc_text.h src/gui/npcintegerdialog.cpp src/gui/npclistdialog.cpp src/gui/npclistdialog.h src/gui/npcstringdialog.cpp src/gui/sell.cpp src/gui/shop.cpp src/gui/table.cpp src/net/beinghandler.cpp src/net/npchandler.cpp src/net/playerhandler.cpp src/npc.cpp src/npc.h src/shopitem.cpp src/shopitem.h src/utils/stringutils.cpp src/utils/stringutils.h src/utils/trim.h
2009-02-25Fix NPC handling to not need a handle on the NPCIra Rice1-63/+2
Loosely based on TMW commit f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1 Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-25Prevent duplicate NPC talking when using keyboardJared Adams1-2/+5
Based on commit a1e483913672e55704e8fbafeff5ea0ccc0c9b07 from Aethyra.
2009-02-25Fix NPC handling to not need a handle on the NPCJared Adams1-65/+2
The Being ID is used instead, as that is all that was ever really needed.
2009-02-25Don't delete the Being in the NPC classJared Adams1-4/+1
The BeingManager will clean it up when it's next cleared. One hanging Being isn't too much. A reference count system like resources use might be a better way to handle Beings.
2009-02-25If no network is set, then don't continueIra Rice1-1/+10
Based on TMW commit a996d4bff3cc5a35ee5cdb6cb5bdef920cf44120 Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-25Fix some problems with deleting NPCs earlyJared Adams1-9/+3
2009-02-25If no network is set, then don't continueJared Adams1-0/+2
Only checks in these two palces for now, as missing network in the others would indicate a design flaw.
2009-02-25Don't delete the current NPC too earlyJared Adams1-3/+11
2009-02-24Cleaned up some code, as well as removed redundant talk client requestingIra Rice1-3/+9
(which would happen from using the keyboard instead of the mouse). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-24Don't set current_npc when initiating interractionJared Adams1-1/+0
Let it be set by the netcode if the NPC responds. This caused a movement bug if they didn't.
2009-02-24Don't set current_npc when initiating interractionJared Adams1-1/+0
Let it be set by the netcode if the NPC responds. This caused a movement bug if they didn't.
2009-02-24Remove debug statement that should've been removedJared Adams1-1/+0
It was for testing and shouldn't have been committed
2009-02-18Centralize current_npc cleanupJared Adams1-1/+17
2009-02-17Merge branch 'aethyra/master'Bjørn Lindeijer1-4/+0
Conflicts: src/gui/npc_text.cpp src/gui/npc_text.h src/gui/npcintegerdialog.cpp src/gui/npclistdialog.cpp src/gui/npcstringdialog.cpp src/net/npchandler.cpp src/npc.cpp
2009-02-16Moved target unsetting on NPCs and monsters to the being class. This isIra Rice1-4/+0
done to ensure that the client doesn't crash if the target dies and is removed from the map (since target drawing is based off of the specific target reporting its x and y coordinates). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-16Don't arbitrarily unset player target on NPC deletionBjørn Lindeijer1-9/+5
When an NPC got deleted it would reset the player target. I'm assuming what was meant was to reset the target when the deleted NPC was the target.
2009-02-16Fixed up NPC dialogs to behave more like eAthena expects.Jared Adams1-2/+2
2009-02-16Don't arbitrarily unset player target on NPC deletionBjørn Lindeijer1-9/+5
When an NPC got deleted it would reset the player target. I'm assuming what was meant was to reset the target when the deleted NPC was the target.
2009-02-16Add next/close buttons for NPCsJared Adams1-2/+2
And keep the text dialog open for the whole transaction, logging user input and keep a full record of text from the NPC (for the current transaction only).
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-09Merged with Aethyra master as of 2009-02-09Bjørn Lindeijer1-1/+0
Conflicts: A lot of files...
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-14/+40
Conflicts: Almost everywhere.
2009-02-07Some more include cleanups.Ira Rice1-1/+0
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-24Tweaks to the speech bubbles so that being status (GM, mob, npc,Ira Rice1-0/+2
regular player) is displayed in the speech bubbles now. No need to view your own name to be able to see whether you're showing as a GM now. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-24Use standard GUI font also for speech and namesBjørn Lindeijer1-4/+1
The speech bitmap font can't handle unicode, so it has now been replaced by the standard GUI font, drawn with a shadow for chat and with a full outline for names.
2009-01-24Use standard GUI font also for speech and namesBjørn Lindeijer1-3/+1
The speech bitmap font can't handle unicode, so it has now been replaced by the standard GUI font, drawn with a shadow for chat and with a full outline for names.
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-18Fixed String dialog sending so that it doesn't crash the client afterIra Rice1-3/+3
completing, as well as making it so that the server can actually use the string to match to the same value (which it wasn't doing before. Did anyone think to test that?) Would eventually like to whittle down the wasted bytes sent, but this so far is the least number that can be done, make it so that strings can be matched, and on top of that, NOT crash the map server. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-18Add dialogs to input text and numbers for scriptsJared Adams1-0/+18
2009-01-18Add dialogs to input text and numbers for scriptsJared Adams1-12/+24
2009-01-15Added emote database, which is loosely based off of the NPC database.Ira Rice1-2/+1
Also changed all emotes to be animated sprites now, and to load from emotes.xml. This gives us a bit more flexibility to not only add more emotes in the future, but allowing them to be animated as well. NOTE: This commit, unlike the previous emote commits, breaks emotes if you don't have the xml file. This will be available on Aethyra soon, but is not rolled into an update at the moment. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-15Style cleanups throughout most of the code. Splitting function type fromIra Rice1-10/+5
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-05Handling gender with an enum everywhere.Philipp Sehmisch1-1/+1
(cherry picked from mainline commit d3adc61aa4b4924f82d8cbc23bea26da7257da97) Conflicts: src/net/beinghandler.cpp src/net/charserverhandler.cpp src/player.cpp src/player.h
2008-12-07Merge commit 'a7c21e6f8add37af7412449742ec55c8daa8571a'Ira Rice1-1/+3
Conflicts: AUTHORS CMakeLists.txt ChangeLog INSTALL README aethyra.cbp configure.ac data/help/changes.txt data/help/commands.txt data/help/header.txt data/help/support.txt src/Makefile.am src/aethyra.rc src/being.cpp src/being.h src/equipment.cpp src/equipment.h src/floor_item.h src/game.cpp src/gui/buddywindow.cpp src/gui/char_select.cpp src/gui/char_server.cpp src/gui/chat.cpp src/gui/chat.h src/gui/equipmentwindow.cpp src/gui/equipmentwindow.h src/gui/gui.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/itemcontainer.h src/gui/minimap.cpp src/gui/ministatus.cpp src/gui/newskill.cpp src/gui/npc_text.cpp src/gui/npclistdialog.h src/gui/ok_dialog.cpp src/gui/setup_video.cpp src/gui/skill.cpp src/gui/skill.h src/gui/status.h src/gui/table_model.h src/gui/updatewindow.cpp src/gui/viewport.cpp src/inventory.cpp src/inventory.h src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/localplayer.h src/logindata.h src/main.cpp src/map.cpp src/monster.cpp src/monster.h src/net/beinghandler.cpp src/net/beinghandler.h src/net/buysellhandler.cpp src/net/equipmenthandler.cpp src/net/loginhandler.cpp src/net/loginhandler.h src/net/network.h src/net/npchandler.cpp src/net/playerhandler.cpp src/net/protocol.h src/net/tradehandler.cpp src/npc.cpp src/npc.h src/particleemitter.cpp src/particleemitterprop.h src/player.cpp src/player.h src/player_relations.cpp src/resources/imageset.cpp src/resources/imageset.h src/resources/itemdb.cpp src/resources/mapreader.cpp src/resources/monsterinfo.h src/text.cpp src/text.h src/textmanager.cpp src/textmanager.h src/tileset.h src/utils/fastsqrt.h src/utils/strprintf.cpp src/winver.h tools/tmxcopy/Makefile tools/tmxcopy/base64.cpp tools/tmxcopy/base64.h tools/tmxcopy/tostring.h Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-4/+2
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-10-25Fixed NPC's so that clothes would draw again. However, if in the future Ira Rice1-0/+6
this isn't sufficient for attacking, movement, or other code, this will be changed to mimic the style used by the base class player.
2008-10-25Changed NPC's to inherit from the player class. This should be helpful Ira Rice1-1/+6
later, since they essentially are a beefed up player.
2008-10-25Changed NPC name logic so that it filters out all content past the # Ira Rice1-2/+4
delimiter. This behavior is specified as being a Safray client feature, and not being a server feature, and we haven't implemented it before because of not having a good reason to at the time.
2008-10-14Early addition of a particle effect disabling option. Would like to Ira Rice1-6/+9
change this in the future to update instantaneously.
2008-10-09Merged the movement branch into trunkBjørn Lindeijer1-5/+5
I consider this the only way forward. In my tests this code isn't actually doing worse than what was there before. Of course some cases are a bit broken, and I'm open to any kind of feedback so that we can fix those issues.
2008-09-25Merged the Tametomo branch into trunk.Ira Rice1-1/+2