diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 6 | ||||
| -rw-r--r-- | src/game/Map.cpp | 14 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 5 | ||||
| -rw-r--r-- | src/game/WorldSession.cpp | 1 |
4 files changed, 6 insertions, 20 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 66c4fa58bb9..b63e88a8cec 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -784,12 +784,6 @@ void LoadOverridenDBCData() case 41013: spellInfo->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends break; - //temp, not needed in 310 - case 28531: - case 55799: - spellInfo->DurationIndex = 21; - spellInfo->Effect[0] = SPELL_EFFECT_APPLY_AREA_AURA_ENEMY; - break; // Naxxramas : Gothik : Inform Inf range case 27892: case 27928: diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 2321e130301..b7612e56072 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -202,7 +202,7 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _par : i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), m_unloadTimer(0), m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry), m_parentMap(_parent ? _parent : this) - , i_lock(true) + , i_lock(false) { m_notifyTimer.SetInterval(IN_MILISECONDS/2); @@ -665,6 +665,8 @@ void Map::RemoveUnitFromNotify(Unit *unit, int32 slot) assert(slot < i_unitsToNotify.size()); i_unitsToNotify[slot] = NULL; } + + unit->m_NotifyListPos = -1; } void Map::Update(const uint32 &t_diff) @@ -816,17 +818,12 @@ void Map::Remove(Player *player, bool remove) CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY()); if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) { - if(remove) - player->CleanupsBeforeDelete(); - + sLog.outCrash("Map::Remove: Player is in invalid cell!"); // invalid coordinates player->RemoveFromWorld(); if( remove ) - { - player->ResetMap(); DeleteFromWorld(player); - } return; } @@ -843,9 +840,6 @@ void Map::Remove(Player *player, bool remove) NGridType *grid = getNGrid(cell.GridX(), cell.GridY()); assert(grid != NULL); - if(remove) - player->CleanupsBeforeDelete(); - player->RemoveFromWorld(); RemoveFromGrid(player,grid,cell); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index cf6b8a577c3..645c1556861 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12393,10 +12393,7 @@ void Unit::RemoveFromWorld() RemoveAllControlled(); if(m_NotifyListPos >= 0) - { GetMap()->RemoveUnitFromNotify(this, m_NotifyListPos); - m_NotifyListPos = -1; - } if(GetCharmerGUID()) { @@ -15186,7 +15183,7 @@ void Unit::SendThreatListUpdate() { if (uint32 count = getThreatManager().getThreatList().size()) { - sLog.outDebug( "WORLD: Send SMSG_THREAT_UPDATE Message" ); + //sLog.outDebug( "WORLD: Send SMSG_THREAT_UPDATE Message" ); WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8); data.append(GetPackGUID()); data << uint32(count); diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 3b32eefcda7..57a2058e95c 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -387,6 +387,7 @@ void WorldSession::LogoutPlayer(bool Save) // the player may not be in the world when logging out // e.g if he got disconnected during a transfer to another map // calls to GetMap in this case may cause crashes + _player->CleanupsBeforeDelete(); Map* _map = _player->GetMap(); _map->Remove(_player, true); _player = NULL; // deleted in Remove call |
