Core/Creatures: Implemented CREATURE_STATIC_FLAG_3_NO_THREAT_FEEDBACK
This commit is contained in:
1 parent
4ead80f388
commit
e130290f83
2 files changed
+12
No files matched your search
@@ -819,6 +819,9 @@ void ThreatManager::UnregisterRedirectThreat(uint32 spellId, ObjectGuid const& v
|
||||
|
||||
void ThreatManager::SendClearAllThreatToClients() const
|
||||
{
|
||||
if (Creature const* owner = _owner->ToCreature(); owner && owner->IsThreatFeedbackDisabled())
|
||||
return;
|
||||
|
||||
WorldPackets::Combat::ThreatClear packet;
|
||||
packet.UnitGUID = _owner->GetGUID();
|
||||
_owner->SendMessageToSet(packet.Write(), false);
|
||||
@@ -826,6 +829,9 @@ void ThreatManager::SendClearAllThreatToClients() const
|
||||
|
||||
void ThreatManager::SendRemoveToClients(Unit const* victim) const
|
||||
{
|
||||
if (Creature const* owner = _owner->ToCreature(); owner && owner->IsThreatFeedbackDisabled())
|
||||
return;
|
||||
|
||||
WorldPackets::Combat::ThreatRemove packet;
|
||||
packet.UnitGUID = _owner->GetGUID();
|
||||
packet.AboutGUID = victim->GetGUID();
|
||||
@@ -834,6 +840,9 @@ void ThreatManager::SendRemoveToClients(Unit const* victim) const
|
||||
|
||||
void ThreatManager::SendThreatListToClients(bool newHighest) const
|
||||
{
|
||||
if (Creature const* owner = _owner->ToCreature(); owner && owner->IsThreatFeedbackDisabled())
|
||||
return;
|
||||
|
||||
auto fillSharedPacketDataAndSend = [&](auto& packet)
|
||||
{
|
||||
packet.UnitGUID = _owner->GetGUID();
|
||||
|
||||
@@ -393,6 +393,9 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
|
||||
void AtEngage(Unit* target) override;
|
||||
void AtDisengage() override;
|
||||
|
||||
bool IsThreatFeedbackDisabled() const { return _staticFlags.HasFlag(CREATURE_STATIC_FLAG_3_NO_THREAT_FEEDBACK); }
|
||||
void SetNoThreatFeedback(bool noThreatFeedback) { _staticFlags.ApplyFlag(CREATURE_STATIC_FLAG_3_NO_THREAT_FEEDBACK, noThreatFeedback); }
|
||||
|
||||
void ForcePartyMembersIntoCombat();
|
||||
|
||||
bool HasStaticFlag(CreatureStaticFlags flag) const { return _staticFlags.HasFlag(flag); }
|
||||
|
||||
Reference in new issue
Block a user