The Frozen Halls Sanctuary Fix

Problem: The Frozen Halls don’t have sanctuary status. Even if it is shown as sanctuary, PvP is available in that area. Direct Spells/Attacks can’t damage player but DoT spells can even kill them.

Tested: Not yet.

Suggested Fix:

[CODE]# HG changeset patch

Parent 449384f0cecb9b9410df459a563bb8665e152d2e

imported patch area-sanctuary-fix

diff -r 449384f0cecb -r 889440e73ab0 src/server/game/Entities/Player/Player.cpp

— a/src/server/game/Entities/Player/Player.cpp Thu Nov 04 14:02:00 2010 +0600

+++ b/src/server/game/Entities/Player/Player.cpp Thu Nov 04 23:57:51 2010 +0600

@@ -7056,6 +7056,17 @@

m_areaUpdateId = newArea;

AreaTableEntry const* area = GetAreaEntryByAreaID(newArea);

  • if (area->IsSanctuary()) // in sanctuary

  • {

  • SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);

  • pvpInfo.inNoPvPArea = true;

  • CombatStopWithPets();

  • }

  • else

  • {

  • pvpInfo.inNoPvPArea = false;

  • RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);

  • }

pvpInfo.inFFAPvPArea = area && (area->flags & AREA_FLAG_ARENA);

UpdatePvPState(true);[/CODE]

Has anyone tested the patch??

I use my version and work perfect.

[CODE]From 101b97625e32897d9c44417e467bffeafbcc3903 Mon Sep 17 00:00:00 2001

From: Vlad [email protected]

Date: Wed, 12 Jan 2011 21:30:13 +0200

Subject: [PATCH 3/3] Fix area sanctuary


src/server/game/Entities/Player/Player.cpp | 14 ++++++++++±–

1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp

index a662af4…a1b0e22 100755

— a/src/server/game/Entities/Player/Player.cpp

+++ b/src/server/game/Entities/Player/Player.cpp

@@ -7191,6 +7191,15 @@ void Player::UpdateArea(uint32 newArea)

 pvpInfo.inFFAPvPArea = area && (area->flags & AREA_FLAG_ARENA);

 UpdatePvPState(true);
  • if (area && area->IsSanctuary()) // in sanctuary

  • {

  •    SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
    
  •    pvpInfo.inNoPvPArea = true;
    
  •    CombatStopWithPets();
    
  • }

  • else

  •    RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
    
 UpdateAreaDependentAuras(newArea);

}

@@ -7206,9 +7215,6 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)

 m_zoneUpdateId    = newZone;

 m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
  • // zone changed, so area changed as well, update it

  • UpdateArea(newArea);

 AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone);

 if (!zone)

     return;

@@ -7287,6 +7293,8 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)

     }

 }
  • // zone changed, so area changed as well, update it

  • UpdateArea(newArea);

    UpdatePvPState();

    // remove items with area/map limitations (delete only for alive player to allow back in ghost mode)

1.6.5.1.1367.gcd48[/CODE]