mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*Fix build.
--HG-- branch : trunk
This commit is contained in:
@@ -454,6 +454,13 @@ Map::LoadGrid(const Cell& cell, bool no_unload)
|
||||
//LoadVMap(63-cell.GridX(),63-cell.GridY());
|
||||
}
|
||||
|
||||
void Map::LoadGrid(float x, float y)
|
||||
{
|
||||
CellPair pair = Trinity::ComputeCellPair(x, y);
|
||||
Cell cell(pair);
|
||||
EnsureGridLoadedForPlayer(cell, NULL, false);
|
||||
}
|
||||
|
||||
bool Map::Add(Player *player)
|
||||
{
|
||||
player->GetMapRef().link(this, player);
|
||||
|
||||
@@ -161,6 +161,7 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
bool GetUnloadFlag(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadFlag(); }
|
||||
void SetUnloadFlag(const GridPair &p, bool unload) { getNGrid(p.x_coord, p.y_coord)->setUnloadFlag(unload); }
|
||||
void LoadGrid(const Cell& cell, bool no_unload = false);
|
||||
void LoadGrid(float x, float y);
|
||||
bool UnloadGrid(const uint32 &x, const uint32 &y, bool pForce);
|
||||
virtual void UnloadAll(bool pForce);
|
||||
|
||||
|
||||
@@ -3466,10 +3466,8 @@ void Spell::EffectAddFarsight(uint32 i)
|
||||
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002);
|
||||
m_caster->AddDynObject(dynObj);
|
||||
|
||||
CellPair pair = Trinity::ComputeCellPair(dynObj->GetPositionX(), dynObj->GetPositionY());
|
||||
Cell cell(pair);
|
||||
Map* map = dynObj->GetMap();
|
||||
map->EnsureGridLoadedForPlayer(cell, NULL, false); // In case the spell is casted into a different grid by player
|
||||
map->LoadGrid(dynObj->GetPositionX(), dynObj->GetPositionY()); // In case the spell is casted into a different grid by player
|
||||
map->Add(dynObj);
|
||||
map->SwitchGridContainers(dynObj, true); // Needed for forwarding player packets
|
||||
dynObj->setActive(true); // Keep the grid updated even if there are no players in it
|
||||
|
||||
Reference in New Issue
Block a user