summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2012-07-31Fixed reading skill from XML attack nodesThorbjørn Lindeijer1-0/+1
It was forgetting to actually set the Damage::skill member.
2012-07-31Correct further int lengthes.Stefan Beller1-2/+2
2012-07-31Gameserver raise attribute: correct integer size.Stefan Beller1-1/+1
2012-07-31fixup modifiable attribute.Stefan Beller1-3/+2
2012-07-31Make Attributes modifiable by client again.Stefan Beller1-1/+3
2012-07-31[UGLY HACK] allows to prevent sending client information about inventory insertErik Schilling1-1/+7
2012-07-31Made sure in-inventory trigger is called at pickupErik Schilling1-0/+4
2012-07-31Fix Inventory::getNewEquipItemInstance to yield really unique ids.Stefan Beller1-9/+8
2012-07-28Made the character not colliding with monsters.Erik Schilling1-1/+1
Prevents clientside desyncs
2012-07-17Merge branch 'master' into lpc2012Erik Schilling4-11/+70
Conflicts: src/game-server/character.h
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-17Fixed resistance calculation not damaging the damage handlingErik Schilling1-1/+1
2012-07-13Fixed 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.
2012-07-11Fixed small bug in attack core. warmup and cooldown was mixedErik Schilling1-2/+4
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-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-07-08Added bind for setting login callbackErik Schilling3-0/+14
Reviewed-by: bjorn.
2012-07-07Added Vulnerabilities for monstersErik Schilling3-1/+28
You can now actually use the already used node in the monsters.xml Monsters can have different vulnerabillities against elements: <vulnerabillity element="earth" factor="2.0" /> This will double damage of the element earth to this monster.
2012-07-07Work on (Auto)Attack system.Erik Schilling13-461/+571
During the implementation bjorn and I agreed to limit the number of attacks that can be used in the same tick to one. This makes a lot of stuff easier and the client cannot display two frames at the same time Things done: - Implemented setting of attacks when equipping/unequipping items - Single place where the xml attack node is parsed - Finished attack logic - Unified the attack handling of monsters and characters - Added a global cooldown after attack use (not only for next use of same attack) - Removed the temponary attributes for the monster attack values - Priorities for all attacks - Rewrote the attack core: - Attacks now have this attributes: - warmup -> time a attack needs after starting it to actually deal the damage - cooldown -> time a attack needs after dealing damage before another attack can be used - reuse -> time before the same attack can be used again - If no attack is performed at the moment the following is done: - make a list with all ready attacks - check for attack that has the necessarily range and highest priority - start this attack (inform client about it) - when warmup is finished -> trigger damage - when cooldown is finished -> allow to use other (or the same if reusetimer allows) attacks TODO: - sync client with this to allow better timed animations
2012-07-07Rename AutoAttack to AttackErik Schilling8-47/+47
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