1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:19:54 +00:00
Commit graph

19 commits

Author SHA1 Message Date
David Cernat
ae5200cbb2 [General] Implement light records for RecordDynamic packets 2019-08-14 21:10:53 +03:00
David Cernat
1d09763bad [Client] Allow blanking out the enchantment IDs of records using a base 2019-08-08 08:05:10 +03:00
David Cernat
14af0be657 [General] Include AI alarm & flee for creatures/NPCs in RecordDynamic 2019-08-07 11:21:22 +03:00
David Cernat
ef432d1419 [General] Include AI services for creatures/NPCs in RecordDynamic 2019-08-07 10:44:07 +03:00
David Cernat
18e2a14645 [General] Implement tool-related records for RecordDynamic packets 2019-08-04 17:53:18 +03:00
David Cernat
4100d93dea [General] Implement ingredient records for RecordDynamic packets 2019-08-03 06:19:22 +03:00
David Cernat
247d2fad30 [General] Implement activator & static records for RecordDynamic packets 2019-08-01 09:48:57 +03:00
David Cernat
e9336e53fc [General] Implement container and door records for RecordDynamic packets 2019-07-27 03:45:50 +03:00
David Cernat
1df1515c7e [Client] Add logging for invalid enchantmentIds in RecordHelper 2019-01-23 01:04:59 +02:00
David Cernat
999ce857c7 [Client] Add logging for records ignored due to their invalid baseIds 2019-01-23 00:48:06 +02:00
David Cernat
db7e09f441 [Client] Use more consistent logging when reading dynamic record packets 2019-01-23 00:38:05 +02:00
David Cernat
0fa116b47d [Client] Remove useless lines in RecordHelper 2019-01-23 00:20:51 +02:00
David Cernat
aed4ca2fd2 [Client] Allow use of baseId for more record types
Additionally, don't allow new enchantment records to be created if they have no effects, to avoid a crash.
2018-08-20 15:24:20 +03:00
David Cernat
888e1dfff8 [General] Allow setting of AI fight & dynamic stats in record packets
Additionally, allow the setting of the Autocalc flag for an NPC record based on an existing record.
2018-08-05 11:00:25 +03:00
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
David Cernat
25fcd09780 [Client] Add doesNpcExist() method to RecordHelper 2018-07-26 23:57:42 +03:00
David Cernat
60bc7447d9 [Client] Rework RecordHelper and add methods for other record types
The usage of const_cast has been replaced with usage of MWWorld::getModifiableStore() and ESMStore::overrideRecord()

Methods whose names started with "update" now start with "override", for consistency with ESMStore's overrideRecord()

New methods have been added for "overriding" enchantment, potion and spell records, which actually leads to them being created with their already set refIds if they haven't been created yet, as per the description of ESMStore::overrideRecord(): "Insert a record with set ID, and allow it to override a pre-existing static record."

Usage of RecordHelper methods has been updated in DedicatedPlayer.
2018-07-26 21:01:59 +03:00
David Cernat
70f9cb535e [General] Use RecordHelper methods to create and update DedicatedPlayers 2018-04-13 08:37:06 +03:00
David Cernat
9d27f5f154 [Client] Create RecordHelper class with initial NPC and creature methods 2018-04-12 14:18:19 +03:00