Prevent players from gaining rest state in hostile capital zones.
Fix a bug where PvP status never resets when not moving to another zone. Reset PvP status at Taxi node end/worldport when moving into friendly territory. --HG-- branch : trunk
This commit is contained in:
@@ -179,6 +179,9 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
// honorless target
|
||||
if (GetPlayer()->pvpInfo.inHostileArea)
|
||||
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
|
||||
// in friendly area
|
||||
else if (GetPlayer()->IsPvP() && !GetPlayer()->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_IN_PVP))
|
||||
GetPlayer()->UpdatePvP(false, false);
|
||||
|
||||
// resummon pet
|
||||
GetPlayer()->ResummonPetTemporaryUnSummonedIfAny();
|
||||
@@ -227,6 +230,9 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
|
||||
// honorless target
|
||||
if (plMover->pvpInfo.inHostileArea)
|
||||
plMover->CastSpell(plMover, 2479, true);
|
||||
// in friendly area
|
||||
else if (plMover->IsPvP() && !plMover->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_IN_PVP))
|
||||
plMover->UpdatePvP(false, false);
|
||||
}
|
||||
|
||||
// resummon pet
|
||||
|
||||
Reference in New Issue
Block a user