1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-25 18:53:50 +00:00
openmw-tes3mp/apps/openmw-mp/Script/Functions
David Cernat b57807407a [General] Implement RecordDynamic packet, part 1
Spell, potion, enchantment, creature, NPC, armor, book, clothing, miscellaneous and weapon record data can now be sent in a RecordDynamic packet. Additionally, the packets include data related to associated magical effects (for spells, potions and enchantments), data related to default inventory contents (for creatures and NPCs) and data related to body parts affected (for armor and clothing).

The server now has associated script functions for setting most of the details of the above, with the main exception being individual creature and NPC stats.

Records can either be created entirely from scratch or can use an existing record (set via the baseId variable) as a starting point for their values. In the latter case, only the values that are specifically set override the starting values. Creature and NPC records also have an inventoryBaseId that can be used on top of the baseId to base their inventories on another existing record.

The client's RecordHelper class has been heavily expanded to allow for the above mentioned functionality.

When players create spells, potions and enchantments as part of regular gameplay, they send RecordDynamic packets that provide the server with the complete details of the records that should be created. When they create enchantments, they also provide the server with armor, book, clothing and weapon records corresponding to the items they've enchanted.

This functionality added by this packet was originally supposed to be exclusive to the rewrite, but I've gone ahead and tried to provide it for the pre-rewrite in a way that can mostly be reused for the rewrite.
2018-07-30 10:56:26 +03:00
..
Actors.cpp [Server] Rename variable i into index in ActorFunctions 2018-07-24 21:29:40 +03:00
Actors.hpp [General] Implement RecordDynamic packet, part 1 2018-07-30 10:56:26 +03:00
Books.cpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Books.hpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Cells.cpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Cells.hpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
CharClass.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
CharClass.hpp [Server] Document script functions, part 3 2017-07-25 18:07:09 +03:00
Chat.cpp [Server] Turn sendToAttachedPlayer into skipAttachedPlayer 2018-07-07 20:08:59 +03:00
Chat.hpp [Server] Bring comments up-to-date for packet-sending script functions 2018-07-07 20:16:36 +03:00
Dialogue.cpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Dialogue.hpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Factions.cpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Factions.hpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
GUI.cpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
GUI.hpp [Server] Rename variable i into index in script function arguments 2018-07-24 20:14:51 +03:00
Items.cpp [General] Sync soul refIds for items and add related script functions 2018-07-26 22:37:04 +03:00
Items.hpp [General] Sync soul refIds for items and add related script functions 2018-07-26 22:37:04 +03:00
Mechanics.cpp [General] Rename all instances of refNumIndex into refNum 2018-07-13 04:12:03 +03:00
Mechanics.hpp [General] Rename all instances of refNumIndex into refNum 2018-07-13 04:12:03 +03:00
Miscellaneous.cpp [Server] Add DoesFileExist() script function 2018-05-04 03:09:54 +03:00
Miscellaneous.hpp [Server] Add DoesFileExist() script function 2018-05-04 03:09:54 +03:00
Objects.cpp [General] Sync soul refIds for items and add related script functions 2018-07-26 22:37:04 +03:00
Objects.hpp [General] Sync soul refIds for items and add related script functions 2018-07-26 22:37:04 +03:00
Positions.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Positions.hpp [General] Implement PlayerMomentum packet & associated script functions 2018-04-29 23:47:17 +03:00
Quests.cpp [General] Add optional timestamps to journal entries in PlayerJournal 2018-07-26 04:36:12 +03:00
Quests.hpp [General] Add optional timestamps to journal entries in PlayerJournal 2018-07-26 04:36:12 +03:00
RecordsDynamic.cpp [General] Implement RecordDynamic packet, part 1 2018-07-30 10:56:26 +03:00
RecordsDynamic.hpp [General] Implement RecordDynamic packet, part 1 2018-07-30 10:56:26 +03:00
Server.cpp [Server] Move server administration functions to ServerFunctions class 2018-07-07 19:40:22 +03:00
Server.hpp [Server] Move server administration functions to ServerFunctions class 2018-07-07 19:40:22 +03:00
Settings.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Settings.hpp [General] Add SetResetStats server script function 2018-04-09 19:24:24 +03:00
Shapeshift.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Shapeshift.hpp [Server] Create ShapeshiftFunctions and move relevant functions there 2018-04-18 10:45:39 +03:00
Spells.cpp [General] Remove custom data from PlayerSpellbook packet 2018-07-24 20:58:55 +03:00
Spells.hpp [General] Remove custom data from PlayerSpellbook packet 2018-07-24 20:58:55 +03:00
Stats.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Stats.hpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
Timer.cpp [Server] Simplify native CallPublic & CreateTimerEx 2017-06-30 17:59:50 +08:00
Worldstate.cpp [Server] Turn readWorldstate and writeWorldstate into static variables 2018-07-26 20:03:42 +03:00
Worldstate.hpp [Server] Turn readWorldstate and writeWorldstate into static variables 2018-07-26 20:03:42 +03:00