mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10066] Some tuning in consts.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
d967af6549
commit
7dd5456401
5 changed files with 9 additions and 9 deletions
|
|
@ -17595,7 +17595,7 @@ void Player::RemoveMiniPet()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Pet* Player::GetMiniPet()
|
Pet* Player::GetMiniPet() const
|
||||||
{
|
{
|
||||||
if (!m_miniPet)
|
if (!m_miniPet)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
|
|
@ -1189,7 +1189,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
|
|
||||||
void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false);
|
void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false);
|
||||||
void RemoveMiniPet();
|
void RemoveMiniPet();
|
||||||
Pet* GetMiniPet();
|
Pet* GetMiniPet() const;
|
||||||
void SetMiniPet(Pet* pet) { m_miniPet = pet->GetGUID(); }
|
void SetMiniPet(Pet* pet) { m_miniPet = pet->GetGUID(); }
|
||||||
|
|
||||||
template<typename Func>
|
template<typename Func>
|
||||||
|
|
@ -2716,7 +2716,7 @@ template<typename Func>
|
||||||
bool Player::CheckAllControlledUnits(Func const& func, bool withTotems, bool withGuardians, bool withCharms, bool withMiniPet) const
|
bool Player::CheckAllControlledUnits(Func const& func, bool withTotems, bool withGuardians, bool withCharms, bool withMiniPet) const
|
||||||
{
|
{
|
||||||
if (withMiniPet)
|
if (withMiniPet)
|
||||||
if(Unit* mini = GetMiniPet())
|
if(Unit const* mini = GetMiniPet())
|
||||||
if (func(mini))
|
if (func(mini))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8549,7 +8549,7 @@ void Unit::CombatStopWithPets(bool includingCast)
|
||||||
struct IsAttackingPlayerHelper
|
struct IsAttackingPlayerHelper
|
||||||
{
|
{
|
||||||
explicit IsAttackingPlayerHelper() {}
|
explicit IsAttackingPlayerHelper() {}
|
||||||
bool operator()(Unit* unit) const { return unit->isAttackingPlayer(); }
|
inline bool operator()(Unit const* unit) const { return unit->isAttackingPlayer(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
bool Unit::isAttackingPlayer() const
|
bool Unit::isAttackingPlayer() const
|
||||||
|
|
|
||||||
|
|
@ -1950,14 +1950,14 @@ void Unit::CallForAllControlledUnits(Func const& func, bool withTotems, bool wit
|
||||||
template<typename Func>
|
template<typename Func>
|
||||||
bool Unit::CheckAllControlledUnits(Func const& func, bool withTotems, bool withGuardians, bool withCharms) const
|
bool Unit::CheckAllControlledUnits(Func const& func, bool withTotems, bool withGuardians, bool withCharms) const
|
||||||
{
|
{
|
||||||
if (Pet* pet = GetPet())
|
if (Pet const* pet = GetPet())
|
||||||
if (func(pet))
|
if (func(pet))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (withGuardians)
|
if (withGuardians)
|
||||||
{
|
{
|
||||||
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
for(GuardianPetList::const_iterator itr = m_guardianPets.begin(); itr != m_guardianPets.end(); ++itr)
|
||||||
if (Unit* guardian = Unit::GetUnit(*this,*itr))
|
if (Unit const* guardian = Unit::GetUnit(*this,*itr))
|
||||||
if (func(guardian))
|
if (func(guardian))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
@ -1966,13 +1966,13 @@ bool Unit::CheckAllControlledUnits(Func const& func, bool withTotems, bool withG
|
||||||
if (withTotems)
|
if (withTotems)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_TOTEM_SLOT; ++i)
|
for (int i = 0; i < MAX_TOTEM_SLOT; ++i)
|
||||||
if (Unit *totem = _GetTotem(TotemSlot(i)))
|
if (Unit const* totem = _GetTotem(TotemSlot(i)))
|
||||||
if (func(totem))
|
if (func(totem))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withCharms)
|
if (withCharms)
|
||||||
if(Unit* charm = GetCharm())
|
if(Unit const* charm = GetCharm())
|
||||||
if (func(charm))
|
if (func(charm))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10065"
|
#define REVISION_NR "10066"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue