Core/Threat: Re-add fixtate system. I am being told Netherspite needs it.

This commit is contained in:
Treeston authored and Ovahlord committed 2020-07-22 17:33:17 +02:00
1 parent b4d5f46ea4
commit 93864a29c0
3 files changed
+51 -12

No files matched your search

+15 -11
View File
@@ -888,6 +888,7 @@ public:
handler->PSendSysMessage("%s (GUID %u, SpawnID %u) is not engaged, but still has a threat list? Well, here it is:", target->GetName().c_str(), target->GetGUID().GetCounter(), target->GetTypeId() == TYPEID_UNIT ? target->ToCreature()->GetSpawnId() : 0);
count = 0;
Unit* fixtateVictim = mgr.GetFixtateTarget();
for (ThreatReference const* ref : mgr.GetSortedThreatList())
{
Unit* unit = ref->GetVictim();
@@ -904,17 +905,20 @@ public:
onlineStr = "";
}
char const* tauntStr;
switch (ref->GetTauntState())
{
case ThreatReference::TAUNT_STATE_TAUNT:
tauntStr = " [TAUNT]";
break;
case ThreatReference::TAUNT_STATE_DETAUNT:
tauntStr = " [DETAUNT]";
break;
default:
tauntStr = "";
}
if (unit == fixtateVictim)
tauntStr = " [FIXTATE]";
else
switch (ref->GetTauntState())
{
case ThreatReference::TAUNT_STATE_TAUNT:
tauntStr = " [TAUNT]";
break;
case ThreatReference::TAUNT_STATE_DETAUNT:
tauntStr = " [DETAUNT]";
break;
default:
tauntStr = "";
}
handler->PSendSysMessage(" %u. %s (GUID %u) - threat %f%s%s", ++count, unit->GetName().c_str(), unit->GetGUID().GetCounter(), ref->GetThreat(), tauntStr, onlineStr);
}
handler->SendSysMessage("End of threat list.");