mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -5858,7 +5858,7 @@ float Player::CalculateReputationGain(ReputationSource source, uint32 creatureOr
|
||||
}
|
||||
|
||||
// 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)
|
||||
return;
|
||||
@@ -5887,7 +5887,6 @@ void Player::RewardReputation(Unit* victim, float rate)
|
||||
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);
|
||||
donerep1 *= rate;
|
||||
|
||||
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
|
||||
if (factionEntry1)
|
||||
@@ -5899,7 +5898,6 @@ void Player::RewardReputation(Unit* victim, float rate)
|
||||
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);
|
||||
donerep2 *= rate;
|
||||
|
||||
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
|
||||
if (factionEntry2)
|
||||
@@ -13444,7 +13442,10 @@ LootItem* Player::StoreLootItem(uint8 lootSlot, Loot* loot, InventoryResult& msg
|
||||
LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem);
|
||||
if (!item || item->is_looted)
|
||||
{
|
||||
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr);
|
||||
if (!sScriptMgr->CanSendErrorAlreadyLooted(this))
|
||||
{
|
||||
SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user