[Feature] Add Parcel Feature for RoF2 Clients (#4198)

* Add Parcel Feature

Add the parcel system for RoF2 client

* Fixed a duplicate define

* Reformat

reformating and review changes

* Further Formatting

* Memory Mgmt Updates

Refactored to using unique_ptr/make_unique/etc to avoid manual memory mgmt.

Other format changes

* Refactor db structure

Refactor for db structure of parcels to character_parcels
Removal of parcel_merchants
Addition of npc_types.is_parcel_merchant
Cleanup as a result

* Refactor to use item id 99990 for money transfers.  Removed the money string function as a result, though simplified the messaging related to money.  Other updates based on feedback.

* Move prune routine out of scheduler and into a world process.
Removed RuleI from #define

* Update

* Update database.cpp

* Update database_update_manifest.cpp

* Update main.cpp

* Update client_process.cpp

* Update parcels.cpp

* Remove parcel merchant content to optional sql instead of manifest.

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Mitch Freeman
2024-04-20 23:15:56 -03:00
committed by GitHub
parent 64fefaebe4
commit fcffc6b3d4
58 changed files with 2505 additions and 230 deletions
+15 -1
View File
@@ -184,7 +184,8 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
mob_close_scan_timer(6000),
position_update_timer(10000),
consent_throttle_timer(2000),
tmSitting(0)
tmSitting(0),
parcel_timer(RuleI(Parcel, ParcelDeliveryDelay))
{
for (auto client_filter = FilterNone; client_filter < _FilterCount; client_filter = eqFilterType(client_filter + 1)) {
SetFilter(client_filter, FilterShow);
@@ -375,6 +376,15 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
bot_owner_options[booBuffCounter] = false;
bot_owner_options[booMonkWuMessage] = false;
m_parcel_platinum = 0;
m_parcel_gold = 0;
m_parcel_silver = 0;
m_parcel_copper = 0;
m_parcel_count = 0;
m_parcel_enabled = true;
m_parcel_merchant_engaged = false;
m_parcels.clear();
SetBotPulling(false);
SetBotPrecombat(false);
@@ -383,6 +393,10 @@ Client::Client(EQStreamInterface *ieqs) : Mob(
}
Client::~Client() {
if (ClientVersion() == EQ::versions::ClientVersion::RoF2 && RuleB (Parcel, EnableParcelMerchants)) {
DoParcelCancel();
}
mMovementManager->RemoveClient(this);
DataBucket::DeleteCachedBuckets(DataBucketLoadType::Client, CharacterID());