mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Spells: - Apply proper unit flags to summoned minions
- SPELL_AURA_MOD_REPUTATION_GAIN spells (e.g Diplomacy) should increase reputation gained from spells (e.g Commendation Badges)
This commit is contained in:
@@ -3014,7 +3014,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
summon->SelectLevel(summon->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp
|
||||
summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureInfo()->npcflag);
|
||||
|
||||
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||
|
||||
summon->AI()->EnterEvadeMode();
|
||||
break;
|
||||
@@ -5876,6 +5876,10 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
|
||||
{
|
||||
rep_change = int32((float)rep_change * repData->spell_rate);
|
||||
}
|
||||
|
||||
// Bonus from spells that increase reputation gain
|
||||
float bonus = rep_change * _player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0; // 10%
|
||||
rep_change += (int32)bonus;
|
||||
|
||||
_player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user