mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Merge branch 'master' into 310
Conflicts: src/game/Unit.cpp
This commit is contained in:
commit
14e9afa46f
43 changed files with 4445 additions and 271 deletions
|
|
@ -2404,7 +2404,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
SetUInt32Value(PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE,0);
|
||||
for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
{
|
||||
SetFloatValue(UNIT_FIELD_POWER_COST_MODIFIER+i,0.0f);
|
||||
SetUInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,0);
|
||||
SetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+i,0.0f);
|
||||
}
|
||||
// Reset no reagent cost field
|
||||
|
|
@ -18969,14 +18969,17 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
|
|||
|
||||
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
|
||||
//i'm not sure if these two are correct, because invisible players should get visible when they click 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, 0) && // can't pickup
|
||||
//TODO player cannot use object when he is invulnerable (immune) - (ice block, divine shield, divine protection, divine intervention ...)
|
||||
isAlive() // live player
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue