mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 02:31:03 +00:00
Make guild consent persistent for summoned corpses
Live drops group/raid consent but not guild when moving corpse to another zone Store guild consent id in db for character corpses and keep it updated
This commit is contained in:
+4
-3
@@ -73,7 +73,7 @@ void Corpse::SendLootReqErrorPacket(Client* client, LootResponse response) {
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std::string in_charname, const glm::vec4& position, std::string time_of_death, bool rezzed, bool was_at_graveyard) {
|
||||
Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std::string in_charname, const glm::vec4& position, std::string time_of_death, bool rezzed, bool was_at_graveyard, uint32 guild_consent_id) {
|
||||
uint32 item_count = database.GetCharacterCorpseItemCount(in_dbid);
|
||||
auto buffer =
|
||||
new char[sizeof(PlayerCorpse_Struct) + (item_count * sizeof(player_lootitem::ServerLootItem_Struct))];
|
||||
@@ -138,6 +138,7 @@ Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std:
|
||||
pc->drakkin_details = pcs->drakkin_details;
|
||||
pc->IsRezzed(rezzed);
|
||||
pc->become_npc = false;
|
||||
pc->consent_guild_id = guild_consent_id;
|
||||
|
||||
pc->UpdateEquipmentLight(); // itemlist populated above..need to determine actual values
|
||||
|
||||
@@ -617,11 +618,11 @@ bool Corpse::Save() {
|
||||
|
||||
/* Create New Corpse*/
|
||||
if (corpse_db_id == 0) {
|
||||
corpse_db_id = database.SaveCharacterCorpse(char_id, corpse_name, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position);
|
||||
corpse_db_id = database.SaveCharacterCorpse(char_id, corpse_name, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position, consent_guild_id);
|
||||
}
|
||||
/* Update Corpse Data */
|
||||
else{
|
||||
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, corpse_name, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position, IsRezzed());
|
||||
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, corpse_name, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position, consent_guild_id, IsRezzed());
|
||||
}
|
||||
|
||||
safe_delete_array(dbpc);
|
||||
|
||||
Reference in New Issue
Block a user