mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Core/Reputations): Faction rep gained by killing mobs is now prop… (#9737)
* fix(Core/Reputations): Faction rep gained by killing mobs is now properly rounded up. Do not increase reputation rank if exceeds max rank cap. Fixes #8718
This commit is contained in:
@@ -851,7 +851,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false);
|
||||
target->GetReputationMgr().SetOneFactionReputation(factionEntry, float(amount), false);
|
||||
target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry));
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[handler->GetSessionDbcLocale()], factionId,
|
||||
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
{
|
||||
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction))
|
||||
{
|
||||
player->GetReputationMgr().SetReputation(factionEntry, repValue);
|
||||
player->GetReputationMgr().SetReputation(factionEntry, static_cast<float>(repValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
{
|
||||
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction))
|
||||
{
|
||||
player->GetReputationMgr().SetReputation(factionEntry, repValue2);
|
||||
player->GetReputationMgr().SetReputation(factionEntry, static_cast<float>(repValue2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
// add 19 honor
|
||||
player->RewardHonor(nullptr, 1, 19);
|
||||
// add 20 cenarion circle repu
|
||||
player->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20);
|
||||
player->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20.f);
|
||||
// complete quest
|
||||
player->KilledMonsterCredit(SI_TURNIN_QUEST_CM_A);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
// add 19 honor
|
||||
player->RewardHonor(nullptr, 1, 19);
|
||||
// add 20 cenarion circle repu
|
||||
player->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20);
|
||||
player->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(609), 20.f);
|
||||
// complete quest
|
||||
player->KilledMonsterCredit(SI_TURNIN_QUEST_CM_H);
|
||||
}
|
||||
|
||||
@@ -2463,7 +2463,7 @@ class spell_gen_oracle_wolvar_reputation : public SpellScript
|
||||
// Set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
|
||||
// Not when player already has equal or higher rep with this faction
|
||||
if (player->GetReputationMgr().GetReputation(factionEntry) <= repChange)
|
||||
player->GetReputationMgr().SetReputation(factionEntry, repChange);
|
||||
player->GetReputationMgr().SetReputation(factionEntry, static_cast<float>(repChange));
|
||||
|
||||
// EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user