Commit Graph
15 Commits
Author SHA1 Message Date
David Cernat afa2d7d134 [General] Update usage of inventory script functions 2018-10-01 18:51:41 +03:00
David Cernat a3f390515f [General] Add and use AddPlayerInventoryItemChange() in PacketBuilder 2018-09-24 04:56:35 +03:00
David Cernat 9cd5dc8556 [General] Implement dynamic records, part 2
Records are now split into 2 categories: permanent records and generated records.

Permanent records are kept forever once created and are sent to all players when they join the server.

Generated records are linked to players, cells or other records, are deleted once those links disappear, and are only sent to players who encounter them. For instance, if a player creates hundreds of potions in a house and then drops the potions there, those potion records will only be sent to players who enter that house. If the potions are drunk and there are no longer any instances of them, their associated records are deleted.

By default, permanent records are created by using the /createrecord command after specifically setting an ID for the record about to be created.

Generated records are created through regular gameplay or by using the /createrecord command without specifying an ID for the record.
2018-08-30 03:32:58 +03:00
David Cernat 5f755c5db6 [General] Use new packetBuilder methods to send other cell object data 2018-08-25 11:36:22 +03:00
David Cernat c64143d00d [General] Use new packetBuilder.AddObjectPlace() method for cell placing 2018-08-25 10:44:45 +03:00
David Cernat 33abae728d [General] Use new packetBuilder.AddObjectSpawn() method for cell spawns 2018-08-25 10:34:51 +03:00
David Cernat b8eb63a5cb [PacketBuilder] Fix functions that were incorrectly copy-pasted 2018-08-13 11:33:28 +03:00
David Cernat c85f6dbb97 [PacketBuilder] Add inventory items to packets for creature/NPC records 2018-08-13 10:15:35 +03:00
David Cernat 4aa983da95 [General] Move code for adding records to packets to PacketBuilder 2018-08-13 05:29:29 +03:00
David Cernat 13acf0e097 [PacketBuilder] Rename AddAIActorToPacket into AddAIActor 2018-08-12 06:12:37 +03:00
David Cernat a0ae5016f6 [General] Rework arguments for AI data & packet methods 2018-08-12 05:43:41 +03:00
David Cernat c3407bac45 [General] Rename refIndex into uniqueIndex
This helps improve clarity by preventing confusion between the refNum and the combination of a refNum and an mpNum that is now called the uniqueIndex.
2018-07-13 04:31:38 +03:00
David Cernat 482c66338b [General] Update script functions to use RefNum instead of RefNumIndex
Although the old functions still work, the ones without the word "Index" in them help provide more clarity through symmetry with the MpNum functions.
2018-07-13 04:15:58 +03:00
David Cernat 9316146df0 [PacketBuilder] Make sure targetRefIndex in AddAiActorToPacket is valid 2018-07-12 02:40:22 +03:00
David Cernat 969e3d3cec [General] Create dataTableBuilder & packetBuilder, initially used for AI 2018-07-11 20:15:34 +03:00