mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Core\OpCode): HandleFarSightOpcode (#9965)
* Change TO ThreadUNSAFE This will process the far sight packet as a is not thread-safe - process it in World::UpdateSessions() compared to the former packet is thread-safe - process it in Map::Update(). This matches up with tc in everything we have with the HandleFarSightOpcode. * Further Adjustments * Move to Debug Loggin TC has it as move to Debug Logging. Stating its a weird opcode handling issue which is not really known why.
This commit is contained in:
@@ -351,19 +351,6 @@ Unit::~Unit()
|
||||
ASSERT(!m_attacking);
|
||||
ASSERT(m_attackers.empty());
|
||||
|
||||
// pussywizard: clear m_sharedVision along with back references
|
||||
if (!m_sharedVision.empty())
|
||||
{
|
||||
LOG_INFO("misc", "Unit::~Unit (B1)");
|
||||
do
|
||||
{
|
||||
LOG_INFO("misc", "Unit::~Unit (B2)");
|
||||
Player* p = *(m_sharedVision.begin());
|
||||
p->m_isInSharedVisionOf.erase(this);
|
||||
m_sharedVision.erase(p);
|
||||
} while (!m_sharedVision.empty());
|
||||
}
|
||||
|
||||
ASSERT(m_Controlled.empty());
|
||||
ASSERT(m_appliedAuras.empty());
|
||||
ASSERT(m_ownedAuras.empty());
|
||||
@@ -10624,15 +10611,13 @@ void Unit::AddPlayerToVision(Player* player)
|
||||
setActive(true);
|
||||
SetWorldObject(true);
|
||||
}
|
||||
m_sharedVision.insert(player);
|
||||
player->m_isInSharedVisionOf.insert(this);
|
||||
m_sharedVision.push_back(player);
|
||||
}
|
||||
|
||||
// only called in Player::SetSeer
|
||||
void Unit::RemovePlayerFromVision(Player* player)
|
||||
{
|
||||
m_sharedVision.erase(player);
|
||||
player->m_isInSharedVisionOf.erase(this);
|
||||
m_sharedVision.remove(player);
|
||||
if (m_sharedVision.empty())
|
||||
{
|
||||
setActive(false);
|
||||
|
||||
Reference in New Issue
Block a user