1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 08:45:32 +00:00
openmw-tes3mp/apps/openmw/mwmp/RecordHelper.hpp

101 lines
4.2 KiB
C++
Raw Normal View History

#ifndef OPENMW_RECORDHELPER_HPP
#define OPENMW_RECORDHELPER_HPP
[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 07:56:26 +00:00
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
#include <components/esm/loadcrea.hpp>
#include <components/esm/loadnpc.hpp>
namespace RecordHelper
{
[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 07:56:26 +00:00
bool doesClassRecordExist(const std::string& id);
bool doesRaceRecordExist(const std::string& id);
bool doesCreatureRecordExist(const std::string& id);
bool doesNpcRecordExist(const std::string& id);
bool doesEnchantmentRecordExist(const std::string& id);
bool doesPotionRecordExist(const std::string& id);
bool doesSpellRecordExist(const std::string& id);
bool doesArmorRecordExist(const std::string& id);
bool doesBookRecordExist(const std::string& id);
bool doesClothingRecordExist(const std::string& id);
bool doesMiscellaneousRecordExist(const std::string& id);
bool doesWeaponRecordExist(const std::string& id);
bool doesContainerRecordExist(const std::string& id);
bool doesDoorRecordExist(const std::string& id);
bool doesActivatorRecordExist(const std::string& id);
bool doesStaticRecordExist(const std::string& id);
bool doesIngredientRecordExist(const std::string& id);
bool doesApparatusRecordExist(const std::string& id);
bool doesLockpickRecordExist(const std::string& id);
bool doesProbeRecordExist(const std::string& id);
bool doesRepairRecordExist(const std::string& id);
bool doesLightRecordExist(const std::string& id);
bool doesCellRecordExist(const std::string& id);
[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 07:56:26 +00:00
std::string createCreatureRecord(const ESM::Creature& record);
std::string createNpcRecord(const ESM::NPC& record);
void overrideCreatureRecord(const mwmp::CreatureRecord& record);
void overrideNpcRecord(const mwmp::NpcRecord& record);
void overrideEnchantmentRecord(const mwmp::EnchantmentRecord& record);
void overridePotionRecord(const mwmp::PotionRecord& record);
void overrideSpellRecord(const mwmp::SpellRecord& record);
void overrideArmorRecord(const mwmp::ArmorRecord& record);
void overrideBookRecord(const mwmp::BookRecord& record);
void overrideClothingRecord(const mwmp::ClothingRecord& record);
void overrideMiscellaneousRecord(const mwmp::MiscellaneousRecord& record);
void overrideWeaponRecord(const mwmp::WeaponRecord& record);
void overrideContainerRecord(const mwmp::ContainerRecord& record);
void overrideDoorRecord(const mwmp::DoorRecord& record);
void overrideActivatorRecord(const mwmp::ActivatorRecord& record);
void overrideStaticRecord(const mwmp::StaticRecord& record);
void overrideIngredientRecord(const mwmp::IngredientRecord& record);
void overrideApparatusRecord(const mwmp::ApparatusRecord& record);
void overrideLockpickRecord(const mwmp::LockpickRecord& record);
void overrideProbeRecord(const mwmp::ProbeRecord& record);
void overrideRepairRecord(const mwmp::RepairRecord& record);
void overrideLightRecord(const mwmp::LightRecord& record);
void overrideCellRecord(const mwmp::CellRecord& record);
[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 07:56:26 +00:00
void overrideCreatureRecord(const ESM::Creature& record);
void overrideNpcRecord(const ESM::NPC& record);
[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 07:56:26 +00:00
void overrideEnchantmentRecord(const ESM::Enchantment& record);
void overridePotionRecord(const ESM::Potion& record);
void overrideSpellRecord(const ESM::Spell& record);
[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 07:56:26 +00:00
void overrideArmorRecord(const ESM::Armor& record);
void overrideBookRecord(const ESM::Book& record);
void overrideClothingRecord(const ESM::Clothing& record);
void overrideMiscellaneousRecord(const ESM::Miscellaneous& record);
void overrideWeaponRecord(const ESM::Weapon& record);
void overrideContainerRecord(const ESM::Container& record);
void overrideDoorRecord(const ESM::Door& record);
void overrideActivatorRecord(const ESM::Activator& record);
void overrideStaticRecord(const ESM::Static& record);
void overrideIngredientRecord(const ESM::Ingredient& record);
void overrideApparatusRecord(const ESM::Apparatus& record);
void overrideLockpickRecord(const ESM::Lockpick& record);
void overrideProbeRecord(const ESM::Probe& record);
void overrideRepairRecord(const ESM::Repair& record);
void overrideLightRecord(const ESM::Light& record);
void overrideCellRecord(const ESM::Cell& record);
}
#endif //OPENMW_RECORDHELPER_HPP