From 8f1e40f0bc133d9b15e66cf7db61fd20714fccab Mon Sep 17 00:00:00 2001 From: ErikasKontenis Date: Thu, 14 May 2020 14:19:21 +0300 Subject: [PATCH] share party tasks only when shared is active. Also remove pz limit in sources to active share party --- .../scripts/killing_in_the_name_of.lua | 2 +- src/party.cpp | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/data/creaturescripts/scripts/killing_in_the_name_of.lua b/data/creaturescripts/scripts/killing_in_the_name_of.lua index f3c4476..a5a7c60 100644 --- a/data/creaturescripts/scripts/killing_in_the_name_of.lua +++ b/data/creaturescripts/scripts/killing_in_the_name_of.lua @@ -95,7 +95,7 @@ function onKill(player, target) local players local party = player:getParty() - if party ~= nil then + if party ~= nil and party:isSharedExperienceEnabled() then players = party:getMembers() -- all members of the party players[#players + 1] = party:getLeader() -- don't forget the leader else diff --git a/src/party.cpp b/src/party.cpp index a7a9d8c..d9b06ba 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -428,18 +428,6 @@ bool Party::canUseSharedExperience(const Player* player) const return false; } - if (!player->hasFlag(PlayerFlag_NotGainInFight)) { - //check if the player has healed/attacked anything recently - auto it = ticksMap.find(player->getID()); - if (it == ticksMap.end()) { - return false; - } - - uint64_t timeDiff = OTSYS_TIME() - it->second; - if (timeDiff > static_cast(g_config.getNumber(ConfigManager::PZ_LOCKED))) { - return false; - } - } return true; }