Commit Graph

22 Commits (ffi-server-rewrite)

Author SHA1 Message Date
Koncord e5e13b21ae [Client] Fix crash on drag&drop 6 years ago
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.
7 years ago
David Cernat 9497c7f6f2 [Client] Add back mistakenly removed setting of mpNums for spawns 7 years ago
David Cernat 7995466e3c [Client] Check validity of refIds in ObjectSpawn packets
This reverts c7bcf70c32 because it provides a better solution to the problem solved there, while solving another related problem as well.
7 years ago
David Cernat 8d286657d4 [Client] Update messages when unilaterally creating custom objects 7 years ago
David Cernat c7bcf70c32 [Client] Ignore ObjectSpawn packets trying to spawn non-actors 7 years ago
David Cernat d93b67ef21 [General] Sync soul refIds for items and add related script functions 7 years ago
David Cernat f13705e8be [Client] Improve debug for ObjectActivate and ConsoleCommand 7 years ago
David Cernat 6ebe09375f [General] Implement ObjectActivate packet & associated script functions 7 years ago
David Cernat 09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
7 years ago
David Cernat 3ed9d89280 [General] Use separate variables for video & music filenames in packets 7 years ago
David Cernat 691b332d03 [Client] Use MechanicsHelper::getTarget() for summoners in ObjectList 7 years ago
David Cernat c2411982d2 [Client] Log object refNumIndexes and mpNums in a consistent way 7 years ago
David Cernat 8a23a96da4 [Client] Update initialization of AiFollow packages in multiplayer code 7 years ago
Koncord c5c1a160b2 [Client] Comment out an unused variable 7 years ago
David Cernat bef53749ed [General] Replace BaseObject's hasMaster variable with isSummon
Additionally, add a GetObjectSummonState() script function to the server.
7 years ago
David Cernat 958b220835 [General] Send summon duration to server in ObjectSpawn packets 7 years ago
David Cernat fec500c4b0 [Client] Reduce container debug spam by requiring VERBOSE logging for it 7 years ago
David Cernat 914b79fcc9 [General] Make it possible to check which placed objects have containers 7 years ago
David Cernat 83014d6381 [Client] Set actors as the owners of their items when editing containers 7 years ago
David Cernat 8ea9485e6b [Client] Make container debug information more useful 7 years ago
David Cernat 78234f9071 [General] Rename Event into ObjectList & WorldObject into BaseObject 7 years ago