[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
This commit is contained in:
megamage
2008-10-31 21:42:00 -05:00
parent 1c3d4c40c3
commit e2eb694c57
14 changed files with 313 additions and 303 deletions

View File

@@ -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);
}