summaryrefslogtreecommitdiff
path: root/src/game-server/state.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-27Use nullptr instead of NULL everywhereErik Schilling1-1/+1
2013-04-15Moved functions to entity members where appropriateThorbjørn Lindeijer1-1/+1
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-12Moved Actor into an ComponentErik Schilling1-5/+4
This was the final step to remove the hierachy with Entity on the top.
2013-04-11Converted Being into a ComponentErik Schilling1-3/+2
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 Schilling1-3/+3
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-04-02Fixed multiple warnings and errors that blocked c++0xErik Schilling1-2/+2
This allows the server to compile with c++0x (and enables it). This also includes some coding style / readabillity fixes.
2013-03-25Changed Item to a component of ActorThorbjørn Lindeijer1-11/+13
Items also have positions, so the ItemComponent only makes sense as part of an Actor. Later on it will probably be part of an entity that also has an ActorComponent. Since it was annoying to update all the places where items were created, I've introduced a function for this. The component types are now prefixed with "CT_" because I wanted to introduce an 'Item' namespace which would otherwise be conflicting. The component types enum isn't used much in the code so it can look a bit ugly. Reviewed-by: Yohann Ferreira
2012-04-14Introduced a Timeout class for counting down without countingThorbjørn Lindeijer1-1/+3
The timeout remembers a reference point of time against which it can check how much time is remaining. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-10/+10
In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira
2012-03-11Added callbacks for map/worldvar changesErik Schilling1-0/+6
Reviewed-by: bjorn.
2011-03-09Renamed GameState::insertSafe() to inserOrDelete.Yohann Ferreira1-1/+1
This reflects much more what the function does IMHO. Trivial.
2011-03-04Implemented persistent world and map variablesPhilipp Sehmisch1-0/+18
The gameserver now receive a copy of all world state variables when they are accepted by the accountserver and receive a copy of all map state variables of a map when they register it successfully. Implemented LUA script bindings for getting and setting these variables. When such a variable is set, the accountserver is notified about this change. Changes to world state variables are then propagated to all gameservers by the accountserver. Be aware that when a gameserver is updating a map, there is no check if it is actually responsible for said map. But I consider this not a security flaw, because authenticated game servers are considered to be trustworthy in a lot of other situations, too. Also renamed "quest" to "character variable" in the sourcecode. Reviewed-by: Bertram
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+108
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.