mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 10:37:02 +00:00
[12059] Add grid searcher for OPvP Capture Points
Might be based on work of original OPvP authors Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
6de10526cc
commit
acffb0de4c
5 changed files with 46 additions and 19 deletions
|
|
@ -6695,6 +6695,15 @@ void Player::UpdateArea(uint32 newArea)
|
|||
UpdateAreaDependentAuras();
|
||||
}
|
||||
|
||||
bool Player::CanUseOutdoorCapturePoint()
|
||||
{
|
||||
return CanUseCapturePoint() &&
|
||||
(IsPvP() || sWorld.IsPvPRealm()) &&
|
||||
!HasMovementFlag(MOVEFLAG_FLYING) &&
|
||||
!IsTaxiFlying() &&
|
||||
!isGameMaster();
|
||||
}
|
||||
|
||||
void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
{
|
||||
AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone);
|
||||
|
|
@ -21476,24 +21485,19 @@ bool Player::CanUseBattleGroundObject()
|
|||
// TODO : some spells gives player ForceReaction to one faction (ReputationMgr::ApplyForceReaction)
|
||||
// maybe gameobject code should handle that ForceReaction usage
|
||||
// BUG: sometimes when player clicks on flag in AB - client won't send gameobject_use, only gameobject_report_use packet
|
||||
return ( //InBattleGround() && // in battleground - not need, check in other cases
|
||||
//!IsMounted() && - not correct, player is dismounted when he clicks on flag
|
||||
//player cannot use object when he is invulnerable (immune)
|
||||
!isTotalImmune() && // not totally immune
|
||||
//i'm not sure if these two are correct, because invisible players should get visible when they click on flag
|
||||
!HasStealthAura() && // not stealthed
|
||||
!HasInvisibilityAura() && // not invisible
|
||||
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, EFFECT_INDEX_0) &&// can't pickup
|
||||
isAlive() // live player
|
||||
);
|
||||
return (isAlive() && // living
|
||||
// the following two are incorrect, because invisible/stealthed players should get visible when they click on flag
|
||||
!HasStealthAura() && // not stealthed
|
||||
!HasInvisibilityAura() && // visible
|
||||
!isTotalImmune() && // vulnerable (not immune)
|
||||
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, EFFECT_INDEX_0));
|
||||
}
|
||||
|
||||
bool Player::CanCaptureTowerPoint()
|
||||
bool Player::CanUseCapturePoint()
|
||||
{
|
||||
return ( !HasStealthAura() && // not stealthed
|
||||
!HasInvisibilityAura() && // not invisible
|
||||
isAlive() // live player
|
||||
);
|
||||
return (isAlive() && // living
|
||||
!HasStealthAura() && // not stealthed
|
||||
!HasInvisibilityAura()); // visible
|
||||
}
|
||||
|
||||
uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, uint32 newskintone)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue