Commit Graph

37 Commits (bd677726bf6f67d96348cb724f2cdca15928531d)

Author SHA1 Message Date
David Cernat bd677726bf [Server] Add StatsFunctions that get/set damage to attributes/skills 5 years ago
David Cernat c075496748 [General] Replace deathReason in death packets with a killer variable
Add serverside script functions for determining the killers of both players and actors.

Use unsigned ints for script functions returning an object or actor's refNumIndex or mpNum.

Remove updateDeadState() from LocalPlayer and make its code part of updateStatsDynamic() for simplicity.
6 years ago
David Cernat 78441c769a [General] Rework PlayerSkill packets so they are of minimal size
Previously, whenever a single skill value changed for a player, that player then sent a PlayerSkill packet with all values for all 27 skills, plus the player's progress towards the next level and the bonuses to each attribute on the next level up as the result of sklll increases thus far.

This commit makes PlayerSkill contain only the values of specific skills, moves the player's progress towards the next level to PlayerLevel packets, and moves the bonuses to each attribute on the next level up to PlayerAttribute packets.

Players now also send a PlayerSkill packet whenever their progress towards a new point in a skill changes. This was previously avoided so as to not have massive packet spam.

(cherry picked from commit ef79a98544)
6 years ago
David Cernat 28f1c1b0d3 [General] Rework CharGen slightly for clarity purposes
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.

(cherry picked from commit 926106cf8c)
6 years ago
David Cernat 311f770de7 [Server] Document script functions, part 4
Additionally, clean up some variable names.
6 years ago
David Cernat bdc9132e7c [General] Add SetResetStats server script function
Add reading and writing of resetStats variable to PlayerBaseInfo Packet

Fix typos in various server script function descriptions
6 years ago
David Cernat c8abd11f5d [General] Move creature disguises for players to PlayerShapeshift packet
Additionally, make associated variables clearer, and move associated server script functions next to other shapeshifting functions.
6 years ago
David Cernat e97c9f72a2 [General] Rework getting/clearing of skill modifiers as with attributes 7 years ago
David Cernat 2944be18ae [Server] Actually, turn SetAttributeModifier into ClearAttributeModifier
There's no way SetAttributeModifier() was going to make sense if, say, a player had drunk 3 different potions fortifying the same attribute and was wearing equipment fortifying it as well. How would one change the sum modifier of those while accounting for each specific effect's duration and magnitude?

The only workable solution is to allow the server to clear the modifier.
7 years ago
David Cernat e8d636ebc3 [Server] Rework Get/SetAttributeCurrent into Get/SetAttributeModifier
As seen here, attributes don't use the concept of current values, but rather of value modifiers and value damage:

https://github.com/OpenMW/openmw/blob/master/apps/openmw/mwmechanics/stat.cpp#L217
7 years ago
David Cernat 413893aa51 [General] Implement PlayerAnimPlay packet 7 years ago
David Cernat b3b73c5cd2 [General] Implement resurrection at nearest shrine or temple 7 years ago
David Cernat 4d81455020 [General] Rework and simplify death reasons so they work with NPCs 7 years ago
Koncord 6ddab0d323 [Server] Add and implement "look like creature" functions 7 years ago
David Cernat 9d7142f684 [Server] Clean up order for StatsFunctions 7 years ago
David Cernat 7b07d6651f [General] Add and use PlayerBounty packet and matching script functions 7 years ago
David Cernat 870886192b [General] Rename DYNAMICSTATS into STATS_DYNAMIC 7 years ago
David Cernat 1b714fbfa7 [Server] Make script functions more consistent 7 years ago
David Cernat 82dcec5ec5 [Server] Use consistent pattern for script function category names 7 years ago
David Cernat 46b41b605a Revert "Use lowerCamelCase in tes3mp server script function names, part 1"
This reverts commit 0e2b589cdb.
8 years ago
David Cernat 0e2b589cdb Use lowerCamelCase in tes3mp server script function names, part 1 8 years ago
David Cernat 4b96080521 Make GetItemSlot work and add SendEquipment in server item functions 8 years ago
David Cernat 977b277cdd Add missing entries for level progress functions 8 years ago
David Cernat a0e9a672a5 Split updateClassStats in 3 and add handling of level progress 8 years ago
David Cernat 56a2c70911 Use double instead of int for skill progress functions 8 years ago
David Cernat ae4950ce49 Add server stat functions for getting and setting skill progress 8 years ago
David Cernat 458bdf4dff Fix script functions for setting dynamic stats 8 years ago
David Cernat b6086ab015 Rename ID_GAME_DYNAMICSTATS_CURRENT into ID_GAME_DYNAMICSTATS 8 years ago
David Cernat 9fd5ae981e Add missing backslash 8 years ago
David Cernat ce4b326b02 Rename ID_GAME_UPDATE_BASESTATS into ID_GAME_DYNAMICSTATS_CURRENT 8 years ago
David Cernat 295f486a97 Using less confusing names for server stat functions, part 2 8 years ago
David Cernat 69030579c1 Using less confusing names for server stat functions 8 years ago
David Cernat 7ae9ea7465 Add server stat functions for getting attribute and skill counts 8 years ago
David Cernat 1ee2458f6e Add packet for player levels, part 2 8 years ago
David Cernat 046a1ea899 Add packet for player levels 8 years ago
David Cernat 970e9aff2f Remove old class methods and don't include class in ID_GAME_BASE_INFO 8 years ago
Koncord 1186d09ec0 ScriptFunctions.hpp size reduction 8 years ago