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->SelectLevel(summon->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp
|
||||||
summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureInfo()->npcflag);
|
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();
|
summon->AI()->EnterEvadeMode();
|
||||||
break;
|
break;
|
||||||
@@ -5876,6 +5876,10 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
|
|||||||
{
|
{
|
||||||
rep_change = int32((float)rep_change * repData->spell_rate);
|
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);
|
_player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user