* Better solution to No Fly zones by Spp, closes #4

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-02 20:30:25 -08:00
parent 43d8b1b7b9
commit ffb28c06a7
7 changed files with 9 additions and 5 deletions
-3
View File
@@ -307,10 +307,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
{
plMover->HandleFall(movementInfo);
_player->RemoveAurasByType(SPELL_AURA_FEATHER_FALL);
}
if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
{
+1
View File
@@ -37,6 +37,7 @@ void OutdoorPvPNR::HandlePlayerEnterZone(Player * plr, uint32 zone)
{
plr->CastSpell(plr, SPELL_NOFLYZONE, true);
ChatHandler(plr).PSendSysMessage(LANG_ZONE_NOFLYZONE);
plr->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
}
OutdoorPvP::HandlePlayerEnterZone(plr, zone);
}
+1
View File
@@ -21177,6 +21177,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
DEBUG_LOG("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.z, height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
}
}
RemoveAura(61243); // No fly zone - Parachute
}
void Player::UpdateAchievementCriteria( AchievementCriteriaTypes type, uint32 miscvalue1/*=0*/, uint32 miscvalue2/*=0*/, Unit *unit/*=NULL*/, uint32 time/*=0*/ )
+1 -1
View File
@@ -3350,7 +3350,7 @@ void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real, bool /*changeAmoun
float ground_Z = caster->GetMap()->GetVmapHeight(x, y, z, true);
if (fabs(ground_Z - z) < 0.1f)
{
m_target->RemoveAurasByType(SPELL_AURA_FEATHER_FALL);
m_target->RemoveAura(GetId());
return;
}
}
+1
View File
@@ -955,6 +955,7 @@ void OPvPWintergrasp::HandlePlayerEnterZone(Player * plr, uint32 zone)
{
plr->CastSpell(plr, SPELL_NOFLYZONE_WG, true);
ChatHandler(plr).PSendSysMessage(LANG_ZONE_NOFLYZONE);
plr->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
}
if (!isWarTime())