Skip to content

Commit

Permalink
[11569] Remove recently added area switch time duel check.
Browse files Browse the repository at this point in the history
Only duel start expected to be limited by area.
Duel end controlled only distance/map and outOfBound timer
  • Loading branch information
VladimirMangos committed May 30, 2011
1 parent 0725864 commit c6fc395
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
12 changes: 0 additions & 12 deletions src/game/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6791,9 +6791,6 @@ void Player::UpdateArea(uint32 newArea)

if (area)
{
// check leave duel allowed area
CheckDuelArea(area);

// Dalaran restricted flight zone
if ((area->flags & AREA_FLAG_CANNOT_FLY) && IsFreeFlying() && !isGameMaster() && !HasAura(58600))
CastSpell(this, 58600, true); // Restricted Flight Area
Expand Down Expand Up @@ -6900,15 +6897,6 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
UpdateZoneDependentPets();
}

void Player::CheckDuelArea(AreaTableEntry const* areaEntry)
{
if (!duel)
return;

if (!(areaEntry->flags & AREA_FLAG_DUEL))
DuelComplete(DUEL_FLED);
}

//If players are too far way of duel flag... then player loose the duel
void Player::CheckDuelDistance(time_t currTime)
{
Expand Down
1 change: 0 additions & 1 deletion src/game/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,6 @@ class MANGOS_DLL_SPEC Player : public Unit
DuelInfo *duel;
bool IsInDuelWith(Player const* player) const { return duel && duel->opponent == player && duel->startTime != 0; }
void UpdateDuelFlag(time_t currTime);
void CheckDuelArea(AreaTableEntry const* areaEntry);
void CheckDuelDistance(time_t currTime);
void DuelComplete(DuelCompleteType type);
void SendDuelCountdown(uint32 counter);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11568"
#define REVISION_NR "11569"
#endif // __REVISION_NR_H__

0 comments on commit c6fc395

Please sign in to comment.