mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 00:19:59 +01:00
Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
#include "Weather.h"
|
||||
#include "WeatherMgr.h"
|
||||
#include "World.h"
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
u_map_magic MapMagic = { {'M','A','P','S'} };
|
||||
u_map_magic MapVersionMagic = { {'v','1','.','7'} };
|
||||
@@ -843,6 +845,18 @@ void Map::Update(uint32 t_diff)
|
||||
for (Creature* c : updateList)
|
||||
VisitNearbyCellsOf(c, grid_object_update, world_object_update);
|
||||
}
|
||||
|
||||
{ // Update any creatures that own auras the player has applications of
|
||||
std::unordered_set<Unit*> toVisit;
|
||||
for (std::pair<uint32, AuraApplication*> pair : player->GetAppliedAuras())
|
||||
{
|
||||
if (Unit* caster = pair.second->GetBase()->GetCaster())
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER && !caster->IsWithinDistInMap(player, GetVisibilityRange(), false))
|
||||
toVisit.insert(caster);
|
||||
}
|
||||
for (Unit* unit : toVisit)
|
||||
VisitNearbyCellsOf(unit, grid_object_update, world_object_update);
|
||||
}
|
||||
}
|
||||
|
||||
// non-player active objects, increasing iterator in the loop in case of object removal
|
||||
|
||||
Reference in New Issue
Block a user