fix(Core/Reputation): remove reputation splitting for being partied (#16660)
remove rate for party
This commit is contained in:
@@ -174,11 +174,11 @@ void KillRewarder::_RewardXP(Player* player, float rate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillRewarder::_RewardReputation(Player* player, float rate)
|
void KillRewarder::_RewardReputation(Player* player)
|
||||||
{
|
{
|
||||||
// 4.3. Give reputation (player must not be on BG).
|
// 4.3. Give reputation (player must not be on BG).
|
||||||
// Even dead players and corpses are rewarded.
|
// Even dead players and corpses are rewarded.
|
||||||
player->RewardReputation(_victim, rate);
|
player->RewardReputation(_victim);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillRewarder::_RewardKillCredit(Player* player)
|
void KillRewarder::_RewardKillCredit(Player* player)
|
||||||
@@ -208,7 +208,6 @@ void KillRewarder::_RewardPlayer(Player* player, bool isDungeon)
|
|||||||
if (!_isPvP || _isBattleGround)
|
if (!_isPvP || _isBattleGround)
|
||||||
{
|
{
|
||||||
float xpRate = _group ? _groupRate * float(player->GetLevel()) / _aliveSumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels.
|
float xpRate = _group ? _groupRate * float(player->GetLevel()) / _aliveSumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels.
|
||||||
float reputationRate = _group ? _groupRate * float(player->GetLevel()) / _sumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels.
|
|
||||||
sScriptMgr->OnRewardKillRewarder(player, isDungeon, xpRate); // Personal rate is 100%.
|
sScriptMgr->OnRewardKillRewarder(player, isDungeon, xpRate); // Personal rate is 100%.
|
||||||
|
|
||||||
if (_xp)
|
if (_xp)
|
||||||
@@ -219,7 +218,7 @@ void KillRewarder::_RewardPlayer(Player* player, bool isDungeon)
|
|||||||
if (!_isBattleGround)
|
if (!_isBattleGround)
|
||||||
{
|
{
|
||||||
// If killer is in dungeon then all members receive full reputation at kill.
|
// If killer is in dungeon then all members receive full reputation at kill.
|
||||||
_RewardReputation(player, isDungeon ? 1.0f : reputationRate);
|
_RewardReputation(player);
|
||||||
_RewardKillCredit(player);
|
_RewardKillCredit(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ private:
|
|||||||
|
|
||||||
void _RewardHonor(Player* player);
|
void _RewardHonor(Player* player);
|
||||||
void _RewardXP(Player* player, float rate);
|
void _RewardXP(Player* player, float rate);
|
||||||
void _RewardReputation(Player* player, float rate);
|
void _RewardReputation(Player* player);
|
||||||
void _RewardKillCredit(Player* player);
|
void _RewardKillCredit(Player* player);
|
||||||
void _RewardPlayer(Player* player, bool isDungeon);
|
void _RewardPlayer(Player* player, bool isDungeon);
|
||||||
void _RewardGroup();
|
void _RewardGroup();
|
||||||
|
|||||||
@@ -5856,7 +5856,7 @@ float Player::CalculateReputationGain(ReputationSource source, uint32 creatureOr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculates how many reputation points player gains in victim's enemy factions
|
// Calculates how many reputation points player gains in victim's enemy factions
|
||||||
void Player::RewardReputation(Unit* victim, float rate)
|
void Player::RewardReputation(Unit* victim)
|
||||||
{
|
{
|
||||||
if (!victim || victim->GetTypeId() == TYPEID_PLAYER)
|
if (!victim || victim->GetTypeId() == TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
@@ -5885,7 +5885,6 @@ void Player::RewardReputation(Unit* victim, float rate)
|
|||||||
if (Rep->RepFaction1 && (!Rep->TeamDependent || teamId == TEAM_ALLIANCE))
|
if (Rep->RepFaction1 && (!Rep->TeamDependent || teamId == TEAM_ALLIANCE))
|
||||||
{
|
{
|
||||||
float donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast<float>(Rep->RepValue1), ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
|
float donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast<float>(Rep->RepValue1), ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
|
||||||
donerep1 *= rate;
|
|
||||||
|
|
||||||
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
|
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
|
||||||
if (factionEntry1)
|
if (factionEntry1)
|
||||||
@@ -5897,7 +5896,6 @@ void Player::RewardReputation(Unit* victim, float rate)
|
|||||||
if (Rep->RepFaction2 && (!Rep->TeamDependent || teamId == TEAM_HORDE))
|
if (Rep->RepFaction2 && (!Rep->TeamDependent || teamId == TEAM_HORDE))
|
||||||
{
|
{
|
||||||
float donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast<float>(Rep->RepValue2), ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
|
float donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast<float>(Rep->RepValue2), ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
|
||||||
donerep2 *= rate;
|
|
||||||
|
|
||||||
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
|
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
|
||||||
if (factionEntry2)
|
if (factionEntry2)
|
||||||
|
|||||||
@@ -2086,7 +2086,7 @@ public:
|
|||||||
ReputationMgr& GetReputationMgr() { return *m_reputationMgr; }
|
ReputationMgr& GetReputationMgr() { return *m_reputationMgr; }
|
||||||
[[nodiscard]] ReputationMgr const& GetReputationMgr() const { return *m_reputationMgr; }
|
[[nodiscard]] ReputationMgr const& GetReputationMgr() const { return *m_reputationMgr; }
|
||||||
[[nodiscard]] ReputationRank GetReputationRank(uint32 faction_id) const;
|
[[nodiscard]] ReputationRank GetReputationRank(uint32 faction_id) const;
|
||||||
void RewardReputation(Unit* victim, float rate);
|
void RewardReputation(Unit* victim);
|
||||||
void RewardReputation(Quest const* quest);
|
void RewardReputation(Quest const* quest);
|
||||||
|
|
||||||
float CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, float rep, int32 faction, bool noQuestBonus = false);
|
float CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, float rep, int32 faction, bool noQuestBonus = false);
|
||||||
|
|||||||
Reference in New Issue
Block a user