Implement consent for group/raid/guild and add Auto Consent support

Refactors consent to be more live accurate

Message sent to owner and receiver for each zone a corpse is in
Corpses now store consent list instead of clients holding corpse list
Consent throttling added
Message strings and colors updated
Removed reporting invalid consent targets
This commit is contained in:
hg
2020-01-26 20:53:59 -05:00
parent c82d08cf11
commit 63b8df72b2
10 changed files with 222 additions and 176 deletions
+9
View File
@@ -74,6 +74,11 @@ class Corpse : public Mob {
uint32 GetDecayTime() { if (!corpse_decay_timer.Enabled()) return 0xFFFFFFFF; else return corpse_decay_timer.GetRemainingTime(); }
uint32 GetRezTime() { if (!corpse_rez_timer.Enabled()) return 0; else return corpse_rez_timer.GetRemainingTime(); }
void SetDecayTimer(uint32 decay_time);
void SetConsentGroupID(uint32 id) { if (IsPlayerCorpse()) { consent_group_id = id; } }
void SetConsentRaidID(uint32 id) { if (IsPlayerCorpse()) { consent_raid_id = id; } }
void SetConsentGuildID(uint32 id) { if (IsPlayerCorpse()) { consent_guild_id = id; } }
void AddConsentName(const char* name);
void RemoveConsentName(const char* name);
void Delete();
void Bury();
@@ -142,6 +147,9 @@ private:
int32 player_kill_item; /* Determines if Player Kill Item */
uint32 corpse_db_id; /* Corpse Database ID (Player Corpse) */
uint32 char_id; /* Character ID */
uint32 consent_group_id = 0; /* consented group id */
uint32 consent_raid_id = 0; /* consented raid id */
uint32 consent_guild_id = 0; /* consented guild id */
ItemList itemlist; /* Internal Item list used for corpses */
uint32 copper;
uint32 silver;
@@ -160,6 +168,7 @@ private:
Timer corpse_graveyard_timer;
Timer loot_cooldown_timer; /* Delay between loot actions on the corpse entity */
EQEmu::TintProfile item_tint;
std::vector<std::string> consent_names;
LootRequestType loot_request_type;
};