diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-05-04 14:49:08 +0200 | 
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-05-04 14:49:08 +0200 | 
| commit | fd33b1cd02a1c69fc78f47f079eadc43c331d054 (patch) | |
| tree | 25a6049ed0605fa23d691b362e1355d80f2aef81 /src/server/scripts | |
| parent | 7fe59c95d857708181991bf8478712b56e5076ac (diff) | |
Core/Threat: Re-add fixtate system. I am being told Netherspite needs it.
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 26 | 
1 files changed, 15 insertions, 11 deletions
| diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 56bfd14de66..66efcadfb50 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -885,6 +885,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(); @@ -901,17 +902,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."); | 
