summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2012-09-02Dropped .gz suffix for mapsErik Schilling1-2/+0
Reviewed-by: bjorn.
2012-08-10Fixed issues with removing attribute modifiersThorbjørn Lindeijer1-4/+5
* AttributeModifiersEffect::remove was not calling updateMod with the 'value' parameter, causing it to have no effect at all for Stackable modifiers. * The cached value of the changed modifier effect was not being recalculated when removing modifiers, because it started one layer too high (there's an inconsistency here: AttributeModifiersEffect::add updates this cached value while AttributeModifiersEffect::remove doesn't). Reviewed-by: Erik Schilling
2012-08-06Allow monster name in <drop> tagErik Schilling1-3/+17
Reviewed-by: Stefan Beller.
2012-08-05Fixed the atinit functionErik Schilling1-0/+2
Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt. Reviewed-by: bjorn.
2012-08-05Fixed recalculation of base attributesErik Schilling1-7/+7
We do not need to calculate derived attributes of the derived attributes but the base of the derived attribute. Reviewed-by: bjorn.
2012-08-05Remove resetEffects; move it to destructor in ItemClass.Stefan Beller2-18/+20
Reviewed-by: bjorn
2012-08-05Fixup segfault at shutdown of gameserver.Stefan Beller1-5/+1
The objects of ItemEffectInfo class, which are hold in mDispells are definitly in mEffects as well, because they are added in in addEffect as the same pointer. Reviewed-by: Erik Schilling
2012-08-05Correct updating the old position of beings.Stefan Beller1-4/+4
Reviewed-by: bjorn acked-by: Ablu
2012-08-04Prevent characters from using specials after deathErik Schilling1-0/+6
Reviewed-by: Stefan Beller.
2012-08-03Fixed dead characters being able to use items.Erik Schilling1-0/+4
Change is tested. Mantis: #492. Reviewed-by: Stefan Beller.
2012-08-03Made the character not colliding with monsters.Erik Schilling1-1/+1
Prevents clientside desyncs. Reviewed-by: Stefan Beller.
2012-08-02Correct further int lengthes.Stefan Beller1-2/+2
Reviewed-by: Ablu.
2012-07-31Gameserver raise attribute: correct integer size.Stefan Beller1-1/+1
Acked-by: bjorn
2012-07-31Make Attributes modifiable by client again.Stefan Beller1-1/+2
Reviewed-by: bjorn
2012-07-31Fix Inventory::getNewEquipItemInstance to yield really unique ids.Stefan Beller1-9/+8
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Reviewed-by: Erik Schilling
2012-07-17Added lua binds for issuing request of quest variable + bind for trying to ↵Erik Schilling3-11/+67
read them The difference to the old chr_get_quest bind is that this allows querying quest vars from non npc functions as well. Change is tested. Reviewed-by: bjorn.
2012-07-17Added script binds to get full monster anger list + drop anger of monstersErik Schilling1-0/+3
Reviewed-by: bjorn.
2012-07-11Made sure the map is set for trigger scriptsErik Schilling1-0/+1
Also unsetted maps after execution of scripts to make finding this mistakes easier. Reviewed-by: bjorn.
2012-07-08Added bind for setting login callbackErik Schilling3-0/+14
Reviewed-by: bjorn.
2012-06-22Collisiondetection: Removing commented code.Stefan Beller1-118/+0
Reviewed-by: Ablu
2012-05-25Fixed handling of skillsErik Schilling2-9/+1
- Removed possibility of skills getting mixed with attributes - Made the server sending the level of the current skill on exp change (currently the client could calculate it itself, but it allows more flexibillity in future this way) - Fixed reading of skills out of the database (for some reason the status effects were added as skills) ** Needs clientside patch as well (coming soon) ** Reviewed-by: Bertram.
2012-05-06Fixed type of returned value from MapReader::readMapThorbjørn Lindeijer1-1/+1
GCC 4.7 warns about this, yay.
2012-05-05Added debugging mode to the protocolThorbjørn Lindeijer2-0/+5
Allows inspection of message data. It is off by default since it consumes additional bandwidth, but it can be turned on using the net_debugMode option in manaserv.xml. Currently the option only affects outgoing data for each host individually. In particular, enabling this debug mode for the server does not automatically make the client annotate its messages. Reviewed-by: Erik Schilling
2012-04-18Removed not needed trigger for specialupdate when INT attribute changed.Erik Schilling1-4/+0
I removed this dependency a while ago. But forgot to remove this code. Reviewed-by: bjorn.
2012-04-14Fixed compiler warning about non-virtual destructorThorbjørn Lindeijer1-0/+2
None of the subclasses actually define a destructor that does anything, but this may change in the future. In any case it's good to get rid of the warning. Reviewed-by: Erik Schilling
2012-04-14Introduced a Timeout class for counting down without countingThorbjørn Lindeijer10-142/+219
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-12Fixed issues with server behind routerErik Schilling1-1/+3
Tested-by: jurkan. Reviewed-by: Bertram.
2012-04-04Adding monster::on_damage callbackStefan Beller2-0/+24
Reviewed-by: bjorn
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer19-90/+88
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-04-04Enhanced special supportErik Schilling8-101/+713
- Made the current charge being saved. - Added script binds: - chr_set_special_recharge_speed - chr_get_special_recharge_speed - chr_set_special_mana - chr_get_special_mana - get_special_info - Added special info lua class. Functions: - name - needed_mana - rechargeable - on_use - on_recharged - category Further the engine no longer sets charge to 0 after using of specials this allows more flexbilillity (like failing specials). Changes on the xml database: - recharge renamed to rechargeable (needed by client and server) - needed - the needed mana to trigger a special (server only) - rechargespeed - the defailt recharge speed in mana per tick (server only) - target - the type of target (either being or point) (server and client) I also made the lua engine pushing nil instead of a 0 light userdata when the pointer was 0. Database update needed. Change is tested. Mana-Mantis: #167, #156 Reviewed-by: bjorn.
2012-03-26Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer7-114/+104
The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
2012-03-21Fixed restoring of persistent floor itemsThorbjørn Lindeijer1-1/+1
Only 1/4th of the floor items were being restored after a reboot of the game server. Reviewed-by: jurkan
2012-03-20Fixed finding characters by nameThorbjørn Lindeijer1-1/+1
This was broken in ba66fbeda8ef9afb6c33eba66d109bac85ebf628 where we forgot to make sure to invert the condition when moving it into the function. Reviewed-by: Erik Schilling
2012-03-17Made skill related function capable of taking the skill name as parameterErik Schilling2-4/+16
Reviewed-by: bjorn.
2012-03-17Added map update function, moved schedules there to keep map contextErik Schilling3-29/+35
Reviewed-by: bjorn.
2012-03-16Fixed remaining compiler warningsThorbjørn Lindeijer5-10/+10
These were unused parameters and one return type with an ignored 'const' qualifier. Reviewed-by: Yohann Ferreira
2012-03-16Fixed Inventory::unequipItem functionThorbjørn Lindeijer1-1/+1
Due to a misplaced semicolon, it always returned false after the first instance. This function is only used by the script function chr_unequip_item. Reviewed-by: Yohann Ferreira
2012-03-14Added get_character_by_name lua bindErik Schilling4-48/+25
Step to be able to handle chatcommands by scripts. Reviewed-by: bjorn.
2012-03-13Added script bind to set walkmask for beingsErik Schilling8-28/+21
TODO: Inform client about this change. Reviewed-by: bjorn.
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer5-30/+100
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-03-11Added callbacks for map/worldvar changesErik Schilling4-0/+77
Reviewed-by: bjorn.
2012-03-10Moved the managing of NPC script coroutines into C++Thorbjørn Lindeijer8-68/+102
Rather than wrapping NPC functions up in coroutines in the Lua side, they are now managed on the C++ side as "script threads", which are essentially the same thing. The main purpose is that the server can now know whether any of these long running script interactions are still active, which will probably be useful when adding the ability to reload scripts. Reviewed-by: Erik Schilling
2012-03-10Removed space before ;Erik Schilling1-1/+1
Reviewed-by: PjotrOrial.
2012-03-05Added @effect commandErik Schilling1-0/+48
Usage: @effect <id> @effect <id> <char> @effect <id> <x> <y> Reviewed-by: Bertram.
2012-03-05Added lua function for getting pvp status of mapErik Schilling1-2/+2
mana.map_get_pvp() now returns one of the constants in libmana-constants.lua Reviewed-by: Bertram.
2012-03-05Added possibility to make a being attack an other beingErik Schilling3-28/+28
This allows the script to let the character perform a scripted attack but the character still gets xp and killed monsters give drops. You can now call: mana.being_damage(target, dmg, dmg_delta, accurancy, type, element, source, skill) While on it I also added checks to the being_damage function. Reviewed-by: bjorn, Bertram.
2012-03-03Removed the last direct call to global script functionThorbjørn Lindeijer2-7/+15
The ScriptAction of the TriggerArea (which can be created by mana.trigger_create) was still using a named global function for its callback. Now it also uses a reference to a script function. Since it was the last occurrence of a call to a global script function, I've also removed the Script::prepare(std::string) overload. Reviewed-by: Erik Schilling Mantis-issue: 299
2012-03-03Use callbacks for items, monsters and status effectsThorbjørn Lindeijer10-90/+139
Previously, global function names were defined in the respective XML definitions of items, monsters and status effects. This was reasonable when they all had the same state, but now they're sharing the single global Lua state. Now the Lua API provides access to the ItemClass, MonsterClass and StatusEffect instances, on which callbacks for both standard and custom events can be explicitly set. Reviewed-by: Erik Schilling
2012-03-03Added further missing callbacksErik Schilling4-14/+68
Reviewed-by: bjorn.
2012-03-02Converted functions called by LuaScript to callbacksThorbjørn Lindeijer4-9/+11
This includes the quest reply, post reply, death notification and remove notification. Also, Script::Ref was changed from a typedef to a small class, automating initialization and making the check for validness clearer. Reviewed-by: Erik Schilling