mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10758] Fixed typo in CONTROLED_*
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
b20b3e5ade
commit
07c48c77c9
6 changed files with 37 additions and 37 deletions
|
|
@ -2359,7 +2359,7 @@ void Player::SetGameMaster(bool on)
|
|||
setFaction(35);
|
||||
SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
|
||||
|
||||
CallForAllControlledUnits(SetGameMasterOnHelper(), CONTROLED_PET|CONTROLED_TOTEMS|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(SetGameMasterOnHelper(), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
|
||||
SetFFAPvP(false);
|
||||
ResetContestedPvP();
|
||||
|
|
@ -2379,7 +2379,7 @@ void Player::SetGameMaster(bool on)
|
|||
setFactionForRace(getRace());
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
|
||||
|
||||
CallForAllControlledUnits(SetGameMasterOffHelper(getFaction()), CONTROLED_PET|CONTROLED_TOTEMS|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(SetGameMasterOffHelper(getFaction()), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
|
||||
// restore FFA PvP Server state
|
||||
if(sWorld.IsFFAPvPRealm())
|
||||
|
|
@ -20628,7 +20628,7 @@ struct UpdateZoneDependentPetsHelper
|
|||
void Player::UpdateZoneDependentPets()
|
||||
{
|
||||
// check pet (permanent pets ignored), minipet, guardians (including protector)
|
||||
CallForAllControlledUnits(UpdateZoneDependentPetsHelper(this, m_zoneUpdateId, m_areaUpdateId), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_MINIPET);
|
||||
CallForAllControlledUnits(UpdateZoneDependentPetsHelper(this, m_zoneUpdateId, m_areaUpdateId), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_MINIPET);
|
||||
}
|
||||
|
||||
uint32 Player::GetCorpseReclaimDelay(bool pvp) const
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ namespace MaNGOS
|
|||
float i_radius;
|
||||
SpellTargets i_TargetType;
|
||||
WorldObject* i_originalCaster;
|
||||
bool i_playerControled;
|
||||
bool i_playerControlled;
|
||||
|
||||
SpellNotifierCreatureAndPlayer(Spell &spell, std::list<Unit*> &data, float radius, SpellNotifyPushType type,
|
||||
SpellTargets TargetType = SPELL_TARGETS_NOT_FRIENDLY, WorldObject* originalCaster = NULL)
|
||||
|
|
@ -698,7 +698,7 @@ namespace MaNGOS
|
|||
{
|
||||
if (!i_originalCaster)
|
||||
i_originalCaster = i_spell.GetAffectiveCasterObject();
|
||||
i_playerControled = i_originalCaster ? i_originalCaster->IsControlledByPlayer() : false;
|
||||
i_playerControlled = i_originalCaster ? i_originalCaster->IsControlledByPlayer() : false;
|
||||
}
|
||||
|
||||
template<class T> inline void Visit(GridRefManager<T> &m)
|
||||
|
|
@ -740,7 +740,7 @@ namespace MaNGOS
|
|||
if (itr->getSource()->GetTypeId()==TYPEID_UNIT && ((Creature*)itr->getSource())->IsTotem())
|
||||
continue;
|
||||
|
||||
if (i_playerControled)
|
||||
if (i_playerControlled)
|
||||
{
|
||||
if (i_originalCaster->IsFriendlyTo( itr->getSource() ))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1032,7 +1032,7 @@ void Aura::ReapplyAffectedPassiveAuras()
|
|||
ReapplyAffectedPassiveAuras(GetTarget(), true);
|
||||
|
||||
// re-apply talents/passives/area auras applied to pet/totems (it affected by player spellmods)
|
||||
GetTarget()->CallForAllControlledUnits(ReapplyAffectedPassiveAurasHelper(this), CONTROLED_PET|CONTROLED_TOTEMS);
|
||||
GetTarget()->CallForAllControlledUnits(ReapplyAffectedPassiveAurasHelper(this), CONTROLLED_PET|CONTROLLED_TOTEMS);
|
||||
|
||||
// re-apply talents/passives/area auras applied to group members (it affected by player spellmods)
|
||||
if (Group* group = ((Player*)GetTarget())->GetGroup())
|
||||
|
|
|
|||
|
|
@ -5702,7 +5702,7 @@ struct CombatStopWithPetsHelper
|
|||
void Unit::CombatStopWithPets(bool includingCast)
|
||||
{
|
||||
CombatStop(includingCast);
|
||||
CallForAllControlledUnits(CombatStopWithPetsHelper(includingCast), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(CombatStopWithPetsHelper(includingCast), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
}
|
||||
|
||||
struct IsAttackingPlayerHelper
|
||||
|
|
@ -5716,7 +5716,7 @@ bool Unit::isAttackingPlayer() const
|
|||
if(hasUnitState(UNIT_STAT_ATTACK_PLAYER))
|
||||
return true;
|
||||
|
||||
return CheckAllControlledUnits(IsAttackingPlayerHelper(), CONTROLED_PET|CONTROLED_TOTEMS|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
return CheckAllControlledUnits(IsAttackingPlayerHelper(), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAttackers()
|
||||
|
|
@ -8093,7 +8093,7 @@ struct UpdateWalkModeHelper
|
|||
void Unit::UpdateWalkMode(Unit* source, bool self)
|
||||
{
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
CallForAllControlledUnits(UpdateWalkModeHelper(source), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_CHARM|CONTROLED_MINIPET);
|
||||
CallForAllControlledUnits(UpdateWalkModeHelper(source), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM|CONTROLLED_MINIPET);
|
||||
else if (self)
|
||||
{
|
||||
bool on = source->GetTypeId() == TYPEID_PLAYER
|
||||
|
|
@ -8112,7 +8112,7 @@ void Unit::UpdateWalkMode(Unit* source, bool self)
|
|||
}
|
||||
}
|
||||
else
|
||||
CallForAllControlledUnits(UpdateWalkModeHelper(source), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_CHARM|CONTROLED_MINIPET);
|
||||
CallForAllControlledUnits(UpdateWalkModeHelper(source), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM|CONTROLLED_MINIPET);
|
||||
}
|
||||
|
||||
void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
|
||||
|
|
@ -8361,7 +8361,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate, bool forced)
|
|||
SendMessageToSet( &data, true );
|
||||
}
|
||||
|
||||
CallForAllControlledUnits(SetSpeedRateHelper(mtype,forced), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_CHARM|CONTROLED_MINIPET);
|
||||
CallForAllControlledUnits(SetSpeedRateHelper(mtype,forced), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM|CONTROLLED_MINIPET);
|
||||
}
|
||||
|
||||
void Unit::SetHover(bool on)
|
||||
|
|
@ -10511,7 +10511,7 @@ void Unit::SetPvP( bool state )
|
|||
else
|
||||
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
|
||||
|
||||
CallForAllControlledUnits(SetPvPHelper(state), CONTROLED_PET|CONTROLED_TOTEMS|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(SetPvPHelper(state), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
}
|
||||
|
||||
struct SetFFAPvPHelper
|
||||
|
|
@ -10528,7 +10528,7 @@ void Unit::SetFFAPvP( bool state )
|
|||
else
|
||||
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
|
||||
CallForAllControlledUnits(SetFFAPvPHelper(state), CONTROLED_PET|CONTROLED_TOTEMS|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(SetFFAPvPHelper(state), CONTROLLED_PET|CONTROLLED_TOTEMS|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
}
|
||||
|
||||
void Unit::KnockBackFrom(Unit* target, float horizontalSpeed, float verticalSpeed)
|
||||
|
|
@ -10690,7 +10690,7 @@ void Unit::StopAttackFaction(uint32 faction_id)
|
|||
|
||||
getHostileRefManager().deleteReferencesForFaction(faction_id);
|
||||
|
||||
CallForAllControlledUnits(StopAttackFactionHelper(faction_id), CONTROLED_PET|CONTROLED_GUARDIANS|CONTROLED_CHARM);
|
||||
CallForAllControlledUnits(StopAttackFactionHelper(faction_id), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM);
|
||||
}
|
||||
|
||||
void Unit::CleanupDeletedAuras()
|
||||
|
|
|
|||
|
|
@ -1111,13 +1111,13 @@ struct CharmInfo
|
|||
};
|
||||
|
||||
// used in CallForAllControlledUnits/CheckAllControlledUnits
|
||||
enum ControledUnitMask
|
||||
enum ControlledUnitMask
|
||||
{
|
||||
CONTROLED_PET = 0x01,
|
||||
CONTROLED_MINIPET = 0x02,
|
||||
CONTROLED_GUARDIANS = 0x04, // including PROTECTOR_PET
|
||||
CONTROLED_CHARM = 0x08,
|
||||
CONTROLED_TOTEMS = 0x10,
|
||||
CONTROLLED_PET = 0x01,
|
||||
CONTROLLED_MINIPET = 0x02,
|
||||
CONTROLLED_GUARDIANS = 0x04, // including PROTECTOR_PET
|
||||
CONTROLLED_CHARM = 0x08,
|
||||
CONTROLLED_TOTEMS = 0x10,
|
||||
};
|
||||
|
||||
// for clearing special attacks
|
||||
|
|
@ -1566,9 +1566,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
void _RemoveTotem(Totem* totem); // only for call from Totem class
|
||||
|
||||
template<typename Func>
|
||||
void CallForAllControlledUnits(Func const& func, uint32 controledMask);
|
||||
void CallForAllControlledUnits(Func const& func, uint32 controlledMask);
|
||||
template<typename Func>
|
||||
bool CheckAllControlledUnits(Func const& func, uint32 controledMask) const;
|
||||
bool CheckAllControlledUnits(Func const& func, uint32 controlledMask) const;
|
||||
|
||||
bool AddSpellAuraHolder(SpellAuraHolder *holder);
|
||||
void AddAuraToModList(Aura *aura);
|
||||
|
|
@ -2027,50 +2027,50 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
};
|
||||
|
||||
template<typename Func>
|
||||
void Unit::CallForAllControlledUnits(Func const& func, uint32 controledMask)
|
||||
void Unit::CallForAllControlledUnits(Func const& func, uint32 controlledMask)
|
||||
{
|
||||
if (controledMask & CONTROLED_PET)
|
||||
if (controlledMask & CONTROLLED_PET)
|
||||
if (Pet* pet = GetPet())
|
||||
func(pet);
|
||||
|
||||
if (controledMask & CONTROLED_MINIPET)
|
||||
if (controlledMask & CONTROLLED_MINIPET)
|
||||
if (Unit* mini = GetMiniPet())
|
||||
func(mini);
|
||||
|
||||
if (controledMask & CONTROLED_GUARDIANS)
|
||||
if (controlledMask & CONTROLLED_GUARDIANS)
|
||||
{
|
||||
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
if (Pet* guardian = _GetPet(*(itr++)))
|
||||
func(guardian);
|
||||
}
|
||||
|
||||
if (controledMask & CONTROLED_TOTEMS)
|
||||
if (controlledMask & CONTROLLED_TOTEMS)
|
||||
{
|
||||
for (int i = 0; i < MAX_TOTEM_SLOT; ++i)
|
||||
if (Unit *totem = _GetTotem(TotemSlot(i)))
|
||||
func(totem);
|
||||
}
|
||||
|
||||
if (controledMask & CONTROLED_CHARM)
|
||||
if (controlledMask & CONTROLLED_CHARM)
|
||||
if (Unit* charm = GetCharm())
|
||||
func(charm);
|
||||
}
|
||||
|
||||
|
||||
template<typename Func>
|
||||
bool Unit::CheckAllControlledUnits(Func const& func, uint32 controledMask) const
|
||||
bool Unit::CheckAllControlledUnits(Func const& func, uint32 controlledMask) const
|
||||
{
|
||||
if (controledMask & CONTROLED_PET)
|
||||
if (controlledMask & CONTROLLED_PET)
|
||||
if (Pet const* pet = GetPet())
|
||||
if (func(pet))
|
||||
return true;
|
||||
|
||||
if (controledMask & CONTROLED_MINIPET)
|
||||
if (controlledMask & CONTROLLED_MINIPET)
|
||||
if(Unit const* mini = GetMiniPet())
|
||||
if (func(mini))
|
||||
return true;
|
||||
|
||||
if (controledMask & CONTROLED_GUARDIANS)
|
||||
if (controlledMask & CONTROLLED_GUARDIANS)
|
||||
{
|
||||
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end();)
|
||||
if (Pet const* guardian = _GetPet(*(itr++)))
|
||||
|
|
@ -2079,7 +2079,7 @@ bool Unit::CheckAllControlledUnits(Func const& func, uint32 controledMask) const
|
|||
|
||||
}
|
||||
|
||||
if (controledMask & CONTROLED_TOTEMS)
|
||||
if (controlledMask & CONTROLLED_TOTEMS)
|
||||
{
|
||||
for (int i = 0; i < MAX_TOTEM_SLOT; ++i)
|
||||
if (Unit const* totem = _GetTotem(TotemSlot(i)))
|
||||
|
|
@ -2087,7 +2087,7 @@ bool Unit::CheckAllControlledUnits(Func const& func, uint32 controledMask) const
|
|||
return true;
|
||||
}
|
||||
|
||||
if (controledMask & CONTROLED_CHARM)
|
||||
if (controlledMask & CONTROLLED_CHARM)
|
||||
if (Unit const* charm = GetCharm())
|
||||
if (func(charm))
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10757"
|
||||
#define REVISION_NR "10758"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue