Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177.
This commit is contained in:
1 parent
d82abd8256
commit
c1237c788b
2 files changed
+6
-3
No files matched your search
@@ -926,12 +926,12 @@ public:
|
||||
for (auto const& ref : target->GetCombatManager().GetPvPCombatRefs())
|
||||
{
|
||||
Unit* unit = ref.second->GetOther(target);
|
||||
handler->PSendSysMessage("[PvP] %s (DBGUID %u)", unit->GetName().c_str(), unit->GetTypeId() == TYPEID_UNIT ? unit->ToCreature()->GetSpawnId() : 0);
|
||||
handler->PSendSysMessage("[PvP] %s (SpawnID %u)", unit->GetName().c_str(), unit->GetTypeId() == TYPEID_UNIT ? unit->ToCreature()->GetSpawnId() : 0);
|
||||
}
|
||||
for (auto const& ref : target->GetCombatManager().GetPvECombatRefs())
|
||||
{
|
||||
Unit* unit = ref.second->GetOther(target);
|
||||
handler->PSendSysMessage("[PvE] %s (DBGUID %u)", unit->GetName().c_str(), unit->GetTypeId() == TYPEID_UNIT ? unit->ToCreature()->GetSpawnId() : 0);
|
||||
handler->PSendSysMessage("[PvE] %s (SpawnID %u)", unit->GetName().c_str(), unit->GetTypeId() == TYPEID_UNIT ? unit->ToCreature()->GetSpawnId() : 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user