Core/Spells: merged some spell focussing and unit state changes

This commit is contained in:
Ovahlord
2018-04-29 12:54:38 +02:00
parent f1c54a4529
commit a241ee78e9
7 changed files with 56 additions and 35 deletions

View File

@@ -927,13 +927,6 @@ class npc_orb_carrier : public CreatureScript
me->CastSpell((Unit*)nullptr, SPELL_TRACK_ROTATION, false);
scheduler.Update(diff);
/// Workaround: This is here because even though the above spell has SPELL_ATTR1_CHANNEL_TRACK_TARGET,
/// we are having two creatures involded here. This attribute is handled clientside, meaning the client
/// sends orientation update itself. Here, no packet is sent, and the creature does not rotate. By
/// forcing the carrier to always be facing the rotation focus, we ensure everything works as it should.
if (Creature* rotationFocus = _instance->GetCreature(DATA_ORB_ROTATION_FOCUS))
me->SetFacingToObject(rotationFocus); // setInFront
}
void DoAction(int32 action) override