summaryrefslogtreecommitdiff
path: root/src/npc.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-12-16Stored the cached config value which says if non-crucial particle effects ↵Philipp Sehmisch1-1/+1
are enabled or not in a static member of class Particle instead of an instanced member of Being.
2009-08-14Add functions to more easily work with equipmentJared Adams1-1/+8
Move hair changes back over to them; related server change was reverted. Also move NPCs back over to extending Player. NPCs will have equipment in the future too, but for now, disable that part while we finish the system.
2009-08-13Clean up Being and it's derivativesJared Adams1-33/+3
Move stuff only needed for Players into Player (like slots and sprite limits). Move name handling into Being (no need for three copies of this code). Clean up terminology (including Map terminology). Remove hair-related variables.
2009-08-13Make NPC inherit from Being instead of PlayerJared Adams1-12/+1
No need for NPCs to inherit from Player. Player has functions NPC doesn't need and overrides that NPC doesn't need. This change reduces the number of functions needed to be overrided by NPC.
2009-05-05Remove debug code that was accidentally committedJared Adams1-25/+0
2009-05-05Remove extra check on player targetJared Adams1-0/+25
~Being does this too, so let's leave it there.
2009-05-01Merge the NPC dialogs into oneJared Adams1-1/+0
Also add support for the new TMWServ NPC packets
2009-04-29Removed underscores from some non-conforming filenamesBjørn Lindeijer1-1/+1
We don't use underscores in the filenames generally, and let's be consistent on that matter.
2009-04-05Implement TMWServ's NpcHandlerJared Adams1-11/+2
2009-03-31Add first draft of net handlersJared Adams1-5/+4
eAthena NPC handler has been implemented and is being used for NPC interraction.
2009-03-27Clean up of most of the Network pointersBjørn Lindeijer1-9/+0
Now that messages can be sent without requiring a pointer to the Network instance, a lot of cleanup was possible.
2009-03-27Made eAthena's Network class statically accessibleBjørn Lindeijer1-2/+1
Now the instance doesn't need to be passed into the MessageOut class anymore. Expect a lot of cleanup in the next commit.
2009-03-27Fixed some positioning issuesBjørn Lindeijer1-11/+5
Started with not being able to click NPCs properly, and I ended up correcting the draw positions of overhead text, targets and sprite ordering. It's now a bit more straight-forward. The position of a being is simply in the middle of the sprite at the bottom. When drawing the sprite, an offset remains because all the sprites are compensating for getting drawn half a tile to the left and one tile up.
2009-03-27Fixed position of dots on minimapBjørn Lindeijer1-9/+5
Also made mPx and mPy private and synchronize with mPos on setPosition(). The side effects of setting destination and clearing the path have been removed from setPosition(). Only the tmwserv PlayerHandler seemed to rely on that feature. Mantis-issue: 672
2009-03-26Fix talking to NPCsJared Adams1-1/+1
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>