diff --git a/config.lua.dist b/config.lua.dist index e4916a97..824f47f7 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -261,8 +261,10 @@ wheelAtelierRevealGreaterCost = 6000000 -- Only change it here if you know what you are doing or to make testing easier with familiars familiarTime = 30 +-- Party +-- NOTE: partyShareRangeMultiplier: the range of the party share experience, default 3/2 (1.5) +leavePartyOnDeath = false partyAutoShareExperience = true --- partyShareRangeMultiplier: the range of the party share experience, default 3/2 (1.5) partyShareRangeMultiplier = 1.5 partyShareLootBoosts = false partyShareLootBoostsDimishingFactor = 0.7 diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index 98c2b572..beb42811 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -377,4 +377,5 @@ enum ConfigKey_t : uint16_t { UNLOCK_ALL_OUTFITS, UNLOCK_ALL_MOUNTS, UNLOCK_ALL_FAMILIARS, + LEAVE_PARTY_ON_DEATH, }; diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 5c0b174c..6674e216 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -180,6 +180,7 @@ bool ConfigManager::load() { loadBoolConfig(L, UNLOCK_ALL_OUTFITS, "unlockAllOutfits", false); loadBoolConfig(L, UNLOCK_ALL_MOUNTS, "unlockAllMounts", false); loadBoolConfig(L, UNLOCK_ALL_FAMILIARS, "unlockAllFamiliars", false); + loadBoolConfig(L, LEAVE_PARTY_ON_DEATH, "leavePartyOnDeath", false); loadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, "bestiaryRateCharmShopPrice", 1.0); loadFloatConfig(L, COMBAT_CHAIN_SKILL_FORMULA_AXE, "combatChainSkillFormulaAxe", 0.9); diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 205ed884..700d9bb3 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -4040,6 +4040,10 @@ void Player::despawn() { player->vip()->notifyStatusChange(static_self_cast(), VipStatus_t::PENDING, false); } + if (g_configManager().getBoolean(LEAVE_PARTY_ON_DEATH) && m_party) { + m_party->leaveParty(static_self_cast()); + } + setDead(true); }