diff options
author | megamage <none@none> | 2008-10-31 21:42:00 -0500 |
---|---|---|
committer | megamage <none@none> | 2008-10-31 21:42:00 -0500 |
commit | e2eb694c57885e49f37c328b899d802e1ff4ea90 (patch) | |
tree | 7259333552fadf2bd67414c70e85b3cf3bd797c0 /src/game/Map.cpp | |
parent | 1c3d4c40c3fef1eec9d1c8438254e97cdcef063a (diff) |
[svn] Improve TargetedMovement (TODO: let mob find "near angle" rather than "random angle").
Delete a repeated check in instance canenter().
Fix some spell targets.
Add some sunwell spell sql.
Fix Magtheridons earthquake. (TODO: need to find out why soul transfer has no effect when casted by mobs)
Let Brutallus dual wield. Enable burn (still no script effect).
Quick fix for shadowmoon valley illidan quest crash (wait for author's fix).
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 04d7e028479..87bd6344c38 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1419,13 +1419,6 @@ InstanceMap::~InstanceMap() */ bool InstanceMap::CanEnter(Player *player) { - if(!player->isGameMaster() && i_data && i_data->IsEncounterInProgress()) - { - sLog.outDebug("InstanceMap::CanEnter - Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName()); - player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); - return false; - } - if(std::find(i_Players.begin(),i_Players.end(),player)!=i_Players.end()) { sLog.outError("InstanceMap::CanEnter - player %s(%u) already in map %d,%d,%d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); @@ -1444,12 +1437,19 @@ bool InstanceMap::CanEnter(Player *player) // cannot enter while players in the instance are in combat Group *pGroup = player->GetGroup(); - if(pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId()) + if(!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId()) { player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); return false; } + /*if(!player->isGameMaster() && i_data && i_data->IsEncounterInProgress()) + { + sLog.outDebug("InstanceMap::CanEnter - Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName()); + player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); + return false; + }*/ + return Map::CanEnter(player); } |