Some more script adjustments ported from #19930.

(cherry picked from commit 3f8c0cb446)
This commit is contained in:
treeston
2017-07-11 12:52:53 +02:00
committed by Shauren
parent 2c3a107bee
commit 814f7e45fb
6 changed files with 11 additions and 10 deletions

View File

@@ -219,7 +219,7 @@ struct dummy_dragonAI : public ScriptedAI
me->SetInCombatWithZone();
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
{
me->GetThreatManager().AddThreat(target, 1.0f);
AddThreat(target, 1.0f);
me->Attack(target, true);
me->GetMotionMaster()->MoveChase(target);
}

View File

@@ -262,7 +262,7 @@ public:
if (player && !player->IsGameMaster() && me->IsInRange(player, 8.0f, 25.0f, false))
{
ResetThreatList();
me->GetThreatManager().AddThreat(player, 1.0f);
AddThreat(player, 1.0f);
DoCast(player, SPELL_CHARGE);
break;
}
@@ -409,7 +409,7 @@ public:
if (player && !player->IsGameMaster() && me->IsInRange(player, 8.0f, 25.0f, false))
{
ResetThreatList();
me->GetThreatManager().AddThreat(player, 5.0f);
AddThreat(player, 5.0f);
DoCast(player, SPELL_INTERCEPT);
break;
}

View File

@@ -1542,7 +1542,7 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->GetThreatManager().AddThreat(GetHitUnit(), float(GetEffectValue()));
GetCaster()->GetThreatManager().AddThreat(GetHitUnit(), float(GetEffectValue()), GetSpellInfo(), true, true);
GetCaster()->GetAI()->SetData(DATA_WHELP_MARKER, 1);
}
@@ -1562,7 +1562,8 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
if (SpellEffectInfo const* effect = GetSpellInfo()->GetEffect(EFFECT_1))
caster->GetThreatManager().AddThreat(GetTarget(), -float(effect->CalcValue()));
caster->GetThreatManager().AddThreat(GetTarget(), -float(effect->CalcValue()), GetSpellInfo(), true, true);
caster->GetAI()->SetData(DATA_WHELP_MARKER, 0);
}
}

View File

@@ -245,7 +245,7 @@ public:
events.SetPhase(PHASE_BALCONY);
me->SetReactState(REACT_PASSIVE);
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetImmuneToPC(true, true);
me->SetImmuneToPC(true);
me->AttackStop();
me->StopMoving();
me->RemoveAllAuras();

View File

@@ -1092,7 +1092,7 @@ class spell_thaddius_polarity_charge : public SpellScriptLoader
}
// this guy will get hit - achievement failure trigger
if (Creature* thaddius = (*it)->FindNearestCreature(NPC_THADDIUS,200.0f))
if (Creature* thaddius = (*it)->FindNearestCreature(NPC_THADDIUS, 200.0f))
thaddius->AI()->DoAction(ACTION_POLARITY_CROSSED);
++it;
@@ -1222,8 +1222,8 @@ class spell_thaddius_magnetic_pull : public SpellScriptLoader
float stalaggOtherThreat = stalaggThreat.GetThreat(feugenTank);
// set the two entries in feugen's threat table to be equal to the ones in stalagg's
stalagg->GetThreatManager().AddThreat(stalaggTank, stalaggTankThreat - feugenOtherThreat, nullptr, true, true);
stalagg->GetThreatManager().AddThreat(feugenTank, stalaggOtherThreat - feugenTankThreat, nullptr, true, true);
feugen->GetThreatManager().AddThreat(stalaggTank, stalaggTankThreat - feugenOtherThreat, nullptr, true, true);
feugen->GetThreatManager().AddThreat(feugenTank, stalaggOtherThreat - feugenTankThreat, nullptr, true, true);
// set the two entries in stalagg's threat table to be equal to the ones in feugen's
stalagg->GetThreatManager().AddThreat(feugenTank, feugenTankThreat - stalaggOtherThreat, nullptr, true, true);

View File

@@ -1037,7 +1037,7 @@ class npc_detonating_lasher : public CreatureScript
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
{
// Switching to other target - modify aggro of new target by 20% from current target's aggro
AddThreat(target, me->GetThreatManager().GetThreat(me->GetVictim()) * 1.2f);
AddThreat(target, GetThreat(me->GetVictim()) * 1.2f);
AttackStart(target);
}
changeTargetTimer = urand(5000, 10000);