Core/Spells: Set UNIT_FIELD_TARGET to current spell cast target for proper facing the target
This commit is contained in:
@@ -183,7 +183,7 @@ public:
|
||||
if (pAttumen->getVictim())
|
||||
{
|
||||
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
||||
pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID());
|
||||
pAttumen->SetTarget(pAttumen->getVictim()->GetGUID());
|
||||
}
|
||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
return;
|
||||
|
||||
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->getVictim()->GetGUID())
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, me->getVictim()->GetGUID());
|
||||
me->SetTarget(me->getVictim()->GetGUID());
|
||||
|
||||
if (phase == 1)
|
||||
{
|
||||
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->SetSpeed(MOVE_RUN, 0.4f);
|
||||
me->GetMotionMaster()->MoveChase(who);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, TargetGUID);
|
||||
me->SetTarget(TargetGUID);
|
||||
Intro = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
player->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
z += 2.5; x -= 2; y -= 1.5;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, player->GetGUID());
|
||||
me->SetTarget(player->GetGUID());
|
||||
me->SetVisible(true);
|
||||
FlyBackTimer = 4500;
|
||||
break;
|
||||
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_TRAIL_TRIGGER, true);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
me->SetTarget(me->GetGUID());
|
||||
me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.01f); // core bug
|
||||
}
|
||||
void Reset() {}
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
uiOutroTimer = 8000;
|
||||
break;
|
||||
case 2:
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, pInstance ? pInstance->GetData64(DATA_ARTHAS) : 0);
|
||||
me->SetTarget(pInstance ? pInstance->GetData64(DATA_ARTHAS) : 0);
|
||||
me->HandleEmoteCommand(29);
|
||||
DoScriptText(SAY_ESCAPE_SPEECH_2, me);
|
||||
++uiOutroStep;
|
||||
|
||||
+27
-27
@@ -488,9 +488,9 @@ public:
|
||||
if (Unit* pDisguised2 = me->SummonCreature(NPC_CITY_MAN, 2400.82f, 1201.69f, 134.01f, 1.534082f, TEMPSUMMON_DEAD_DESPAWN, 180000))
|
||||
{
|
||||
uiInfiniteDraconianGUID[2] = pDisguised2->GetGUID();
|
||||
pDisguised0->SetUInt64Value(UNIT_FIELD_TARGET, uiInfiniteDraconianGUID[1]);
|
||||
pDisguised1->SetUInt64Value(UNIT_FIELD_TARGET, uiInfiniteDraconianGUID[0]);
|
||||
pDisguised2->SetUInt64Value(UNIT_FIELD_TARGET, uiInfiniteDraconianGUID[1]);
|
||||
pDisguised0->SetTarget(uiInfiniteDraconianGUID[1]);
|
||||
pDisguised1->SetTarget(uiInfiniteDraconianGUID[0]);
|
||||
pDisguised2->SetTarget(uiInfiniteDraconianGUID[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,8 +594,8 @@ public:
|
||||
uiUtherGUID = pUther->GetGUID();
|
||||
pUther->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pUther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f);
|
||||
pUther->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiUtherGUID);
|
||||
pUther->SetTarget(me->GetGUID());
|
||||
me->SetTarget(uiUtherGUID);
|
||||
}
|
||||
JumpToNextStep(17000);
|
||||
break;
|
||||
@@ -620,7 +620,7 @@ public:
|
||||
//After waypoint 1
|
||||
case 5:
|
||||
if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
|
||||
pJaina->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pJaina->SetTarget(me->GetGUID());
|
||||
DoScriptText(SAY_PHASE104, me);
|
||||
JumpToNextStep(10000);
|
||||
break;
|
||||
@@ -685,7 +685,7 @@ public:
|
||||
case 18:
|
||||
if (Creature* pJaina = Unit::GetCreature(*me, uiJainaGUID))
|
||||
{
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiJainaGUID);
|
||||
me->SetTarget(uiJainaGUID);
|
||||
pJaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pJaina->GetMotionMaster()->MovePoint(0, 1794.357f, 1272.183f, 140.558f);
|
||||
}
|
||||
@@ -703,13 +703,13 @@ public:
|
||||
case 21:
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
JumpToNextStep(0);
|
||||
break;
|
||||
//After waypoint 3
|
||||
case 22:
|
||||
DoScriptText(SAY_PHASE118, me);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiJainaGUID);
|
||||
me->SetTarget(uiJainaGUID);
|
||||
JumpToNextStep(10000);
|
||||
break;
|
||||
case 23:
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
if (Creature* pUther = Unit::GetCreature(*me, uiUtherGUID))
|
||||
pUther->DisappearAndDie();
|
||||
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
JumpToNextStep(0);
|
||||
break;
|
||||
//After Gossip 1 (waypoint 8)
|
||||
@@ -731,7 +731,7 @@ public:
|
||||
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
|
||||
{
|
||||
uiStalkerGUID = pStalker->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiStalkerGUID);
|
||||
me->SetTarget(uiStalkerGUID);
|
||||
}
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
@@ -743,15 +743,15 @@ public:
|
||||
SetEscortPaused(false);
|
||||
bStepping = false;
|
||||
SetRun(false);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
JumpToNextStep(0);
|
||||
break;
|
||||
//After waypoint 9
|
||||
case 27:
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiCitymenGUID[0]);
|
||||
me->SetTarget(uiCitymenGUID[0]);
|
||||
if (Creature* pCityman = Unit::GetCreature(*me, uiCitymenGUID[0]))
|
||||
{
|
||||
pCityman->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pCityman->SetTarget(me->GetGUID());
|
||||
pCityman->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pCityman->GetMotionMaster()->MovePoint(0, 2088.625f, 1279.191f, 140.743f);
|
||||
}
|
||||
@@ -779,10 +779,10 @@ public:
|
||||
if (Creature* pCityman1 = Unit::GetCreature(*me, uiCitymenGUID[1]))
|
||||
{
|
||||
DoScriptText(SAY_PHASE204, pCityman1);
|
||||
pCityman1->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pCityman1->SetTarget(me->GetGUID());
|
||||
if (Creature* pCityman0 = Unit::GetCreature(*me, uiCitymenGUID[0]))
|
||||
pCityman0->Kill(pCityman0);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiCitymenGUID[1]);
|
||||
me->SetTarget(uiCitymenGUID[1]);
|
||||
}
|
||||
JumpToNextStep(0);
|
||||
break;
|
||||
@@ -800,7 +800,7 @@ public:
|
||||
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
|
||||
{
|
||||
uiStalkerGUID = pStalker->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiStalkerGUID);
|
||||
me->SetTarget(uiStalkerGUID);
|
||||
}
|
||||
DoScriptText(SAY_PHASE205, me);
|
||||
JumpToNextStep(3000);
|
||||
@@ -809,7 +809,7 @@ public:
|
||||
if (Unit* pStalkerM = me->SummonCreature(NPC_INVIS_TARGET, 2117.349f, 1288.624f, 136.271f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
uiStalkerGUID = pStalkerM->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiStalkerGUID);
|
||||
me->SetTarget(uiStalkerGUID);
|
||||
}
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
@@ -821,7 +821,7 @@ public:
|
||||
|
||||
uiMalganisGUID = pMalganis->GetGUID();
|
||||
DoScriptText(SAY_PHASE206, pMalganis);
|
||||
pMalganis->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pMalganis->SetTarget(me->GetGUID());
|
||||
pMalganis->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
JumpToNextStep(11000);
|
||||
@@ -855,7 +855,7 @@ public:
|
||||
if (Unit* pStalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
|
||||
{
|
||||
uiStalkerGUID = pStalker->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiStalkerGUID);
|
||||
me->SetTarget(uiStalkerGUID);
|
||||
}
|
||||
DoScriptText(SAY_PHASE209, me);
|
||||
|
||||
@@ -957,11 +957,11 @@ public:
|
||||
case 61:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
|
||||
pDisguised0->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pDisguised0->SetTarget(me->GetGUID());
|
||||
if (Creature* pDisguised1 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[1]))
|
||||
pDisguised1->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pDisguised1->SetTarget(me->GetGUID());
|
||||
if (Creature* pDisguised2 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[2]))
|
||||
pDisguised2->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pDisguised2->SetTarget(me->GetGUID());
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 62:
|
||||
@@ -1074,7 +1074,7 @@ public:
|
||||
SpawnTimeRift(17, &uiEpochGUID);
|
||||
if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
|
||||
DoScriptText(SAY_PHASE314, pEpoch);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiEpochGUID);
|
||||
me->SetTarget(uiEpochGUID);
|
||||
}
|
||||
JumpToNextStep(18000);
|
||||
break;
|
||||
@@ -1141,7 +1141,7 @@ public:
|
||||
case 86:
|
||||
DoScriptText(SAY_PHASE502, me);
|
||||
JumpToNextStep(6000);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiMalganisGUID);
|
||||
me->SetTarget(uiMalganisGUID);
|
||||
break;
|
||||
case 87:
|
||||
if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
|
||||
@@ -1168,7 +1168,7 @@ public:
|
||||
//After waypoint 56
|
||||
case 89:
|
||||
SetRun(true);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, uiMalganisGUID);
|
||||
me->SetTarget(uiMalganisGUID);
|
||||
DoScriptText(SAY_PHASE503, me);
|
||||
JumpToNextStep(7000);
|
||||
break;
|
||||
@@ -1176,7 +1176,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, pInstance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
me->SetTarget(pInstance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
}
|
||||
DoScriptText(SAY_PHASE504, me);
|
||||
bStepping = false;
|
||||
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
DoCast(target, SPELL_GREEN_BEAM);
|
||||
|
||||
//Correctly update our target
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID());
|
||||
me->SetTarget(target->GetGUID());
|
||||
}
|
||||
|
||||
//Beam every 3 seconds
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
//Remove any target
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
|
||||
//Select random target for dark beam to start on
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
//Transition phase
|
||||
case PHASE_CTHUN_TRANSITION:
|
||||
//Remove any target
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
me->SetHealth(0);
|
||||
me->SetVisible(false);
|
||||
break;
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
//Remove Target field
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
|
||||
//Death animation/respawning;
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_TRANSITION);
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
|
||||
//No instance
|
||||
if (!pInst)
|
||||
@@ -706,7 +706,7 @@ public:
|
||||
//Body Phase
|
||||
case PHASE_CTHUN_STOMACH:
|
||||
//Remove Target field
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
|
||||
//Weaken
|
||||
if (FleshTentaclesKilled > 1)
|
||||
|
||||
@@ -544,11 +544,11 @@ public:
|
||||
DoScriptText(ANACHRONOS_SAY_1, me , Fandral);
|
||||
break;
|
||||
case 1:
|
||||
Fandral->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
Fandral->SetTarget(me->GetGUID());
|
||||
DoScriptText(FANDRAL_SAY_1, Fandral, me);
|
||||
break;
|
||||
case 2:
|
||||
Fandral->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
Fandral->SetTarget(0);
|
||||
DoScriptText(MERITHRA_EMOTE_1, Merithra);
|
||||
break;
|
||||
case 3:
|
||||
@@ -558,14 +558,14 @@ public:
|
||||
DoScriptText(ARYGOS_EMOTE_1, Arygos);
|
||||
break;
|
||||
case 5:
|
||||
Caelestrasz->SetUInt64Value(UNIT_FIELD_TARGET, Fandral->GetGUID());
|
||||
Caelestrasz->SetTarget(Fandral->GetGUID());
|
||||
DoScriptText(CAELESTRASZ_SAY_1, Caelestrasz);
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(MERITHRA_SAY_2, Merithra);
|
||||
break;
|
||||
case 7:
|
||||
Caelestrasz->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
Caelestrasz->SetTarget(0);
|
||||
Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
|
||||
break;
|
||||
case 8:
|
||||
|
||||
+2
-2
@@ -828,7 +828,7 @@ public:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
|
||||
{
|
||||
m_uiTrampleTargetGUID = target->GetGUID();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, m_uiTrampleTargetGUID);
|
||||
me->SetTarget(m_uiTrampleTargetGUID);
|
||||
DoScriptText(SAY_TRAMPLE_STARE, me, target);
|
||||
m_bTrampleCasted = false;
|
||||
SetCombatMovement(false);
|
||||
@@ -859,7 +859,7 @@ public:
|
||||
case 4:
|
||||
DoScriptText(SAY_TRAMPLE_START, me);
|
||||
me->GetMotionMaster()->MoveCharge(m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ+2, 42, 1);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
m_uiStage = 5;
|
||||
break;
|
||||
case 5:
|
||||
|
||||
+1
-1
@@ -474,7 +474,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
break;
|
||||
case 1142:
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_pInstance->GetData64(NPC_JARAXXUS)))
|
||||
pTemp->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
pTemp->SetTarget(me->GetGUID());
|
||||
if (Creature* pTrigger = Unit::GetCreature(*me, m_uiTriggerGUID))
|
||||
pTrigger->DespawnOrUnsummon();
|
||||
if (Creature* pPortal = Unit::GetCreature(*me, m_uiPortalGUID))
|
||||
|
||||
@@ -315,7 +315,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
//Remove any target
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z);
|
||||
|
||||
//Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, Trigger->GetGUID());
|
||||
me->SetTarget(Trigger->GetGUID());
|
||||
DoCast(Trigger, SPELL_EYE_BLAST);
|
||||
}
|
||||
void SummonFlamesOfAzzinoth()
|
||||
@@ -1235,7 +1235,7 @@ public:
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->AttackStop();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
|
||||
me->SetTarget(IllidanGUID);
|
||||
MaxTimer = 0;
|
||||
break;
|
||||
case PHASE_TRANSFORM_SEQUENCE:
|
||||
|
||||
@@ -356,7 +356,7 @@ public:
|
||||
CAST_AI(mob_ashtongue_sorcerer::mob_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = me->GetGUID();
|
||||
Sorcerer->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
Sorcerer->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
Sorcerer->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
Sorcerer->SetTarget(me->GetGUID());
|
||||
Sorcerers.push_back(Sorcerer->GetGUID());
|
||||
--DeathCount;
|
||||
++SorcererCount;
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
Shade->AddThreat(me, 1000000.0f);
|
||||
me->CombatStart(Shade);
|
||||
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
Shade->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
Shade->SetTarget(me->GetGUID());
|
||||
if (pl) Shade->AddThreat(pl, 1.0f);
|
||||
DoZoneInCombat(Shade);
|
||||
EventBegun = true;
|
||||
@@ -680,7 +680,7 @@ public:
|
||||
case 1:
|
||||
if (Creature* Shade = Unit::GetCreature(*me, ShadeGUID))
|
||||
{
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, ShadeGUID);
|
||||
me->SetTarget(ShadeGUID);
|
||||
DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
|
||||
EndingTalkCount = 0;
|
||||
SoulRetrieveTimer = 16000;
|
||||
|
||||
@@ -182,7 +182,7 @@ class boss_alar : public CreatureScript
|
||||
me->RemoveAllAuras();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AttackStop();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
me->SetSpeed(MOVE_RUN, 5.0f);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, waypoint[5][0], waypoint[5][1], waypoint[5][2]);
|
||||
|
||||
@@ -236,7 +236,7 @@ struct advisorbase_ai : public ScriptedAI
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
|
||||
@@ -782,8 +782,8 @@ public:
|
||||
Illi->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); return 350; break;
|
||||
case 6:
|
||||
Illi->CastSpell(Illi, SPELL_ONE, true);
|
||||
Illi->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
|
||||
Illi->SetTarget(me->GetGUID());
|
||||
me->SetTarget(IllidanGUID);
|
||||
return 2000; break;
|
||||
case 7: DoScriptText(OVERLORD_YELL_2, me); return 4500; break;
|
||||
case 8: me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); return 2500; break;
|
||||
@@ -792,7 +792,7 @@ public:
|
||||
case 11: DoScriptText(OVERLORD_SAY_4, me, player); return 6000; break;
|
||||
case 12: DoScriptText(LORD_ILLIDAN_SAY_2, Illi); return 5500; break;
|
||||
case 13: DoScriptText(LORD_ILLIDAN_SAY_3, Illi); return 4000; break;
|
||||
case 14: Illi->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 1500; break;
|
||||
case 14: Illi->SetTarget(PlayerGUID); return 1500; break;
|
||||
case 15: DoScriptText(LORD_ILLIDAN_SAY_4, Illi); return 1500; break;
|
||||
case 16:
|
||||
if (player)
|
||||
@@ -818,7 +818,7 @@ public:
|
||||
Illi->setDeathState(JUST_DIED);
|
||||
return 1000; break;
|
||||
case 23: me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); return 2000; break;
|
||||
case 24: me->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 5000; break;
|
||||
case 24: me->SetTarget(PlayerGUID); return 5000; break;
|
||||
case 25: DoScriptText(OVERLORD_SAY_6, me); return 2000; break;
|
||||
case 26:
|
||||
if (player)
|
||||
@@ -828,7 +828,7 @@ public:
|
||||
{
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
|
||||
Yarzill->SetTarget(PlayerGUID);
|
||||
return 500; }
|
||||
break;
|
||||
case 28:
|
||||
@@ -848,7 +848,7 @@ public:
|
||||
{
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
Yarzill->SetTarget(0);
|
||||
return 5000; }
|
||||
break;
|
||||
case 31:
|
||||
@@ -1193,7 +1193,7 @@ public:
|
||||
|
||||
me->AddUnitState(UNIT_STAT_ROOT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
me->SetTarget(0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/){}
|
||||
@@ -1226,7 +1226,7 @@ public:
|
||||
case 5:
|
||||
if (Player* AggroTarget = (Unit::GetPlayer(*me, AggroTargetGUID)))
|
||||
{
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, AggroTarget->GetGUID());
|
||||
me->SetTarget(AggroTarget->GetGUID());
|
||||
me->AddThreat(AggroTarget, 1);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user