summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2013-08-26Use '/' as seperator for ability categories rather than '_'Erik Schilling1-3/+3
I find this a lot more readable.
2013-08-26Made cooldowns of abilities scriptableErik Schilling8-155/+63
- Removed hardcoded using of attributes - Simply introduced lua functions to set global and ability cooldowns - Requires database update - Bumps the protocol
2013-08-26Allow multiple scopes (character and monster)Erik Schilling1-4/+10
This allows you to avoid putting usually unnessecary load onto npcs if you only wanted to share an attribute between monsters and characters.
2013-08-26Readded level handlingErik Schilling3-21/+59
Things done: Wrote a entity:give_experience function (lua side only). Renamed characterpoints to attributepoints (no db update. Did not want to do one for a simple rename). Temponary introduced a ATTR_LEVEL constant. TODO: dehardcode this. Script binds for settings the correction and attribute points.
2013-08-26Removed skillsErik Schilling13-690/+1
This removes support for skills. The plan is to allow to implement the skills as they were implemented before via attributes. This adds a lot more flexibility to the server creators while also removing the confusion about skills and attributes. So this change does: - Remove the skillmanager with all its calls, the skill xml file, etc - Move exp giving to the script engine: --> Allows to implement the old behaviour (and more) in the scripts - Remove the exp tag from the monster definition: + Since the server itself does not require it anymore it feels wrong to require it for EVERY monster. TODO: Add a system to add properties to the monsters/items.xml which allow defining things like the exp and allows to read the value from the script engine. + Small drawback, but it should not be hard to implement this property system. - Drop the level networking and calculation. + level calculation will happen via the attribute system later but i would prefer to do this in a seperate patch since this patch already got longer than expected especially since this requires to make setting correction points and available status points scriptable. + The level would be simply set as a attribute, the int number of it will be the level, the remaining digits will be the % number till the next levelup. - NOT remove any existing skill tables in the database update scripts. + There is no way to move them into the attribute table in a unified way (there are too many different way they could have been used). So server admins have to care about moving theirs skills to attributes themselves. + Keeping the old tables does not hurt for existing databases. So removing does not give any advantage/is required anyway. The now obsolote info about the EXP transaction is not removed for updated databases either. (The update script basically only bumps the version number without doing anything else. - bump the network protocol version --> old clients won't be able to connect. - bump the database version --> serveradmins need to update their db.
2013-08-26Allow names instead of ids for attributes + cleanupErik Schilling11-182/+177
I did not adapt the scripts yet since we need some special handling for the attributes which are required by the server directly. So you still have to use the ids for those. I will change that later. In the future I want to use the AttributeInfo class instead of the int id everywhere possible. So I did a small start on that too.
2013-08-26Warn when defining an attribute without a scopeErik Schilling1-3/+3
Attributes without a scope make no sense.
2013-08-26Added a first very basic monster ai versionErik Schilling1-15/+0
The ai is similar to the old c++ version. Only the target searching is executed every 10 ticks only now to prevent performance issues with too many lua calls.
2013-08-26Fixed setting name of monstersErik Schilling1-2/+2
2013-08-26Added tick argument to the monster update callbackErik Schilling1-0/+1
2013-08-26Removed the hardcoded monster AIErik Schilling3-202/+1
2013-08-26Added get_monster_classes() bindErik Schilling1-2/+9
It returns all monster classes in a id->monsterclass table.
2013-08-26[Abilities] Added abilities to monstersErik Schilling5-16/+95
Monsters can now either receive abilities at lifetime via scripts, or via the <ability> node in the monsters node.
2013-08-26[Abilities] Removed the old autoattack systemErik Schilling21-1367/+12
As a side effect i had to remove the monster attack AI for now. I will readd this as next thing.
2013-08-26[Abilities] Added a add_hit_taken bindErik Schilling4-30/+36
This allows to display hit messages in the client for abilities
2013-08-26[Abilities] Inform other players about ability usesErik Schilling4-4/+75
2013-08-26[Abilities] Added support for a global cooldownErik Schilling7-4/+81
Each ability can now define a cooldown that prevents the player from using other abilities for a while. The time of this cooldown can be set to any attribute. The modified value of the attribute is the value of the cooldown in game ticks. The cooldown will be automatically started if the ability has `autoconsume` set to true. Otherwise a script has to call entity:cooldown_ability(ability).
2013-08-26[Abilities] Added a autoconsume optionErik Schilling3-0/+14
You do not need to reset the mana in the scripts if you do not want to. We will need this for attacks later since those do not nessecary have a script.
2013-08-26[Abilities] Moved the ability code into a own componentErik Schilling7-246/+344
This later allows monsters and characters to use this component.
2013-08-26[Abilities] Made the rechargespeed depending on attributesErik Schilling4-29/+24
This allows a lot more flexibility and makes stuff like magical items a lot easier to implement. We will also use this for the attack system in the future. So a attack (abilitiy) would simply depend on some value like Agility (or a derived attribute from it). Which sets the recharge speed. The recharge speed is the modified value of the attribute per game tick.
2013-08-26[Abilities] Only send status for actually changed abilitiesErik Schilling2-15/+17
Previously *every* ability was spammed over the network regardless whether it was changed or not.
2013-08-26[Abilities] Added network message for removed abilityErik Schilling1-1/+3
This prevents really nasty code clientside
2013-08-26[Abilities] Renamed set to categoryErik Schilling5-29/+29
On the one hand setSetName and setName could sound misleading in the qt client patch i plan. On the otherhand i never really liked the name "set". I think category is more general and obvious.
2013-08-26[Abilities] Renamed specials to abilitiesErik Schilling10-424/+428
2013-07-28Allow -v for setting verbosityErik Schilling1-2/+2
I am really bad at spelling verbosity :->
2013-05-10Partial rewrite and improvements of Warp objectPrzemysław Grzywacz4-30/+180
2013-05-03Maps are now configured in settings.xml tooPrzemysław Grzywacz4-70/+82
2013-05-02Fixed a bunch of cppcheck warningsErik Schilling6-27/+19
2013-04-29Single xml solutionPrzemysław Grzywacz17-562/+770
Mana-mantis: #506.
2013-04-27Use nullptr instead of NULL everywhereErik Schilling11-20/+20
2013-04-25Fixed crash when checking whether a character is already onlineThorbjørn Lindeijer1-3/+2
Not every connected game client has a character in the world. The code was checking this, but since commit aa04597c5f8bb806996 the pointer was being used before being checked.
2013-04-25Simplified BeingComponent::updateDirectionThorbjørn Lindeijer2-74/+7
Same as in the client.
2013-04-15Moved functions to entity members where appropriateThorbjørn Lindeijer3-7/+21
Some functions were skipped for now because they may need a new name or change of behavior. Changes: chr_warp entity:warp chr_get_inventory entity:inventory chr_inv_change entity:inv_change chr_inv_count entity:inv_count chr_get_equipment entity:equipment chr_equip_slot entity:equip_slot chr_equip_item entity:equip_item chr_unequip_slot entity:unequip_slot chr_unequip_item entity:unequip_item chr_get_level entity:level chr_get_exp entity:xp chr_give_exp entity:give_xp chr_get_rights entity:rights chr_set_hair_style entity:set_hair_style chr_get_hair_style entity:hair_style chr_set_hair_color entity:set_hair_color chr_get_hair_color entity:hair_color chr_get_kill_count entity:kill_count chr_give_special entity:give_special chr_has_special entity:has_special chr_take_special entity:take_special chr_set_special_recharge_speed entity:set_special_recharge_speed chr_get_special_recharge_speed entity:special_recharge_speed chr_set_special_mana entity:set_special_mana chr_get_special_mana entity:special_mana chr_kick entity:kick exp_for_level xp_for_level monster_get_id entity:monster_id monster_change_anger entity:change_anger monster_drop_anger entity:drop_anger monster_get_angerlist entity:angerlist being_apply_status entity:apply_status being_remove_status entity:remove_status being_has_status entity:has_status being_set_status_time entity:set_status_time being_get_status_time entity:status_time being_get_gender entity:gender being_set_gender entity:set_gender being_type entity:type being_walk entity:walk being_say entity:say being_damage entity:damage being_heal entity:heal being_get_name entity:name being_get_action entity:action being_set_action entity:set_action being_get_direction entity:direction being_set_direction entity:set_direction being_apply_attribute_modifier entity:apply_attribute_modifier being_remove_attribute_modifier entity:remove_attribute_modifier being_set_base_attribute entity:set_base_attribute being_get_modified_attribute entity:modified_attribute being_get_base_attribute entity:base_attribute being_set_walkmask entity:set_walkmask being_get_walkmask entity:walkmask being_get_mapid entity:mapid chat_message entity:message being_register entity:register chr_shake_screen entity:shake_screen chr_create_text_particle entity:show_text_particle - entity:position posX entity:x posY entity:y monster_get_name monsterclass:name item_get_name itemclass:name
2013-04-14Removed NPC and character parameters from NPC functionsThorbjørn Lindeijer1-0/+2
These functions can only be used in the context of a character talking to an NPC, so these parameters can be deduced from that context rather than passing them explicitly all the time. Simplifies NPC scripting.
2013-04-14Use a full user data for Entity referencesThorbjørn Lindeijer2-6/+17
Only moved a single script function to a member for now, will do others in a separate commit.
2013-04-13Don't try to kill the connection of a deleted characterThorbjørn Lindeijer1-1/+1
The point is to do this on the new character and to allow the client to continue playing with the existing character instance (when it represents the same character in the DB). Somehow was changed in commit aa04597c5f8.
2013-04-12Fixed uninitialised variable warning in valgrindErik Schilling1-0/+1
2013-04-12Removed static member definitions that are no longer neededThorbjørn Lindeijer6-11/+1
The requirement for having these definitions was relaxed in the C++11 standard. In short, they are not needed anymore for static const integral types. Details: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#454
2013-04-12Removed CharacterData member from CharacterComponentThorbjørn Lindeijer3-9/+3
It is only needed temporarily while serializing and deserializing.
2013-04-12Moved Actor into an ComponentErik Schilling32-369/+383
This was the final step to remove the hierachy with Entity on the top.
2013-04-11Converted Being into a ComponentErik Schilling39-683/+841
I did not really care too much about staying consistent with the use of static_casts to Actors since they are only temporary anyway until Actor is a component too.
2013-04-11Converted the Character class into a componentErik Schilling32-644/+1032
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-04-10Fixed @kill killing yourselfErik Schilling1-1/+1
2013-04-07Fixed undefined #defines in mingw and c++0xErik Schilling1-0/+3
It looks like mingw does not define all the stuff in c++0x it does without.
2013-04-03Moved the Monster class to a ComponentErik Schilling11-102/+135
Things done: - Allowed to create new Attributes outside of the protected scope of Being - Moved Monster to MonsterComponent - Some minor cleanup in the Attribute setting code of monsters
2013-04-02Fixed multiple warnings and errors that blocked c++0xErik Schilling14-50/+69
This allows the server to compile with c++0x (and enables it). This also includes some coding style / readabillity fixes.
2013-04-02Removed old commandhandler approachErik Schilling1-439/+0
It was forgotten to remove when the new approach was added
2013-04-02Moved fighting code into a componentErik Schilling20-372/+640
All damage dealing is now handeled via CombatComponent. Monsters use a derived MonsterCombatComponent since they can have a damage mutation and have a seperate script callback. The wirering with Being is still not optional since most of the stuff does not exist as components. Things done: - Seperated the fighting code from Being and only let Characters and Monsters add the Component (less overhead for npcs) - Added a getter for Attribute values to prevent searching it all the time in non Being members - Fixed the type if the damage mutation to double (no idea why it was int) I did not want to copy it over incorrectly - Removed the addAttack/removeAttack overrides in Character and made the knuckleAttack being added based on newly added signals Future TODOS: - Remove depedency on Being as soon all needed dependencies are available as components of Entity - Move the monster script callback into the general combatcomponent and make it usuable for characters too
2013-03-25Moved documentation out of class definitionThorbjørn Lindeijer2-68/+97
Inline documentation is in general needlessly verbose and only makes it harder to read the actual class API. This change moves this kind of documentation to the function implementation for the 'Entity' class. For inline methods, the implementation is moved outside of the class using the 'inline' keyword. This provides a good place to put the documentation, but it also further cleans up the class definition. The class definition now gives a much better overview over its API. And if needed, details can be looked up at the function implementations. Reviewed-by: Erik Schilling
2013-03-25Changed NPC to an NpcComponent added to a BeingThorbjørn Lindeijer11-138/+135