mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
chore(Core/Unit): Correct typo of Controlled. (#22260)
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
int32 PetAI::Permissible(Creature const* creature)
|
||||
{
|
||||
if (creature->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if (creature->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
{
|
||||
if (reinterpret_cast<Guardian const*>(creature)->GetOwner()->IsPlayer())
|
||||
return PERMIT_BASE_PROACTIVE;
|
||||
|
||||
@@ -2590,7 +2590,7 @@ bool Creature::_IsTargetAcceptable(Unit const* target) const
|
||||
void Creature::UpdateMoveInLineOfSightState()
|
||||
{
|
||||
// xinef: pets, guardians and units with scripts / smartAI should be skipped
|
||||
if (IsPet() || HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) ||
|
||||
if (IsPet() || HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) ||
|
||||
GetScriptId() || GetAIName() == "SmartAI")
|
||||
{
|
||||
m_moveInLineOfSightStrictlyDisabled = false;
|
||||
|
||||
@@ -422,7 +422,7 @@ Guardian::Guardian(SummonPropertiesEntry const* properties, ObjectGuid owner, bo
|
||||
m_unitTypeMask |= UNIT_MASK_GUARDIAN;
|
||||
if (properties && (properties->Type == SUMMON_TYPE_PET || properties->Category == SUMMON_CATEGORY_PET))
|
||||
{
|
||||
m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN;
|
||||
m_unitTypeMask |= UNIT_MASK_CONTROLLABLE_GUARDIAN;
|
||||
InitCharmInfo();
|
||||
}
|
||||
}
|
||||
@@ -435,7 +435,7 @@ void Guardian::InitStats(uint32 duration)
|
||||
{
|
||||
InitStatsForLevel(m_owner->GetLevel());
|
||||
|
||||
if (m_owner->IsPlayer() && HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if (m_owner->IsPlayer() && HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
m_charmInfo->InitCharmCreateSpells();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ Pet::Pet(Player* owner, PetType type) : Guardian(nullptr, owner ? owner->GetGUID
|
||||
if (type == HUNTER_PET)
|
||||
m_unitTypeMask |= UNIT_MASK_HUNTER_PET;
|
||||
|
||||
if (!(m_unitTypeMask & UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if (!(m_unitTypeMask & UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
{
|
||||
m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN;
|
||||
m_unitTypeMask |= UNIT_MASK_CONTROLLABLE_GUARDIAN;
|
||||
InitCharmInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ void Unit::Update(uint32 p_time)
|
||||
SendThreatListUpdate();
|
||||
|
||||
// update combat timer only for players and pets (only pets with PetAI)
|
||||
if (IsInCombat() && (IsPlayer() || ((IsPet() || HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) && IsControlledByPlayer())))
|
||||
if (IsInCombat() && (IsPlayer() || ((IsPet() || HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN)) && IsControlledByPlayer())))
|
||||
{
|
||||
// Check UNIT_STATE_MELEE_ATTACKING or UNIT_STATE_CHASE (without UNIT_STATE_FOLLOW in this case) so pets can reach far away
|
||||
// targets without stopping half way there and running off.
|
||||
@@ -10776,7 +10776,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
|
||||
}
|
||||
}
|
||||
|
||||
if (minion->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if (minion->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
{
|
||||
AddGuidValue(UNIT_FIELD_SUMMON, minion->GetGUID());
|
||||
}
|
||||
@@ -10871,7 +10871,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
|
||||
}
|
||||
ASSERT((*itr)->IsCreature());
|
||||
|
||||
if (!(*itr)->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if (!(*itr)->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
continue;
|
||||
|
||||
if (AddGuidValue(UNIT_FIELD_SUMMON, (*itr)->GetGUID()))
|
||||
@@ -11686,7 +11686,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
int32 DoneTotal = 0;
|
||||
float DoneTotalMod = TotalMod ? TotalMod : SpellPctDamageModsDone(victim, spellProto, damagetype);
|
||||
|
||||
// Config : RATE_CREATURE_X_SPELLDAMAGE & Do Not Modify Pet/Guardian/Mind Controled Damage
|
||||
// Config : RATE_CREATURE_X_SPELLDAMAGE & Do Not Modify Pet/Guardian/Mind Controlled Damage
|
||||
if (IsCreature() && (!ToCreature()->IsPet() || !ToCreature()->IsGuardian() || !ToCreature()->IsControlledByPlayer()))
|
||||
DoneTotalMod *= ToCreature()->GetSpellDamageMod(ToCreature()->GetCreatureTemplate()->rank);
|
||||
|
||||
@@ -14681,7 +14681,7 @@ bool Unit::CanHaveThreatList(bool skipAliveCheck) const
|
||||
return false;
|
||||
|
||||
// summons can not have a threat list, unless they are controlled by a creature
|
||||
if (HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) && ((Pet*)this)->GetOwnerGUID().IsPlayer())
|
||||
if (HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) && ((Pet*)this)->GetOwnerGUID().IsPlayer())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -14837,7 +14837,7 @@ Unit* Creature::SelectVictim()
|
||||
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
|
||||
// Note: creature does not have targeted movement generator but has attacker in this case
|
||||
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
||||
if ((*itr) && CanCreatureAttack(*itr) && !(*itr)->IsPlayer() && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
if ((*itr) && CanCreatureAttack(*itr) && !(*itr)->IsPlayer() && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
return nullptr;
|
||||
|
||||
if (GetVehicle())
|
||||
@@ -19980,11 +19980,11 @@ void Unit::StopAttackingInvalidTarget()
|
||||
attacker->ToPlayer()->SendAttackSwingCancelAttack();
|
||||
}
|
||||
|
||||
for (Unit* controled : attacker->m_Controlled)
|
||||
for (Unit* controlled : attacker->m_Controlled)
|
||||
{
|
||||
if (controled->GetVictim() == this && !controled->IsValidAttackTarget(this))
|
||||
if (controlled->GetVictim() == this && !controlled->IsValidAttackTarget(this))
|
||||
{
|
||||
controled->AttackStop();
|
||||
controlled->AttackStop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -743,7 +743,7 @@ public:
|
||||
// Unit type methods
|
||||
[[nodiscard]] bool IsSummon() const { return m_unitTypeMask & UNIT_MASK_SUMMON; }
|
||||
[[nodiscard]] bool IsGuardian() const { return m_unitTypeMask & UNIT_MASK_GUARDIAN; }
|
||||
[[nodiscard]] bool IsControllableGuardian() const { return m_unitTypeMask & UNIT_MASK_CONTROLABLE_GUARDIAN; }
|
||||
[[nodiscard]] bool IsControllableGuardian() const { return m_unitTypeMask & UNIT_MASK_CONTROLLABLE_GUARDIAN; }
|
||||
[[nodiscard]] bool IsPet() const { return m_unitTypeMask & UNIT_MASK_PET; }
|
||||
[[nodiscard]] bool IsHunterPet() const { return m_unitTypeMask & UNIT_MASK_HUNTER_PET; }
|
||||
[[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; }
|
||||
|
||||
@@ -161,7 +161,7 @@ enum UnitTypeMask
|
||||
UNIT_MASK_VEHICLE = 0x00000020,
|
||||
UNIT_MASK_PUPPET = 0x00000040,
|
||||
UNIT_MASK_HUNTER_PET = 0x00000080,
|
||||
UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100,
|
||||
UNIT_MASK_CONTROLLABLE_GUARDIAN = 0x00000100,
|
||||
UNIT_MASK_ACCESSORY = 0x00000200
|
||||
};
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
|
||||
pet->setDeathState(DeathState::Corpse);
|
||||
}
|
||||
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN))
|
||||
{
|
||||
pet->ToTempSummon()->UnSummon();
|
||||
}
|
||||
|
||||
@@ -3580,7 +3580,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
// That's Abominable
|
||||
ApplySpellFix({ 59565 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_0].MiscValueB = 1721; // controlable guardian
|
||||
spellInfo->Effects[EFFECT_0].MiscValueB = 1721; // controllable guardian
|
||||
});
|
||||
|
||||
// Investigate the Blue Recluse (1920)
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
// apply ICC buff to pets/summons
|
||||
if (GetData(DATA_BUFF_AVAILABLE) && creature->GetOwnerGUID().IsPlayer() && creature->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN) && creature->CanHaveThreatList())
|
||||
if (GetData(DATA_BUFF_AVAILABLE) && creature->GetOwnerGUID().IsPlayer() && creature->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLLABLE_GUARDIAN) && creature->CanHaveThreatList())
|
||||
if (Unit* owner = creature->GetOwner())
|
||||
if (Player* plr = owner->ToPlayer())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user