mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7594] Lost last moment fixes for prev. commit.
This will fix crashes at teleports.
This commit is contained in:
parent
5dc0a1ed97
commit
89d9e736a3
3 changed files with 7 additions and 3 deletions
|
|
@ -337,10 +337,12 @@ Map::EnsureGridCreated(const GridPair &p)
|
|||
void
|
||||
Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
||||
{
|
||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
NGridType *grid;
|
||||
|
||||
if(EnsureGridLoaded(cell))
|
||||
{
|
||||
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
|
||||
if (player)
|
||||
{
|
||||
player->SendDelayResponse(MAX_GRID_LOAD_TIME);
|
||||
|
|
@ -354,6 +356,8 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
|||
ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 0.1f);
|
||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||
}
|
||||
else
|
||||
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
|
||||
if (player)
|
||||
AddToGrid(player,grid,cell);
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
CreatureMoveList i_creaturesToMove;
|
||||
|
||||
bool loaded(const GridPair &) const;
|
||||
void EnsureGridCreated(const GridPair &);
|
||||
void EnsureGridCreated(const GridPair &);
|
||||
bool EnsureGridLoaded(Cell const&);
|
||||
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7593"
|
||||
#define REVISION_NR "7594"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue