fix(Core/Misc): Change const to be after type name (#10591)
This commit is contained in:
parent
9b83abca39
commit
455899dc75
168 changed files with 438 additions and 438 deletions
|
|
@ -26,7 +26,7 @@
|
|||
// AggressorAI
|
||||
/////////////////
|
||||
|
||||
int AggressorAI::Permissible(const Creature* creature)
|
||||
int AggressorAI::Permissible(Creature const* creature)
|
||||
{
|
||||
// have some hostile factions, it will be selected by IsHostileTo check at MoveInLineOfSight
|
||||
if (!creature->IsCivilian() && !creature->IsNeutralToAll())
|
||||
|
|
@ -226,7 +226,7 @@ TurretAI::TurretAI(Creature* c) : CreatureAI(c)
|
|||
me->m_SightDistance = me->m_CombatDistance;
|
||||
}
|
||||
|
||||
bool TurretAI::CanAIAttack(const Unit* /*who*/) const
|
||||
bool TurretAI::CanAIAttack(Unit const* /*who*/) const
|
||||
{
|
||||
// TODO: use one function to replace it
|
||||
if (!me->IsWithinCombatRange(me->GetVictim(), me->m_CombatDistance)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public:
|
|||
explicit AggressorAI(Creature* c) : CreatureAI(c) {}
|
||||
|
||||
void UpdateAI(uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
static int Permissible(Creature const*);
|
||||
};
|
||||
|
||||
typedef std::vector<uint32> SpellVct;
|
||||
|
|
@ -83,7 +83,7 @@ struct TurretAI : public CreatureAI
|
|||
{
|
||||
public:
|
||||
explicit TurretAI(Creature* c);
|
||||
bool CanAIAttack(const Unit* who) const override;
|
||||
bool CanAIAttack(Unit const* who) const override;
|
||||
void AttackStart(Unit* who) override;
|
||||
void UpdateAI(uint32 diff) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include "GameObjectAI.h"
|
||||
|
||||
//GameObjectAI::GameObjectAI(GameObject* g) : go(g) {}
|
||||
int GameObjectAI::Permissible(const GameObject* go)
|
||||
int GameObjectAI::Permissible(GameObject const* go)
|
||||
{
|
||||
if (go->GetAIName() == "GameObjectAI")
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
|
||||
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
|
||||
virtual void EventInform(uint32 /*eventId*/) {}
|
||||
virtual void SpellHit(Unit* /*unit*/, const SpellInfo* /*spellInfo*/) {}
|
||||
virtual void SpellHit(Unit* /*unit*/, SpellInfo const* /*spellInfo*/) {}
|
||||
virtual bool CanBeSeen(Player const* /*seer*/) { return true; }
|
||||
|
||||
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) { }
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public:
|
|||
void AttackStart(Unit*) override {}
|
||||
void UpdateAI(uint32) override;
|
||||
|
||||
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
|
||||
static int Permissible(Creature const*) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class PossessedAI : public CreatureAI
|
||||
|
|
@ -46,7 +46,7 @@ public:
|
|||
void JustDied(Unit*) override;
|
||||
void KilledUnit(Unit* victim) override;
|
||||
|
||||
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
|
||||
static int Permissible(Creature const*) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class NullCreatureAI : public CreatureAI
|
||||
|
|
@ -60,7 +60,7 @@ public:
|
|||
void EnterEvadeMode() override {}
|
||||
void OnCharmed(bool /*apply*/) override {}
|
||||
|
||||
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
|
||||
static int Permissible(Creature const*) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class CritterAI : public PassiveAI
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "SpellMgr.h"
|
||||
#include "Util.h"
|
||||
|
||||
int PetAI::Permissible(const Creature* creature)
|
||||
int PetAI::Permissible(Creature const* creature)
|
||||
{
|
||||
if (creature->IsPet())
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
|
|
@ -567,7 +567,7 @@ void PetAI::HandleReturnMovement()
|
|||
me->ClearInPetCombat();
|
||||
}
|
||||
|
||||
void PetAI::SpellHit(Unit* caster, const SpellInfo* spellInfo)
|
||||
void PetAI::SpellHit(Unit* caster, SpellInfo const* spellInfo)
|
||||
{
|
||||
// Xinef: taunt behavior code
|
||||
if (spellInfo->HasAura(SPELL_AURA_MOD_TAUNT) && !me->HasReactState(REACT_PASSIVE))
|
||||
|
|
@ -653,7 +653,7 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
|
|||
}
|
||||
}
|
||||
|
||||
bool PetAI::CanAttack(Unit* target, const SpellInfo* spellInfo)
|
||||
bool PetAI::CanAttack(Unit* target, SpellInfo const* spellInfo)
|
||||
{
|
||||
// Evaluates wether a pet can attack a specific target based on CommandState, ReactState and other flags
|
||||
// IMPORTANT: The order in which things are checked is important, be careful if you add or remove checks
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
explicit PetAI(Creature* c);
|
||||
|
||||
void UpdateAI(uint32) override;
|
||||
static int Permissible(const Creature*);
|
||||
static int Permissible(Creature const*);
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override;
|
||||
void AttackStart(Unit* target) override;
|
||||
|
|
@ -65,7 +65,7 @@ public:
|
|||
void MoveInLineOfSight(Unit* /*who*/) override {} // CreatureAI interferes with returning pets
|
||||
void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
|
||||
void EnterEvadeMode() override {} // For fleeing, pets don't use this type of Evade mechanic
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override;
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override;
|
||||
|
||||
void PetStopAttack() override;
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ private:
|
|||
Unit* SelectNextTarget(bool allowAutoSelect) const;
|
||||
void HandleReturnMovement();
|
||||
void DoAttack(Unit* target, bool chase);
|
||||
bool CanAttack(Unit* target, const SpellInfo* spellInfo = nullptr);
|
||||
bool CanAttack(Unit* target, SpellInfo const* spellInfo = nullptr);
|
||||
void ClearCharmInfoFlags();
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include "CreatureAIImpl.h"
|
||||
#include "Errors.h"
|
||||
|
||||
int ReactorAI::Permissible(const Creature* creature)
|
||||
int ReactorAI::Permissible(Creature const* creature)
|
||||
{
|
||||
if (creature->IsCivilian() || creature->IsNeutralToAll())
|
||||
return PERMIT_BASE_REACTIVE;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,6 @@ public:
|
|||
void MoveInLineOfSight(Unit*) override {}
|
||||
void UpdateAI(uint32 diff) override;
|
||||
|
||||
static int Permissible(const Creature*);
|
||||
static int Permissible(Creature const*);
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ TotemAI::TotemAI(Creature* c) : CreatureAI(c)
|
|||
ASSERT(c->IsTotem());
|
||||
}
|
||||
|
||||
void TotemAI::SpellHit(Unit* /*caster*/, const SpellInfo* /*spellInfo*/)
|
||||
void TotemAI::SpellHit(Unit* /*caster*/, SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public:
|
|||
void MoveInLineOfSight(Unit* who) override;
|
||||
void AttackStart(Unit* victim) override;
|
||||
void EnterEvadeMode() override;
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* /*spellInfo*/) override;
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spellInfo*/) override;
|
||||
void DoAction(int32 param) override;
|
||||
|
||||
void UpdateAI(uint32 diff) override;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ void UnitAI::DoCast(uint32 spellId)
|
|||
break;
|
||||
case AITARGET_ENEMY:
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER);
|
||||
//float range = GetSpellMaxRange(spellInfo, false);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, spellInfo->GetMaxRange(false), playerOnly);
|
||||
|
|
@ -163,7 +163,7 @@ void UnitAI::DoCast(uint32 spellId)
|
|||
break;
|
||||
case AITARGET_DEBUFF:
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER);
|
||||
float range = spellInfo->GetMaxRange(false);
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ void UnitAI::FillAISpellInfo()
|
|||
AISpellInfo = new AISpellInfoType[sSpellMgr->GetSpellInfoStoreSize()];
|
||||
|
||||
AISpellInfoType* AIInfo = AISpellInfo;
|
||||
const SpellInfo* spellInfo;
|
||||
SpellInfo const* spellInfo;
|
||||
|
||||
for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i, ++AIInfo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ enum class SelectTargetMethod
|
|||
// default predicate function to select target based on distance, player and/or aura criteria
|
||||
struct DefaultTargetSelector : public Acore::unary_function<Unit*, bool>
|
||||
{
|
||||
const Unit* me;
|
||||
Unit const* me;
|
||||
float m_dist;
|
||||
bool m_playerOnly;
|
||||
int32 m_aura;
|
||||
|
|
@ -167,7 +167,7 @@ struct FarthestTargetSelector : public Acore::unary_function<Unit*, bool>
|
|||
}
|
||||
|
||||
private:
|
||||
const Unit* _me;
|
||||
Unit const* _me;
|
||||
float _dist;
|
||||
bool _playerOnly;
|
||||
bool _inLos;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct CreatureAIFactory : public SelectableAI
|
|||
|
||||
CreatureAI* Create(void*) const;
|
||||
|
||||
int Permit(const Creature* c) const { return REAL_AI::Permissible(c); }
|
||||
int Permit(Creature const* c) const { return REAL_AI::Permissible(c); }
|
||||
};
|
||||
|
||||
template<class REAL_AI>
|
||||
|
|
@ -61,7 +61,7 @@ struct GameObjectAIFactory : public SelectableGameObjectAI
|
|||
|
||||
GameObjectAI* Create(void*) const;
|
||||
|
||||
int Permit(const GameObject* g) const { return REAL_GO_AI::Permissible(g); }
|
||||
int Permit(GameObject const* g) const { return REAL_GO_AI::Permissible(g); }
|
||||
};
|
||||
|
||||
template<class REAL_GO_AI>
|
||||
|
|
|
|||
|
|
@ -698,7 +698,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
|
|||
}
|
||||
}
|
||||
|
||||
bool SmartAI::CanAIAttack(const Unit* /*who*/) const
|
||||
bool SmartAI::CanAIAttack(Unit const* /*who*/) const
|
||||
{
|
||||
if (me->GetReactState() == REACT_PASSIVE)
|
||||
return false;
|
||||
|
|
@ -754,7 +754,7 @@ void SmartAI::JustRespawned()
|
|||
mFollowArrivedAlive = true;
|
||||
}
|
||||
|
||||
int SmartAI::Permissible(const Creature* creature)
|
||||
int SmartAI::Permissible(Creature const* creature)
|
||||
{
|
||||
if (creature->GetAIName() == "SmartAI")
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
|
|
@ -832,12 +832,12 @@ void SmartAI::AttackStart(Unit* who)
|
|||
}
|
||||
}
|
||||
|
||||
void SmartAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
|
||||
void SmartAI::SpellHit(Unit* unit, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
void SmartAI::SpellHitTarget(Unit* target, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT_TARGET, target, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
|
@ -1101,7 +1101,7 @@ void SmartGameObjectAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
|
|||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
|
||||
}
|
||||
|
||||
int SmartGameObjectAI::Permissible(const GameObject* g)
|
||||
int SmartGameObjectAI::Permissible(GameObject const* g)
|
||||
{
|
||||
if (g->GetAIName() == "SmartGameObjectAI")
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
|
|
@ -1199,7 +1199,7 @@ void SmartGameObjectAI::EventInform(uint32 eventId)
|
|||
GetScript()->ProcessEventsFor(SMART_EVENT_GO_EVENT_INFORM, nullptr, eventId);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
|
||||
void SmartGameObjectAI::SpellHit(Unit* unit, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,10 +101,10 @@ public:
|
|||
void MoveInLineOfSight(Unit* who) override;
|
||||
|
||||
// Called when hit by a spell
|
||||
void SpellHit(Unit* unit, const SpellInfo* spellInfo) override;
|
||||
void SpellHit(Unit* unit, SpellInfo const* spellInfo) override;
|
||||
|
||||
// Called when spell hits a target
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override;
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override;
|
||||
|
||||
// Called at any Damage from any attacker (before damage apply)
|
||||
void DamageTaken(Unit* done_by, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override;
|
||||
|
|
@ -146,7 +146,7 @@ public:
|
|||
void OnCharmed(bool apply) override;
|
||||
|
||||
// Called when victim is in line of sight
|
||||
bool CanAIAttack(const Unit* who) const override;
|
||||
bool CanAIAttack(Unit const* who) const override;
|
||||
|
||||
// Used in scripts to share variables
|
||||
void DoAction(int32 param = 0) override;
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
ObjectGuid GetGUID(int32 id = 0) const override;
|
||||
|
||||
//core related
|
||||
static int32 Permissible(const Creature*);
|
||||
static int32 Permissible(Creature const*);
|
||||
|
||||
// Called at movepoint reached
|
||||
void MovepointReached(uint32 id);
|
||||
|
|
@ -258,7 +258,7 @@ public:
|
|||
void InitializeAI() override;
|
||||
void Reset() override;
|
||||
SmartScript* GetScript() { return &mScript; }
|
||||
static int32 Permissible(const GameObject* g);
|
||||
static int32 Permissible(GameObject const* g);
|
||||
|
||||
bool GossipHello(Player* player, bool reportUse) override;
|
||||
bool GossipSelect(Player* player, uint32 sender, uint32 action) override;
|
||||
|
|
@ -271,7 +271,7 @@ public:
|
|||
void OnGameEvent(bool start, uint16 eventId) override;
|
||||
void OnStateChanged(uint32 state, Unit* unit) override;
|
||||
void EventInform(uint32 eventId) override;
|
||||
void SpellHit(Unit* unit, const SpellInfo* spellInfo) override;
|
||||
void SpellHit(Unit* unit, SpellInfo const* spellInfo) override;
|
||||
|
||||
// Called when a summoned unit dies
|
||||
void SummonedCreatureDies(Creature* summon, Unit* killer) override;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void SmartScript::OnReset()
|
|||
RestoreCasterMaxDist();
|
||||
}
|
||||
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
|
||||
{
|
||||
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
|
||||
{
|
||||
|
|
@ -116,7 +116,7 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
|
|||
}
|
||||
}
|
||||
|
||||
void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
|
||||
{
|
||||
//calc random
|
||||
if (e.GetEventType() != SMART_EVENT_LINK && e.event.event_chance < 100 && e.event.event_chance)
|
||||
|
|
@ -3410,7 +3410,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
}
|
||||
}
|
||||
|
||||
void SmartScript::ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
void SmartScript::ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
|
||||
{
|
||||
// xinef: extended by selfs victim
|
||||
ConditionList const conds = sConditionMgr->GetConditionsForSmartEvent(e.entryOrGuid, e.event_id, e.source_type);
|
||||
|
|
@ -4016,7 +4016,7 @@ ObjectList* SmartScript::GetWorldObjectsInDist(float dist)
|
|||
return targets;
|
||||
}
|
||||
|
||||
void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
|
||||
{
|
||||
if (!e.active && e.GetEventType() != SMART_EVENT_LINK)
|
||||
return;
|
||||
|
|
@ -4928,7 +4928,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at)
|
|||
// Xinef: if smartcast combat move flag is present
|
||||
if (i->GetActionType() == SMART_ACTION_CAST && (i->action.cast.flags & SMARTCAST_COMBAT_MOVE))
|
||||
{
|
||||
if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(i->action.cast.spell))
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i->action.cast.spell))
|
||||
{
|
||||
float maxRange = spellInfo->GetMaxRange(spellInfo->IsPositive());
|
||||
float minRange = spellInfo->GetMinRange(spellInfo->IsPositive());
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@ public:
|
|||
void GetScript();
|
||||
void FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger const* at);
|
||||
|
||||
void ProcessEventsFor(SMART_EVENT e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessEvent(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessEventsFor(SMART_EVENT e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, SpellInfo const* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessEvent(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, SpellInfo const* spell = nullptr, GameObject* gob = nullptr);
|
||||
bool CheckTimer(SmartScriptHolder const& e) const;
|
||||
void RecalcTimer(SmartScriptHolder& e, uint32 min, uint32 max);
|
||||
void UpdateTimer(SmartScriptHolder& e, uint32 const diff);
|
||||
void InitTimer(SmartScriptHolder& e);
|
||||
void ProcessAction(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, const SpellInfo* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessAction(SmartScriptHolder& e, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, SpellInfo const* spell = nullptr, GameObject* gob = nullptr);
|
||||
void ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit = nullptr, uint32 var0 = 0, uint32 var1 = 0, bool bvar = false, SpellInfo const* spell = nullptr, GameObject* gob = nullptr);
|
||||
ObjectList* GetTargets(SmartScriptHolder const& e, Unit* invoker = nullptr);
|
||||
ObjectList* GetWorldObjectsInDist(float dist);
|
||||
void InstallTemplate(SmartScriptHolder const& e);
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
|
|||
return !target->HealthAbovePct(health.percent);
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD:
|
||||
if (target && !target->IsAlive())
|
||||
if (const Player* player = target->ToPlayer())
|
||||
if (Player const* player = target->ToPlayer())
|
||||
if (player->GetDeathTimer() != 0)
|
||||
// flag set == must be same team, not set == different team
|
||||
return (player->GetTeamId() == source->GetTeamId()) == (player_dead.own_team_flag != 0);
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ bool ArenaSpectator::ShouldSendAura(Aura* aura, uint8 effMask, ObjectGuid target
|
|||
}
|
||||
|
||||
template<>
|
||||
AC_GAME_API void ArenaSpectator::SendPacketTo(const Player* player, std::string&& message)
|
||||
AC_GAME_API void ArenaSpectator::SendPacketTo(Player const* player, std::string&& message)
|
||||
{
|
||||
WorldPacket data;
|
||||
CreatePacket(data, message);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace ArenaSpectator
|
|||
if (!targetGUID.IsPlayer())
|
||||
return;
|
||||
|
||||
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(id))
|
||||
if (SpellInfo const* si = sSpellMgr->GetSpellInfo(id))
|
||||
if (si->SpellIconID == 1)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -848,13 +848,13 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
|||
|
||||
if (propRefID < 0)
|
||||
{
|
||||
const ItemRandomSuffixEntry* itemRandEntry = sItemRandomSuffixStore.LookupEntry(-item->GetItemRandomPropertyId());
|
||||
ItemRandomSuffixEntry const* itemRandEntry = sItemRandomSuffixStore.LookupEntry(-item->GetItemRandomPropertyId());
|
||||
if (itemRandEntry)
|
||||
suffix = &itemRandEntry->Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
const ItemRandomPropertiesEntry* itemRandEntry = sItemRandomPropertiesStore.LookupEntry(item->GetItemRandomPropertyId());
|
||||
ItemRandomPropertiesEntry const* itemRandEntry = sItemRandomPropertiesStore.LookupEntry(item->GetItemRandomPropertyId());
|
||||
if (itemRandEntry)
|
||||
suffix = &itemRandEntry->Name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2308,7 +2308,7 @@ void Creature::CallForHelp(float radius, Unit* target /*= nullptr*/)
|
|||
Cell::VisitGridObjects(this, worker, radius);
|
||||
}
|
||||
|
||||
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const
|
||||
bool Creature::CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction /*= true*/) const
|
||||
{
|
||||
// is it true?
|
||||
if (!HasReactState(REACT_AGGRESSIVE))
|
||||
|
|
@ -2368,7 +2368,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
|||
|
||||
// use this function to avoid having hostile creatures attack
|
||||
// friendlies and other mobs they shouldn't attack
|
||||
bool Creature::_IsTargetAcceptable(const Unit* target) const
|
||||
bool Creature::_IsTargetAcceptable(Unit const* target) const
|
||||
{
|
||||
ASSERT(target);
|
||||
|
||||
|
|
@ -2385,8 +2385,8 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
|
|||
return false;
|
||||
}
|
||||
|
||||
const Unit* myVictim = getAttackerForHelper();
|
||||
const Unit* targetVictim = target->getAttackerForHelper();
|
||||
Unit const* myVictim = getAttackerForHelper();
|
||||
Unit const* targetVictim = target->getAttackerForHelper();
|
||||
|
||||
// if I'm already fighting target, or I'm hostile towards the target, the target is acceptable
|
||||
if (myVictim == target || targetVictim == this || IsHostileTo(target))
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ public:
|
|||
void SetNoCallAssistance(bool val) { m_AlreadyCallAssistance = val; }
|
||||
void SetNoSearchAssistance(bool val) { m_AlreadySearchedAssistance = val; }
|
||||
bool HasSearchedAssistance() { return m_AlreadySearchedAssistance; }
|
||||
bool CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction = true) const;
|
||||
bool _IsTargetAcceptable(const Unit* target) const;
|
||||
bool CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction = true) const;
|
||||
bool _IsTargetAcceptable(Unit const* target) const;
|
||||
[[nodiscard]] bool CanIgnoreFeignDeath() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH) != 0; }
|
||||
|
||||
// pussywizard: updated at faction change, disable move in line of sight if actual faction is not hostile to anyone
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ bool Item::CanBeTraded(bool mail, bool trade) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Item::HasEnchantRequiredSkill(const Player* player) const
|
||||
bool Item::HasEnchantRequiredSkill(Player const* player) const
|
||||
{
|
||||
// Check all enchants for required skill
|
||||
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public:
|
|||
void SetInTrade(bool b = true) { mb_in_trade = b; }
|
||||
[[nodiscard]] bool IsInTrade() const { return mb_in_trade; }
|
||||
|
||||
bool HasEnchantRequiredSkill(const Player* player) const;
|
||||
bool HasEnchantRequiredSkill(Player const* player) const;
|
||||
[[nodiscard]] uint32 GetEnchantRequiredLevel() const;
|
||||
|
||||
bool IsFitToSpellRequirements(SpellInfo const* spellInfo) const;
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ InstanceScript* WorldObject::GetInstanceScript() const
|
|||
return map->IsDungeon() ? map->ToInstanceMap()->GetInstanceScript() : nullptr;
|
||||
}
|
||||
|
||||
float WorldObject::GetDistanceZ(const WorldObject* obj) const
|
||||
float WorldObject::GetDistanceZ(WorldObject const* obj) const
|
||||
{
|
||||
float dz = std::fabs(GetPositionZ() - obj->GetPositionZ());
|
||||
float sizefactor = GetObjectSize() + obj->GetObjectSize();
|
||||
|
|
@ -1238,7 +1238,7 @@ Position WorldObject::GetHitSpherePointFor(Position const& dest) const
|
|||
return Position(contactPoint.x, contactPoint.y, contactPoint.z, GetAngle(contactPoint.x, contactPoint.y));
|
||||
}
|
||||
|
||||
float WorldObject::GetDistance(const WorldObject* obj) const
|
||||
float WorldObject::GetDistance(WorldObject const* obj) const
|
||||
{
|
||||
float d = GetExactDist(obj) - GetObjectSize() - obj->GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
|
|
@ -1256,7 +1256,7 @@ float WorldObject::GetDistance(const WorldObject* obj) const
|
|||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
|
||||
float WorldObject::GetDistance2d(const WorldObject* obj) const
|
||||
float WorldObject::GetDistance2d(WorldObject const* obj) const
|
||||
{
|
||||
float d = GetExactDist2d(obj) - GetObjectSize() - obj->GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
|
|
@ -1268,7 +1268,7 @@ float WorldObject::GetDistance2d(const WorldObject* obj) const
|
|||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
|
||||
bool WorldObject::IsSelfOrInSameMap(const WorldObject* obj) const
|
||||
bool WorldObject::IsSelfOrInSameMap(WorldObject const* obj) const
|
||||
{
|
||||
if (this == obj)
|
||||
{
|
||||
|
|
@ -1278,7 +1278,7 @@ bool WorldObject::IsSelfOrInSameMap(const WorldObject* obj) const
|
|||
return IsInMap(obj);
|
||||
}
|
||||
|
||||
bool WorldObject::IsInMap(const WorldObject* obj) const
|
||||
bool WorldObject::IsInMap(WorldObject const* obj) const
|
||||
{
|
||||
if (obj)
|
||||
{
|
||||
|
|
@ -1340,7 +1340,7 @@ bool WorldObject::IsWithinLOS(float ox, float oy, float oz, LineOfSightChecks ch
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WorldObject::IsWithinLOSInMap(const WorldObject* obj, LineOfSightChecks checks) const
|
||||
bool WorldObject::IsWithinLOSInMap(WorldObject const* obj, LineOfSightChecks checks) const
|
||||
{
|
||||
if (!IsInMap(obj))
|
||||
return false;
|
||||
|
|
@ -1463,7 +1463,7 @@ bool WorldObject::IsInRange3d(float x, float y, float z, float minRange, float m
|
|||
return distsq < maxdist * maxdist;
|
||||
}
|
||||
|
||||
bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size) const
|
||||
bool WorldObject::IsInBetween(WorldObject const* obj1, WorldObject const* obj2, float size) const
|
||||
{
|
||||
if (!obj1 || !obj2)
|
||||
return false;
|
||||
|
|
@ -1665,7 +1665,7 @@ float WorldObject::GetVisibilityRange() const
|
|||
return IsInWintergrasp() ? VISIBILITY_DIST_WINTERGRASP : GetMap()->GetVisibilityRange();
|
||||
}
|
||||
|
||||
float WorldObject::GetSightRange(const WorldObject* target) const
|
||||
float WorldObject::GetSightRange(WorldObject const* target) const
|
||||
{
|
||||
if (ToUnit())
|
||||
{
|
||||
|
|
@ -1756,7 +1756,7 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
|||
|
||||
// pussywizard: arena spectator
|
||||
if (obj->GetTypeId() == TYPEID_PLAYER)
|
||||
if (((const Player*)obj)->IsSpectator() && ((const Player*)obj)->FindMap()->IsBattleArena())
|
||||
if (((Player const*)obj)->IsSpectator() && ((Player const*)obj)->FindMap()->IsBattleArena())
|
||||
return false;
|
||||
|
||||
bool corpseVisibility = false;
|
||||
|
|
@ -1841,7 +1841,7 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
|||
|
||||
// pussywizard: arena spectator
|
||||
if (this->GetTypeId() == TYPEID_PLAYER)
|
||||
if (((const Player*)this)->IsSpectator() && ((const Player*)this)->FindMap()->IsBattleArena() && (obj->m_invisibility.GetFlags() || obj->m_stealth.GetFlags()))
|
||||
if (((Player const*)this)->IsSpectator() && ((Player const*)this)->FindMap()->IsBattleArena() && (obj->m_invisibility.GetFlags() || obj->m_stealth.GetFlags()))
|
||||
return false;
|
||||
|
||||
if (!CanDetect(obj, ignoreStealth, !distanceCheck, checkAlert))
|
||||
|
|
@ -1859,10 +1859,10 @@ bool WorldObject::CanNeverSee(WorldObject const* obj) const
|
|||
|
||||
bool WorldObject::CanDetect(WorldObject const* obj, bool ignoreStealth, bool checkClient, bool checkAlert) const
|
||||
{
|
||||
const WorldObject* seer = this;
|
||||
WorldObject const* seer = this;
|
||||
|
||||
// Pets don't have detection, they use the detection of their masters
|
||||
if (const Unit* thisUnit = ToUnit())
|
||||
if (Unit const* thisUnit = ToUnit())
|
||||
if (Unit* controller = thisUnit->GetCharmerOrOwner())
|
||||
seer = controller;
|
||||
|
||||
|
|
@ -2619,7 +2619,7 @@ void WorldObject::GetVoidClosePoint(float& x, float& y, float& z, float size, fl
|
|||
GetNearPoint(nullptr, x, y, z, size, distance2d, GetOrientation() + relAngle, controlZ);
|
||||
}
|
||||
|
||||
bool WorldObject::GetClosePoint(float& x, float& y, float& z, float size, float distance2d, float angle, const WorldObject* forWho, bool force) const
|
||||
bool WorldObject::GetClosePoint(float& x, float& y, float& z, float size, float distance2d, float angle, WorldObject const* forWho, bool force) const
|
||||
{
|
||||
// angle calculated from current orientation
|
||||
GetNearPoint(forWho, x, y, z, size, distance2d, GetOrientation() + angle);
|
||||
|
|
@ -2630,7 +2630,7 @@ bool WorldObject::GetClosePoint(float& x, float& y, float& z, float size, float
|
|||
y = this->GetPositionY();
|
||||
z = this->GetPositionZ();
|
||||
if (forWho)
|
||||
if (const Unit* u = forWho->ToUnit())
|
||||
if (Unit const* u = forWho->ToUnit())
|
||||
u->UpdateAllowedPositionZ(x, y, z);
|
||||
}
|
||||
float maxDist = GetObjectSize() + size + distance2d + 1.0f;
|
||||
|
|
@ -2662,7 +2662,7 @@ Position WorldObject::GetRandomNearPosition(float radius)
|
|||
return pos;
|
||||
}
|
||||
|
||||
void WorldObject::GetContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d) const
|
||||
void WorldObject::GetContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d) const
|
||||
{
|
||||
// angle to face `obj` to `this` using distance includes size of `obj`
|
||||
GetNearPoint(obj, x, y, z, obj->GetObjectSize(), distance2d, GetAngle(obj));
|
||||
|
|
@ -2677,7 +2677,7 @@ void WorldObject::GetContactPoint(const WorldObject* obj, float& x, float& y, fl
|
|||
}
|
||||
}
|
||||
|
||||
void WorldObject::GetChargeContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d) const
|
||||
void WorldObject::GetChargeContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d) const
|
||||
{
|
||||
// angle to face `obj` to `this` using distance includes size of `obj`
|
||||
GetNearPoint(obj, x, y, z, obj->GetObjectSize(), distance2d, GetAngle(obj));
|
||||
|
|
|
|||
|
|
@ -185,9 +185,9 @@ public:
|
|||
[[nodiscard]] Creature const* ToCreature() const { if (GetTypeId() == TYPEID_UNIT) return (Creature const*)((Creature*)this); else return nullptr; }
|
||||
|
||||
Unit* ToUnit() { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Unit*>(this); else return nullptr; }
|
||||
[[nodiscard]] Unit const* ToUnit() const { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return (const Unit*)((Unit*)this); else return nullptr; }
|
||||
[[nodiscard]] Unit const* ToUnit() const { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return (Unit const*)((Unit*)this); else return nullptr; }
|
||||
GameObject* ToGameObject() { if (GetTypeId() == TYPEID_GAMEOBJECT) return reinterpret_cast<GameObject*>(this); else return nullptr; }
|
||||
[[nodiscard]] GameObject const* ToGameObject() const { if (GetTypeId() == TYPEID_GAMEOBJECT) return (const GameObject*)((GameObject*)this); else return nullptr; }
|
||||
[[nodiscard]] GameObject const* ToGameObject() const { if (GetTypeId() == TYPEID_GAMEOBJECT) return (GameObject const*)((GameObject*)this); else return nullptr; }
|
||||
|
||||
Corpse* ToCorpse() { if (GetTypeId() == TYPEID_CORPSE) return reinterpret_cast<Corpse*>(this); else return nullptr; }
|
||||
[[nodiscard]] Corpse const* ToCorpse() const { if (GetTypeId() == TYPEID_CORPSE) return (const Corpse*)((Corpse*)this); else return nullptr; }
|
||||
|
|
@ -392,7 +392,7 @@ public:
|
|||
void GetNearPoint2D(float& x, float& y, float distance, float absAngle, Position const* startPos = nullptr) const;
|
||||
void GetNearPoint(WorldObject const* searcher, float& x, float& y, float& z, float searcher_size, float distance2d, float absAngle, float controlZ = 0, Position const* startPos = nullptr) const;
|
||||
void GetVoidClosePoint(float& x, float& y, float& z, float size, float distance2d = 0, float relAngle = 0, float controlZ = 0) const;
|
||||
bool GetClosePoint(float& x, float& y, float& z, float size, float distance2d = 0, float angle = 0, const WorldObject* forWho = nullptr, bool force = false) const;
|
||||
bool GetClosePoint(float& x, float& y, float& z, float size, float distance2d = 0, float angle = 0, WorldObject const* forWho = nullptr, bool force = false) const;
|
||||
void MovePosition(Position& pos, float dist, float angle);
|
||||
Position GetNearPosition(float dist, float angle);
|
||||
void MovePositionToFirstCollision(Position& pos, float dist, float angle);
|
||||
|
|
@ -401,8 +401,8 @@ public:
|
|||
Position GetFirstCollisionPosition(float dist, float angle);
|
||||
Position GetRandomNearPosition(float radius);
|
||||
|
||||
void GetContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;
|
||||
void GetChargeContactPoint(const WorldObject* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;
|
||||
void GetContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;
|
||||
void GetChargeContactPoint(WorldObject const* obj, float& x, float& y, float& z, float distance2d = CONTACT_DISTANCE) const;
|
||||
|
||||
[[nodiscard]] float GetObjectSize() const;
|
||||
|
||||
|
|
@ -433,15 +433,15 @@ public:
|
|||
|
||||
[[nodiscard]] virtual std::string const& GetNameForLocaleIdx(LocaleConstant /*locale_idx*/) const { return m_name; }
|
||||
|
||||
float GetDistance(const WorldObject* obj) const;
|
||||
float GetDistance(WorldObject const* obj) const;
|
||||
[[nodiscard]] float GetDistance(const Position& pos) const;
|
||||
[[nodiscard]] float GetDistance(float x, float y, float z) const;
|
||||
float GetDistance2d(const WorldObject* obj) const;
|
||||
float GetDistance2d(WorldObject const* obj) const;
|
||||
[[nodiscard]] float GetDistance2d(float x, float y) const;
|
||||
float GetDistanceZ(const WorldObject* obj) const;
|
||||
float GetDistanceZ(WorldObject const* obj) const;
|
||||
|
||||
bool IsSelfOrInSameMap(const WorldObject* obj) const;
|
||||
bool IsInMap(const WorldObject* obj) const;
|
||||
bool IsSelfOrInSameMap(WorldObject const* obj) const;
|
||||
bool IsInMap(WorldObject const* obj) const;
|
||||
[[nodiscard]] bool IsWithinDist3d(float x, float y, float z, float dist) const;
|
||||
bool IsWithinDist3d(const Position* pos, float dist) const;
|
||||
[[nodiscard]] bool IsWithinDist2d(float x, float y, float dist) const;
|
||||
|
|
@ -460,7 +460,7 @@ public:
|
|||
bool isInFront(WorldObject const* target, float arc = M_PI) const;
|
||||
bool isInBack(WorldObject const* target, float arc = M_PI) const;
|
||||
|
||||
bool IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size = 0) const;
|
||||
bool IsInBetween(WorldObject const* obj1, WorldObject const* obj2, float size = 0) const;
|
||||
|
||||
virtual void CleanupsBeforeDelete(bool finalCleanup = true); // used in destructor or explicitly before mass creature delete to remove cross-references to already deleted units
|
||||
|
||||
|
|
@ -481,7 +481,7 @@ public:
|
|||
|
||||
[[nodiscard]] float GetGridActivationRange() const;
|
||||
[[nodiscard]] float GetVisibilityRange() const;
|
||||
virtual float GetSightRange(const WorldObject* target = nullptr) const;
|
||||
virtual float GetSightRange(WorldObject const* target = nullptr) const;
|
||||
//bool CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false) const;
|
||||
bool CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false, bool checkAlert = false) const;
|
||||
|
||||
|
|
@ -663,13 +663,13 @@ namespace Acore
|
|||
class ObjectDistanceOrderPred
|
||||
{
|
||||
public:
|
||||
ObjectDistanceOrderPred(const WorldObject* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {}
|
||||
bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
|
||||
ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {}
|
||||
bool operator()(WorldObject const* pLeft, WorldObject const* pRight) const
|
||||
{
|
||||
return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight);
|
||||
}
|
||||
private:
|
||||
const WorldObject* m_refObj;
|
||||
WorldObject const* m_refObj;
|
||||
const bool m_ascending;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ void Pet::AddToWorld()
|
|||
SpellAreaForAreaMapBounds saBounds = sSpellMgr->GetSpellAreaForAreaMapBounds(4812);
|
||||
for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if ((itr->second->raceMask & plr->getRaceMask()) && !HasAura(itr->second->spellId))
|
||||
if (const SpellInfo* si = sSpellMgr->GetSpellInfo(itr->second->spellId))
|
||||
if (SpellInfo const* si = sSpellMgr->GetSpellInfo(itr->second->spellId))
|
||||
if (si->HasAura(SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT))
|
||||
AddAura(itr->second->spellId, this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3063,7 +3063,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
|
|||
return false;
|
||||
//ABORT();
|
||||
}
|
||||
else if (const SpellInfo* learnSpell = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell))
|
||||
else if (SpellInfo const* learnSpell = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell))
|
||||
_addSpell(learnSpell->Id, SPEC_MASK_ALL, true);
|
||||
}
|
||||
|
||||
|
|
@ -3679,7 +3679,7 @@ bool Player::resetTalents(bool noResetCost)
|
|||
|
||||
// xinef: check if talent learns spell to spell book
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(itr->second->talentID);
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
|
||||
bool removed = false;
|
||||
if (talentInfo->addToSpellBook)
|
||||
|
|
@ -7504,7 +7504,7 @@ void Player::_ApplyAmmoBonuses()
|
|||
UpdateDamagePhysical(RANGED_ATTACK);
|
||||
}
|
||||
|
||||
bool Player::CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const
|
||||
bool Player::CheckAmmoCompatibility(ItemTemplate const* ammo_proto) const
|
||||
{
|
||||
if (!ammo_proto)
|
||||
return false;
|
||||
|
|
@ -9569,7 +9569,7 @@ class SpellModPred
|
|||
{
|
||||
public:
|
||||
SpellModPred() {}
|
||||
bool operator() (const SpellModifier* a, const SpellModifier* b) const
|
||||
bool operator() (SpellModifier const* a, SpellModifier const* b) const
|
||||
{
|
||||
if (a->type != b->type)
|
||||
return a->type == SPELLMOD_FLAT;
|
||||
|
|
@ -9580,7 +9580,7 @@ class MageSpellModPred
|
|||
{
|
||||
public:
|
||||
MageSpellModPred() {}
|
||||
bool operator() (const SpellModifier* a, const SpellModifier* b) const
|
||||
bool operator() (SpellModifier const* a, SpellModifier const* b) const
|
||||
{
|
||||
if (a->type != b->type)
|
||||
return a->type == SPELLMOD_FLAT;
|
||||
|
|
@ -9722,7 +9722,7 @@ void Player::RemoveSpellMods(Spell* spell)
|
|||
if (spell->m_appliedMods.empty())
|
||||
return;
|
||||
|
||||
const SpellInfo* const spellInfo = spell->m_spellInfo;
|
||||
SpellInfo const* const spellInfo = spell->m_spellInfo;
|
||||
|
||||
for (uint8 i = 0; i < MAX_SPELLMOD; ++i)
|
||||
{
|
||||
|
|
@ -9747,7 +9747,7 @@ void Player::RemoveSpellMods(Spell* spell)
|
|||
// MAGE T8P4 BONUS
|
||||
if( spellInfo->SpellFamilyName == SPELLFAMILY_MAGE )
|
||||
{
|
||||
const SpellInfo* sp = mod->ownerAura->GetSpellInfo();
|
||||
SpellInfo const* sp = mod->ownerAura->GetSpellInfo();
|
||||
// Missile Barrage, Hot Streak, Brain Freeze (trigger spell - Fireball!)
|
||||
if( sp->SpellIconID == 3261 || sp->SpellIconID == 2999 || sp->SpellIconID == 2938 )
|
||||
if( AuraEffect* aurEff = GetAuraEffectDummy(64869) )
|
||||
|
|
@ -11127,7 +11127,7 @@ bool Player::IsAlwaysDetectableFor(WorldObject const* seer) const
|
|||
return false;
|
||||
}
|
||||
|
||||
if (const Player* seerPlayer = seer->ToPlayer())
|
||||
if (Player const* seerPlayer = seer->ToPlayer())
|
||||
{
|
||||
if (IsGroupVisibleFor(seerPlayer))
|
||||
{
|
||||
|
|
@ -12362,7 +12362,7 @@ bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
|
|||
{
|
||||
if (!pOther)
|
||||
return false;
|
||||
const WorldObject* player = GetCorpse();
|
||||
WorldObject const* player = GetCorpse();
|
||||
if (!player || IsAlive())
|
||||
player = this;
|
||||
|
||||
|
|
@ -13556,7 +13556,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
if (spellId == 0)
|
||||
return;
|
||||
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
|
|
@ -15815,7 +15815,7 @@ Optional<float> Player::GetFarSightDistance() const
|
|||
return _farSightDistance;
|
||||
}
|
||||
|
||||
float Player::GetSightRange(const WorldObject* target) const
|
||||
float Player::GetSightRange(WorldObject const* target) const
|
||||
{
|
||||
float sightRange = WorldObject::GetSightRange(target);
|
||||
if (_farSightDistance)
|
||||
|
|
|
|||
|
|
@ -1250,7 +1250,7 @@ public:
|
|||
InventoryResult CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap, bool not_loading = true) const;
|
||||
InventoryResult CanUseItem(Item* pItem, bool not_loading = true) const;
|
||||
[[nodiscard]] bool HasItemTotemCategory(uint32 TotemCategory) const;
|
||||
bool IsTotemCategoryCompatiableWith(const ItemTemplate* pProto, uint32 requiredTotemCategoryId) const;
|
||||
bool IsTotemCategoryCompatiableWith(ItemTemplate const* pProto, uint32 requiredTotemCategoryId) const;
|
||||
InventoryResult CanUseItem(ItemTemplate const* pItem) const;
|
||||
[[nodiscard]] InventoryResult CanUseAmmo(uint32 item) const;
|
||||
InventoryResult CanRollForItemInLFG(ItemTemplate const* item, WorldObject const* lootedObject) const;
|
||||
|
|
@ -1277,7 +1277,7 @@ public:
|
|||
void SetAmmo(uint32 item);
|
||||
void RemoveAmmo();
|
||||
[[nodiscard]] float GetAmmoDPS() const { return m_ammoDPS; }
|
||||
bool CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const;
|
||||
bool CheckAmmoCompatibility(ItemTemplate const* ammo_proto) const;
|
||||
void QuickEquipItem(uint16 pos, Item* pItem);
|
||||
void VisualizeItem(uint8 slot, Item* pItem);
|
||||
void SetVisibleItemSlot(uint8 slot, Item* pItem);
|
||||
|
|
@ -2448,7 +2448,7 @@ public:
|
|||
bool CanTeleport() { return m_canTeleport; }
|
||||
void SetCanTeleport(bool value) { m_canTeleport = value; }
|
||||
|
||||
bool isAllowedToLoot(const Creature* creature);
|
||||
bool isAllowedToLoot(Creature const* creature);
|
||||
|
||||
[[nodiscard]] DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
|
||||
[[nodiscard]] uint8 GetRunesState() const { return m_runes->runeState; }
|
||||
|
|
@ -2575,7 +2575,7 @@ public:
|
|||
void ResetFarSightDistance();
|
||||
[[nodiscard]] Optional<float> GetFarSightDistance() const;
|
||||
|
||||
float GetSightRange(const WorldObject* target = nullptr) const override;
|
||||
float GetSightRange(WorldObject const* target = nullptr) const override;
|
||||
|
||||
std::string GetPlayerName();
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ void Player::ResetInstances(ObjectGuid guid, uint8 method, bool isRaid)
|
|||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ void Player::ResetInstances(ObjectGuid guid, uint8 method, bool isRaid)
|
|||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() != isRaid || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ bool Player::HasItemTotemCategory(uint32 TotemCategory) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Player::IsTotemCategoryCompatiableWith(const ItemTemplate* pProto, uint32 requiredTotemCategoryId) const
|
||||
bool Player::IsTotemCategoryCompatiableWith(ItemTemplate const* pProto, uint32 requiredTotemCategoryId) const
|
||||
{
|
||||
if (requiredTotemCategoryId == 0)
|
||||
return true;
|
||||
|
|
@ -2603,7 +2603,7 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update)
|
|||
return nullptr;
|
||||
|
||||
Item* lastItem = pItem;
|
||||
const ItemTemplate* proto = pItem->GetTemplate();
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
|
||||
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end();)
|
||||
{
|
||||
|
|
@ -3072,7 +3072,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
|
|||
pItem->ClearSoulboundTradeable(this);
|
||||
RemoveTradeableItem(pItem);
|
||||
|
||||
const ItemTemplate* proto = pItem->GetTemplate();
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
||||
if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
|
||||
RemoveAurasDueToSpell(proto->Spells[i].SpellId);
|
||||
|
|
@ -5644,7 +5644,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Player::isAllowedToLoot(const Creature* creature)
|
||||
bool Player::isAllowedToLoot(Creature const* creature)
|
||||
{
|
||||
if (!creature->isDead() || !creature->IsDamageEnoughForLootingAndReward())
|
||||
return false;
|
||||
|
|
@ -5816,7 +5816,7 @@ void Player::_LoadGlyphAuras()
|
|||
{
|
||||
if (GlyphSlotEntry const* glyphSlotEntry = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i)))
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(glyphEntry->SpellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyphEntry->SpellId);
|
||||
if (glyphEntry->TypeFlags == glyphSlotEntry->TypeFlags)
|
||||
{
|
||||
if (!spellInfo->Stances)
|
||||
|
|
@ -6740,7 +6740,7 @@ void Player::PrettyPrintRequirementsItemsList(const std::vector<const Progressio
|
|||
LocaleConstant loc_idx = GetSession()->GetSessionDbLocaleIndex();
|
||||
for (const ProgressionRequirement* missingReq : missingItems)
|
||||
{
|
||||
const ItemTemplate* itemTemplate = sObjectMgr->GetItemTemplate(missingReq->id);
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(missingReq->id);
|
||||
if (!itemTemplate)
|
||||
{
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ void Unit::resetAttackTimer(WeaponAttackType type)
|
|||
m_attackTimer[type] = std::min(m_attackTimer[type] + time, time);
|
||||
}
|
||||
|
||||
bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
|
||||
bool Unit::IsWithinCombatRange(Unit const* obj, float dist2compare) const
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
|
@ -620,7 +620,7 @@ bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const
|
|||
return distsq < maxdist * maxdist;
|
||||
}
|
||||
|
||||
bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const
|
||||
bool Unit::IsWithinMeleeRange(Unit const* obj, float dist) const
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
|
@ -656,7 +656,7 @@ bool Unit::IsWithinRange(Unit const* obj, float dist) const
|
|||
return distsq <= dist * dist;
|
||||
}
|
||||
|
||||
bool Unit::GetRandomContactPoint(const Unit* obj, float& x, float& y, float& z, bool force) const
|
||||
bool Unit::GetRandomContactPoint(Unit const* obj, float& x, float& y, float& z, bool force) const
|
||||
{
|
||||
float combat_reach = GetCombatReach();
|
||||
if (combat_reach < 0.1f) // sometimes bugged for players
|
||||
|
|
@ -665,7 +665,7 @@ bool Unit::GetRandomContactPoint(const Unit* obj, float& x, float& y, float& z,
|
|||
uint32 attacker_number = getAttackers().size();
|
||||
if (attacker_number > 0)
|
||||
--attacker_number;
|
||||
const Creature* c = obj->ToCreature();
|
||||
Creature const* c = obj->ToCreature();
|
||||
if (c)
|
||||
if (c->isWorldBoss() || c->IsDungeonBoss() || (obj->IsPet() && const_cast<Unit*>(obj)->ToPet()->isControlled()))
|
||||
attacker_number = 0; // pussywizard: pets and bosses just come to target from their angle
|
||||
|
|
@ -2167,7 +2167,7 @@ void Unit::CalcAbsorbResist(DamageInfo& dmgInfo, bool Splited)
|
|||
continue;
|
||||
|
||||
// Xinef: Single Target splits require LoS
|
||||
const SpellInfo* splitSpellInfo = (*itr)->GetSpellInfo();
|
||||
SpellInfo const* splitSpellInfo = (*itr)->GetSpellInfo();
|
||||
if (!splitSpellInfo->Effects[(*itr)->GetEffIndex()].IsAreaAuraEffect() && !splitSpellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT))
|
||||
if (!caster->IsWithinLOSInMap(victim) || !caster->IsWithinDist(victim, splitSpellInfo->GetMaxRange(splitSpellInfo->IsPositive(), caster)))
|
||||
continue;
|
||||
|
|
@ -2465,7 +2465,7 @@ void Unit::HandleProcExtraAttackFor(Unit* victim)
|
|||
}
|
||||
}
|
||||
|
||||
MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackType attType) const
|
||||
MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackType attType) const
|
||||
{
|
||||
// This is only wrapper
|
||||
|
||||
|
|
@ -2488,7 +2488,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
|
|||
return RollMeleeOutcomeAgainst(victim, attType, int32(crit_chance * 100), int32(miss_chance * 100), int32(dodge_chance * 100), int32(parry_chance * 100), int32(block_chance * 100));
|
||||
}
|
||||
|
||||
MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const
|
||||
MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsEvadingAttacks())
|
||||
{
|
||||
|
|
@ -2791,7 +2791,7 @@ bool Unit::isBlockCritical()
|
|||
return false;
|
||||
}
|
||||
|
||||
int32 Unit::GetMechanicResistChance(const SpellInfo* spell)
|
||||
int32 Unit::GetMechanicResistChance(SpellInfo const* spell)
|
||||
{
|
||||
if (!spell)
|
||||
return 0;
|
||||
|
|
@ -3285,7 +3285,7 @@ float Unit::GetUnitBlockChance() const
|
|||
}
|
||||
}
|
||||
|
||||
float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victim) const
|
||||
float Unit::GetUnitCriticalChance(WeaponAttackType attackType, Unit const* victim) const
|
||||
{
|
||||
float crit;
|
||||
|
||||
|
|
@ -4052,7 +4052,7 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask)
|
|||
Unit* caster = aura->GetCaster();
|
||||
|
||||
// Update target aura state flag
|
||||
const SpellInfo* spellInfo = aura->GetSpellInfo();
|
||||
SpellInfo const* spellInfo = aura->GetSpellInfo();
|
||||
if (AuraStateType aState = spellInfo->GetAuraState())
|
||||
{
|
||||
if (aState != AURA_STATE_CONFLAGRATE)
|
||||
|
|
@ -9504,7 +9504,7 @@ void Unit::setPowerType(Powers new_powertype)
|
|||
break;
|
||||
}
|
||||
|
||||
if (const Player* player = ToPlayer())
|
||||
if (Player const* player = ToPlayer())
|
||||
if (player->NeedSendSpectatorData())
|
||||
{
|
||||
ArenaSpectator::SendCommand_UInt32Value(FindMap(), GetGUID(), "PWT", new_powertype);
|
||||
|
|
@ -12721,7 +12721,7 @@ void Unit::ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply,
|
|||
}
|
||||
}
|
||||
|
||||
void Unit::ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type, bool apply)
|
||||
void Unit::ApplySpellDispelImmunity(SpellInfo const* spellProto, DispelType type, bool apply)
|
||||
{
|
||||
ApplySpellImmune(spellProto->Id, IMMUNITY_DISPEL, type, apply);
|
||||
|
||||
|
|
@ -12756,7 +12756,7 @@ float Unit::GetWeaponProcChance() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const
|
||||
float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, SpellInfo const* spellProto) const
|
||||
{
|
||||
// proc per minute chance calculation
|
||||
if (PPM <= 0)
|
||||
|
|
@ -13216,7 +13216,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
|
|||
repTargetToThis <= REP_NEUTRAL)
|
||||
{
|
||||
Player* owner = GetAffectingPlayer();
|
||||
const Unit* const thisUnit = owner ? owner : this;
|
||||
Unit const* const thisUnit = owner ? owner : this;
|
||||
if (!(target->GetTypeId() == TYPEID_PLAYER && thisUnit->GetTypeId() == TYPEID_PLAYER) &&
|
||||
!(target->GetTypeId() == TYPEID_UNIT && thisUnit->GetTypeId() == TYPEID_UNIT))
|
||||
{
|
||||
|
|
@ -13489,7 +13489,7 @@ bool Unit::IsAlwaysDetectableFor(WorldObject const* seer) const
|
|||
return true;
|
||||
|
||||
if (Player* ownerPlayer = GetSpellModOwner())
|
||||
if (const Player* seerPlayer = seer->ToPlayer())
|
||||
if (Player const* seerPlayer = seer->ToPlayer())
|
||||
{
|
||||
if (ownerPlayer->IsGroupVisibleFor(seerPlayer))
|
||||
return true;
|
||||
|
|
@ -15389,7 +15389,7 @@ bool InitTriggerAuraData()
|
|||
return true;
|
||||
}
|
||||
|
||||
void createProcFlags(const SpellInfo* spellInfo, WeaponAttackType attackType, bool positive, uint32& procAttacker, uint32& procVictim)
|
||||
void createProcFlags(SpellInfo const* spellInfo, WeaponAttackType attackType, bool positive, uint32& procAttacker, uint32& procVictim)
|
||||
{
|
||||
if (spellInfo)
|
||||
{
|
||||
|
|
@ -18132,8 +18132,8 @@ bool Unit::IsInPartyWith(Unit const* unit) const
|
|||
if (this == unit)
|
||||
return true;
|
||||
|
||||
const Unit* u1 = GetCharmerOrOwnerOrSelf();
|
||||
const Unit* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u1 = GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
if (u1 == u2)
|
||||
return true;
|
||||
|
||||
|
|
@ -18155,8 +18155,8 @@ bool Unit::IsInRaidWith(Unit const* unit) const
|
|||
if (this == unit)
|
||||
return true;
|
||||
|
||||
const Unit* u1 = GetCharmerOrOwnerOrSelf();
|
||||
const Unit* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u1 = GetCharmerOrOwnerOrSelf();
|
||||
Unit const* u2 = unit->GetCharmerOrOwnerOrSelf();
|
||||
if (u1 == u2)
|
||||
return true;
|
||||
|
||||
|
|
@ -18341,7 +18341,7 @@ void Unit::ApplyResilience(Unit const* victim, float* crit, int32* damage, bool
|
|||
|
||||
// Melee based spells can be miss, parry or dodge on this step
|
||||
// Crit or block - determined on damage calculation phase! (and can be both in some time)
|
||||
float Unit::MeleeSpellMissChance(const Unit* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const
|
||||
float Unit::MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const
|
||||
{
|
||||
SpellInfo const* spellInfo = spellId ? sSpellMgr->GetSpellInfo(spellId) : nullptr;
|
||||
if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR7_NO_ATTACK_MISS))
|
||||
|
|
@ -19680,7 +19680,7 @@ bool CharmInfo::IsReturning()
|
|||
return _isReturning;
|
||||
}
|
||||
|
||||
void Unit::PetSpellFail(const SpellInfo* spellInfo, Unit* target, uint32 result)
|
||||
void Unit::PetSpellFail(SpellInfo const* spellInfo, Unit* target, uint32 result)
|
||||
{
|
||||
CharmInfo* charmInfo = GetCharmInfo();
|
||||
if (!charmInfo || GetTypeId() != TYPEID_UNIT)
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ struct SpellPeriodicAuraLogInfo
|
|||
bool critical;
|
||||
};
|
||||
|
||||
void createProcFlags(const SpellInfo* spellInfo, WeaponAttackType attackType, bool positive, uint32& procAttacker, uint32& procVictim);
|
||||
void createProcFlags(SpellInfo const* spellInfo, WeaponAttackType attackType, bool positive, uint32& procAttacker, uint32& procVictim);
|
||||
uint32 createProcExtendMask(SpellNonMeleeDamage* damageInfo, SpellMissInfo missCondition);
|
||||
|
||||
struct RedirectThreatInfo
|
||||
|
|
@ -1308,10 +1308,10 @@ public:
|
|||
[[nodiscard]] float GetCombatReach() const override { return m_floatValues[UNIT_FIELD_COMBATREACH]; }
|
||||
[[nodiscard]] float GetMeleeReach() const { float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; }
|
||||
[[nodiscard]] bool IsWithinRange(Unit const* obj, float dist) const;
|
||||
bool IsWithinCombatRange(const Unit* obj, float dist2compare) const;
|
||||
bool IsWithinMeleeRange(const Unit* obj, float dist = 0.f) const;
|
||||
bool IsWithinCombatRange(Unit const* obj, float dist2compare) const;
|
||||
bool IsWithinMeleeRange(Unit const* obj, float dist = 0.f) const;
|
||||
float GetMeleeRange(Unit const* target) const;
|
||||
bool GetRandomContactPoint(const Unit* target, float& x, float& y, float& z, bool force = false) const;
|
||||
bool GetRandomContactPoint(Unit const* target, float& x, float& y, float& z, bool force = false) const;
|
||||
uint32 m_extraAttacks;
|
||||
bool m_canDualWield;
|
||||
|
||||
|
|
@ -1524,9 +1524,9 @@ public:
|
|||
[[nodiscard]] uint32 GetRangedDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_RANGED, 2.0f, 100.0f, damage); }
|
||||
[[nodiscard]] uint32 GetSpellDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_CRIT_TAKEN_SPELL, 2.0f, 100.0f, damage); }
|
||||
|
||||
static void ApplyResilience(const Unit* victim, float* crit, int32* damage, bool isCrit, CombatRating type);
|
||||
static void ApplyResilience(Unit const* victim, float* crit, int32* damage, bool isCrit, CombatRating type);
|
||||
|
||||
float MeleeSpellMissChance(const Unit* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||
float MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const;
|
||||
SpellMissInfo MeleeSpellHitResult(Unit* victim, SpellInfo const* spell);
|
||||
SpellMissInfo MagicSpellHitResult(Unit* victim, SpellInfo const* spell);
|
||||
SpellMissInfo SpellHitResult(Unit* victim, SpellInfo const* spell, bool canReflect = false);
|
||||
|
|
@ -1535,8 +1535,8 @@ public:
|
|||
[[nodiscard]] float GetUnitParryChance() const;
|
||||
[[nodiscard]] float GetUnitBlockChance() const;
|
||||
[[nodiscard]] float GetUnitMissChance(WeaponAttackType attType) const;
|
||||
float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victim) const;
|
||||
int32 GetMechanicResistChance(const SpellInfo* spell);
|
||||
float GetUnitCriticalChance(WeaponAttackType attackType, Unit const* victim) const;
|
||||
int32 GetMechanicResistChance(SpellInfo const* spell);
|
||||
[[nodiscard]] bool CanUseAttackType(uint8 attacktype) const
|
||||
{
|
||||
switch (attacktype)
|
||||
|
|
@ -1570,10 +1570,10 @@ public:
|
|||
uint32 GetDefenseSkillValue(Unit const* target = nullptr) const;
|
||||
uint32 GetWeaponSkillValue(WeaponAttackType attType, Unit const* target = nullptr) const;
|
||||
[[nodiscard]] float GetWeaponProcChance() const;
|
||||
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const;
|
||||
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, SpellInfo const* spellProto) const;
|
||||
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (Unit const* victim, WeaponAttackType attType) const;
|
||||
MeleeHitOutcome RollMeleeOutcomeAgainst (Unit const* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const;
|
||||
|
||||
[[nodiscard]] bool IsVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
|
||||
[[nodiscard]] bool IsTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
|
||||
|
|
@ -2147,7 +2147,7 @@ public:
|
|||
void CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex = 0);
|
||||
|
||||
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType = SPELL_BLOCK_TYPE_ALL);
|
||||
void ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type, bool apply);
|
||||
void ApplySpellDispelImmunity(SpellInfo const* spellProto, DispelType type, bool apply);
|
||||
virtual bool IsImmunedToSpell(SpellInfo const* spellInfo);
|
||||
// redefined in Creature
|
||||
[[nodiscard]] bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const;
|
||||
|
|
@ -2272,7 +2272,7 @@ public:
|
|||
void RemoveVehicleKit();
|
||||
[[nodiscard]] Vehicle* GetVehicleKit()const { return m_vehicleKit; }
|
||||
[[nodiscard]] Vehicle* GetVehicle() const { return m_vehicle; }
|
||||
bool IsOnVehicle(const Unit* vehicle) const { return m_vehicle && m_vehicle == vehicle->GetVehicleKit(); }
|
||||
bool IsOnVehicle(Unit const* vehicle) const { return m_vehicle && m_vehicle == vehicle->GetVehicleKit(); }
|
||||
[[nodiscard]] Unit* GetVehicleBase() const;
|
||||
[[nodiscard]] Creature* GetVehicleCreatureBase() const;
|
||||
[[nodiscard]] ObjectGuid GetTransGUID() const override;
|
||||
|
|
@ -2346,7 +2346,7 @@ public:
|
|||
|
||||
[[nodiscard]] bool CanApplyResilience() const { return m_applyResilience; }
|
||||
|
||||
void PetSpellFail(const SpellInfo* spellInfo, Unit* target, uint32 result);
|
||||
void PetSpellFail(SpellInfo const* spellInfo, Unit* target, uint32 result);
|
||||
|
||||
int32 CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* caster) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1481,7 +1481,7 @@ void ObjectMgr::LoadEquipmentTemplates()
|
|||
if (!equipmentInfo.ItemEntry[i])
|
||||
continue;
|
||||
|
||||
const ItemTemplate* item = GetItemTemplate(equipmentInfo.ItemEntry[i]);
|
||||
ItemTemplate const* item = GetItemTemplate(equipmentInfo.ItemEntry[i]);
|
||||
|
||||
if (!item)
|
||||
{
|
||||
|
|
@ -1752,7 +1752,7 @@ void ObjectMgr::LoadLinkedRespawn()
|
|||
break;
|
||||
}
|
||||
|
||||
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
|
||||
MapEntry const* const map = sMapStore.LookupEntry(master->mapid);
|
||||
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "LinkedRespawn: Creature '{}' linking to Creature '{}' on an unpermitted map.", guidLow, linkedGuidLow);
|
||||
|
|
@ -1789,7 +1789,7 @@ void ObjectMgr::LoadLinkedRespawn()
|
|||
break;
|
||||
}
|
||||
|
||||
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
|
||||
MapEntry const* const map = sMapStore.LookupEntry(master->mapid);
|
||||
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "LinkedRespawn: Creature '{}' linking to Gameobject '{}' on an unpermitted map.", guidLow, linkedGuidLow);
|
||||
|
|
@ -1826,7 +1826,7 @@ void ObjectMgr::LoadLinkedRespawn()
|
|||
break;
|
||||
}
|
||||
|
||||
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
|
||||
MapEntry const* const map = sMapStore.LookupEntry(master->mapid);
|
||||
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '{}' linking to Gameobject '{}' on an unpermitted map.", guidLow, linkedGuidLow);
|
||||
|
|
@ -1863,7 +1863,7 @@ void ObjectMgr::LoadLinkedRespawn()
|
|||
break;
|
||||
}
|
||||
|
||||
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
|
||||
MapEntry const* const map = sMapStore.LookupEntry(master->mapid);
|
||||
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '{}' linking to Creature '{}' on an unpermitted map.", guidLow, linkedGuidLow);
|
||||
|
|
@ -6632,13 +6632,13 @@ AreaTriggerTeleport const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
|
|||
{
|
||||
bool useParentDbValue = false;
|
||||
uint32 parentId = 0;
|
||||
const MapEntry* mapEntry = sMapStore.LookupEntry(Map);
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(Map);
|
||||
if (!mapEntry || mapEntry->entrance_map < 0)
|
||||
return nullptr;
|
||||
|
||||
if (mapEntry->IsDungeon())
|
||||
{
|
||||
const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(Map);
|
||||
InstanceTemplate const* iTemplate = sObjectMgr->GetInstanceTemplate(Map);
|
||||
|
||||
if (!iTemplate)
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -880,7 +880,7 @@ namespace Acore
|
|||
AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck(Unit const* funit, float range)
|
||||
: i_funit(funit), i_range(range) {}
|
||||
|
||||
bool operator()(const Unit* u)
|
||||
bool operator()(Unit const* u)
|
||||
{
|
||||
return u->IsAlive()
|
||||
&& i_funit->IsWithinDistInMap(u, i_range)
|
||||
|
|
@ -1354,7 +1354,7 @@ namespace Acore
|
|||
class AllGameObjectsWithEntryInRange
|
||||
{
|
||||
public:
|
||||
AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
AllGameObjectsWithEntryInRange(WorldObject const* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
bool operator() (GameObject* go)
|
||||
{
|
||||
if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false))
|
||||
|
|
@ -1363,7 +1363,7 @@ namespace Acore
|
|||
return false;
|
||||
}
|
||||
private:
|
||||
const WorldObject* m_pObject;
|
||||
WorldObject const* m_pObject;
|
||||
uint32 m_uiEntry;
|
||||
float m_fRange;
|
||||
};
|
||||
|
|
@ -1371,7 +1371,7 @@ namespace Acore
|
|||
class AllCreaturesOfEntryInRange
|
||||
{
|
||||
public:
|
||||
AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
AllCreaturesOfEntryInRange(WorldObject const* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
|
||||
bool operator() (Unit* unit)
|
||||
{
|
||||
if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false))
|
||||
|
|
@ -1381,7 +1381,7 @@ namespace Acore
|
|||
}
|
||||
|
||||
private:
|
||||
const WorldObject* m_pObject;
|
||||
WorldObject const* m_pObject;
|
||||
uint32 m_uiEntry;
|
||||
float m_fRange;
|
||||
};
|
||||
|
|
@ -1496,13 +1496,13 @@ namespace Acore
|
|||
class AllWorldObjectsInRange
|
||||
{
|
||||
public:
|
||||
AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
|
||||
AllWorldObjectsInRange(WorldObject const* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
|
||||
bool operator() (WorldObject* go)
|
||||
{
|
||||
return m_pObject->IsWithinDist(go, m_fRange, false) && m_pObject->InSamePhase(go);
|
||||
}
|
||||
private:
|
||||
const WorldObject* m_pObject;
|
||||
WorldObject const* m_pObject;
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
|
|
@ -1557,14 +1557,14 @@ namespace Acore
|
|||
class AllWorldObjectsInExactRange
|
||||
{
|
||||
public:
|
||||
AllWorldObjectsInExactRange(const WorldObject* object, float range, bool equals) : _object(object), _range(range), _equals(equals) { }
|
||||
AllWorldObjectsInExactRange(WorldObject const* object, float range, bool equals) : _object(object), _range(range), _equals(equals) { }
|
||||
bool operator() (WorldObject const* object)
|
||||
{
|
||||
return (_object->GetExactDist2d(object) > _range) == _equals;
|
||||
}
|
||||
|
||||
private:
|
||||
const WorldObject* _object;
|
||||
WorldObject const* _object;
|
||||
float _range;
|
||||
bool _equals;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2029,7 +2029,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* leader)
|
|||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
|
|
@ -2053,7 +2053,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* leader)
|
|||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() != isRaid || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
|
|||
uint8 toggleExtendOn;
|
||||
recvData >> mapId >> difficulty >> toggleExtendOn;
|
||||
|
||||
const MapEntry* entry = sMapStore.LookupEntry(mapId);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(mapId);
|
||||
if (!entry || !entry->IsRaid())
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvData)
|
|||
// pussywizard: exploit fix, can't share quests that give items to be sold
|
||||
if (object->GetTypeId() == TYPEID_PLAYER)
|
||||
if (uint32 itemId = quest->GetSrcItemId())
|
||||
if (const ItemTemplate* srcItem = sObjectMgr->GetItemTemplate(itemId))
|
||||
if (ItemTemplate const* srcItem = sObjectMgr->GetItemTemplate(itemId))
|
||||
if (srcItem->SellPrice > 0)
|
||||
return;
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
|||
|
||||
// pussywizard: exploit fix, can't share quests that give items to be sold
|
||||
if (uint32 itemId = quest->GetSrcItemId())
|
||||
if (const ItemTemplate* srcItem = sObjectMgr->GetItemTemplate(itemId))
|
||||
if (ItemTemplate const* srcItem = sObjectMgr->GetItemTemplate(itemId))
|
||||
if (srcItem->SellPrice > 0)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ InstanceSave* InstanceSaveMgr::AddInstanceSave(uint32 mapId, uint32 instanceId,
|
|||
{
|
||||
ASSERT(!GetInstanceSave(instanceId));
|
||||
|
||||
const MapEntry* entry = sMapStore.LookupEntry(mapId);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(mapId);
|
||||
if (!entry)
|
||||
{
|
||||
LOG_ERROR("instance.save", "InstanceSaveMgr::AddInstanceSave: wrong mapid = {}, instanceid = {}!", mapId, instanceId);
|
||||
|
|
@ -190,7 +190,7 @@ void InstanceSave::InsertToDB()
|
|||
time_t InstanceSave::GetResetTimeForDB()
|
||||
{
|
||||
// only save the reset time for normal instances
|
||||
const MapEntry* entry = sMapStore.LookupEntry(GetMapId());
|
||||
MapEntry const* entry = sMapStore.LookupEntry(GetMapId());
|
||||
if (!entry || entry->map_type == MAP_RAID || GetDifficulty() == DUNGEON_DIFFICULTY_HEROIC)
|
||||
return 0;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -3774,7 +3774,7 @@ void Map::DoForAllPlayers(std::function<void(Player*)> exec)
|
|||
* overloaded method with the start coords when you need to do a quick check on small segments
|
||||
*
|
||||
*/
|
||||
bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
bool Map::CanReachPositionAndGetValidCoords(WorldObject const* source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
{
|
||||
G3D::Vector3 prevPath = path->GetStartPosition();
|
||||
for (auto & vector : path->GetPath())
|
||||
|
|
@ -3814,19 +3814,19 @@ bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, PathGener
|
|||
*
|
||||
**/
|
||||
|
||||
bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, float& destX, float& destY, float& destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
bool Map::CanReachPositionAndGetValidCoords(WorldObject const* source, float& destX, float& destY, float& destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
{
|
||||
return CanReachPositionAndGetValidCoords(source, source->GetPositionX(), source->GetPositionY(), source->GetPositionZ(), destX, destY, destZ, failOnCollision, failOnSlopes);
|
||||
}
|
||||
|
||||
bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
bool Map::CanReachPositionAndGetValidCoords(WorldObject const* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision, bool failOnSlopes) const
|
||||
{
|
||||
if (!CheckCollisionAndGetValidCoords(source, startX, startY, startZ, destX, destY, destZ, failOnCollision))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const Unit* unit = source->ToUnit();
|
||||
Unit const* unit = source->ToUnit();
|
||||
// if it's not an unit (Object) then we do not have to continue
|
||||
// with walkable checks
|
||||
if (!unit)
|
||||
|
|
@ -3838,7 +3838,7 @@ bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, float sta
|
|||
* Walkable checks
|
||||
*/
|
||||
bool isWaterNext = HasEnoughWater(unit, destX, destY, destZ);
|
||||
const Creature* creature = unit->ToCreature();
|
||||
Creature const* creature = unit->ToCreature();
|
||||
bool cannotEnterWater = isWaterNext && (creature && !creature->CanEnterWater());
|
||||
bool cannotWalkOrFly = !isWaterNext && !source->ToPlayer() && !unit->CanFly() && (creature && !creature->CanWalk());
|
||||
if (cannotEnterWater || cannotWalkOrFly ||
|
||||
|
|
@ -3857,7 +3857,7 @@ bool Map::CanReachPositionAndGetValidCoords(const WorldObject* source, float sta
|
|||
* @return true if the destination is valid, false otherwise
|
||||
*
|
||||
**/
|
||||
bool Map::CheckCollisionAndGetValidCoords(const WorldObject* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision) const
|
||||
bool Map::CheckCollisionAndGetValidCoords(WorldObject const* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision) const
|
||||
{
|
||||
// Prevent invalid coordinates here, position is unchanged
|
||||
if (!Acore::IsValidMapCoord(startX, startY, startZ) || !Acore::IsValidMapCoord(destX, destY, destZ))
|
||||
|
|
@ -3874,7 +3874,7 @@ bool Map::CheckCollisionAndGetValidCoords(const WorldObject* source, float start
|
|||
path.SetUseRaycast(true);
|
||||
bool result = path.CalculatePath(startX, startY, startZ, destX, destY, destZ, false);
|
||||
|
||||
const Unit* unit = source->ToUnit();
|
||||
Unit const* unit = source->ToUnit();
|
||||
bool notOnGround = path.GetPathType() & PATHFIND_NOT_USING_PATH
|
||||
|| isWaterNext || (unit && unit->IsFlying());
|
||||
|
||||
|
|
|
|||
|
|
@ -529,21 +529,21 @@ public:
|
|||
}
|
||||
|
||||
MapInstanced* ToMapInstanced() { if (Instanceable()) return reinterpret_cast<MapInstanced*>(this); else return nullptr; }
|
||||
[[nodiscard]] const MapInstanced* ToMapInstanced() const { if (Instanceable()) return (const MapInstanced*)((MapInstanced*)this); else return nullptr; }
|
||||
[[nodiscard]] MapInstanced const* ToMapInstanced() const { if (Instanceable()) return (const MapInstanced*)((MapInstanced*)this); else return nullptr; }
|
||||
|
||||
InstanceMap* ToInstanceMap() { if (IsDungeon()) return reinterpret_cast<InstanceMap*>(this); else return nullptr; }
|
||||
[[nodiscard]] const InstanceMap* ToInstanceMap() const { if (IsDungeon()) return (const InstanceMap*)((InstanceMap*)this); else return nullptr; }
|
||||
[[nodiscard]] InstanceMap const* ToInstanceMap() const { if (IsDungeon()) return (const InstanceMap*)((InstanceMap*)this); else return nullptr; }
|
||||
|
||||
BattlegroundMap* ToBattlegroundMap() { if (IsBattlegroundOrArena()) return reinterpret_cast<BattlegroundMap*>(this); else return nullptr; }
|
||||
[[nodiscard]] const BattlegroundMap* ToBattlegroundMap() const { if (IsBattlegroundOrArena()) return reinterpret_cast<BattlegroundMap const*>(this); return nullptr; }
|
||||
[[nodiscard]] BattlegroundMap const* ToBattlegroundMap() const { if (IsBattlegroundOrArena()) return reinterpret_cast<BattlegroundMap const*>(this); return nullptr; }
|
||||
|
||||
float GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground = nullptr, bool swim = false, float collisionHeight = DEFAULT_COLLISION_HEIGHT) const;
|
||||
[[nodiscard]] float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
|
||||
[[nodiscard]] bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks) const;
|
||||
bool CanReachPositionAndGetValidCoords(const WorldObject* source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CanReachPositionAndGetValidCoords(const WorldObject* source, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CanReachPositionAndGetValidCoords(const WorldObject* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CheckCollisionAndGetValidCoords(const WorldObject* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision = true) const;
|
||||
bool CanReachPositionAndGetValidCoords(WorldObject const* source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CanReachPositionAndGetValidCoords(WorldObject const* source, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CanReachPositionAndGetValidCoords(WorldObject const* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
|
||||
bool CheckCollisionAndGetValidCoords(WorldObject const* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision = true) const;
|
||||
void Balance() { _dynamicTree.balance(); }
|
||||
void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); }
|
||||
void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); }
|
||||
|
|
|
|||
|
|
@ -185,13 +185,13 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
|
|||
std::lock_guard<std::mutex> guard(Lock);
|
||||
|
||||
// make sure we have a valid map id
|
||||
const MapEntry* entry = sMapStore.LookupEntry(GetId());
|
||||
MapEntry const* entry = sMapStore.LookupEntry(GetId());
|
||||
if (!entry)
|
||||
{
|
||||
LOG_ERROR("maps", "CreateInstance: no entry for map {}", GetId());
|
||||
ABORT();
|
||||
}
|
||||
const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId());
|
||||
InstanceTemplate const* iTemplate = sObjectMgr->GetInstanceTemplate(GetId());
|
||||
if (!iTemplate)
|
||||
{
|
||||
LOG_ERROR("maps", "CreateInstance: no instance template for map {}", GetId());
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
i_timer[3].Reset();
|
||||
}
|
||||
|
||||
//void LoadGrid(int mapid, int instId, float x, float y, const WorldObject* obj, bool no_unload = false);
|
||||
//void LoadGrid(int mapid, int instId, float x, float y, WorldObject const* obj, bool no_unload = false);
|
||||
void UnloadAll();
|
||||
|
||||
static bool ExistMapAndVMap(uint32 mapid, float x, float y);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ namespace Movement
|
|||
args.flags.flying = unit->m_movementInfo.HasMovementFlag((MovementFlags)(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY));
|
||||
}
|
||||
|
||||
void MoveSplineInit::SetFacing(const Unit* target)
|
||||
void MoveSplineInit::SetFacing(Unit const* target)
|
||||
{
|
||||
args.flags.EnableFacingTarget();
|
||||
args.facing.target = target->GetGUID().GetRawValue();
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Movement
|
|||
*/
|
||||
void SetFacing(float angle);
|
||||
void SetFacing(Vector3 const& point);
|
||||
void SetFacing(const Unit* target);
|
||||
void SetFacing(Unit const* target);
|
||||
|
||||
/* Initializes movement by path
|
||||
* @param path - array of points, shouldn't be empty
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ void ScriptMgr::OnGlobalItemDelFromDB(CharacterDatabaseTransaction trans, Object
|
|||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGlobalMirrorImageDisplayItem(const Item* item, uint32& display)
|
||||
void ScriptMgr::OnGlobalMirrorImageDisplayItem(Item const* item, uint32& display)
|
||||
{
|
||||
ExecuteScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ void ScriptMgr::OnPlayerJoinArena(Player* player)
|
|||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::GetCustomGetArenaTeamId(const Player* player, uint8 slot, uint32& teamID) const
|
||||
void ScriptMgr::GetCustomGetArenaTeamId(Player const* player, uint8 slot, uint32& teamID) const
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
|
|
@ -550,7 +550,7 @@ void ScriptMgr::GetCustomGetArenaTeamId(const Player* player, uint8 slot, uint32
|
|||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::GetCustomArenaPersonalRating(const Player* player, uint8 slot, uint32& rating) const
|
||||
void ScriptMgr::GetCustomArenaPersonalRating(Player const* player, uint8 slot, uint32& rating) const
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
|
|
@ -558,7 +558,7 @@ void ScriptMgr::GetCustomArenaPersonalRating(const Player* player, uint8 slot, u
|
|||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGetMaxPersonalArenaRatingRequirement(const Player* player, uint32 minSlot, uint32& maxArenaRating) const
|
||||
void ScriptMgr::OnGetMaxPersonalArenaRatingRequirement(Player const* player, uint32 minSlot, uint32& maxArenaRating) const
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ void ScriptMgr::ModifyHealRecieved(Unit* target, Unit* attacker, uint32& damage)
|
|||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeRollMeleeOutcomeAgainst(const Unit* attacker, const Unit* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance)
|
||||
void ScriptMgr::OnBeforeRollMeleeOutcomeAgainst(Unit const* attacker, Unit const* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance)
|
||||
{
|
||||
ExecuteScript<UnitScript>([&](UnitScript* script)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ public:
|
|||
//Called when Damage is Dealt
|
||||
virtual uint32 DealDamage(Unit* /*AttackerUnit*/, Unit* /*pVictim*/, uint32 damage, DamageEffectType /*damagetype*/) { return damage; }
|
||||
|
||||
virtual void OnBeforeRollMeleeOutcomeAgainst(const Unit* /*attacker*/, const Unit* /*victim*/, WeaponAttackType /*attType*/, int32& /*attackerMaxSkillValueForLevel*/, int32& /*victimMaxSkillValueForLevel*/, int32& /*attackerWeaponSkill*/, int32& /*victimDefenseSkill*/, int32& /*crit_chance*/, int32& /*miss_chance*/, int32& /*dodge_chance*/, int32& /*parry_chance*/, int32& /*block_chance*/ ) { };
|
||||
virtual void OnBeforeRollMeleeOutcomeAgainst(Unit const* /*attacker*/, Unit const* /*victim*/, WeaponAttackType /*attType*/, int32& /*attackerMaxSkillValueForLevel*/, int32& /*victimMaxSkillValueForLevel*/, int32& /*attackerWeaponSkill*/, int32& /*victimDefenseSkill*/, int32& /*crit_chance*/, int32& /*miss_chance*/, int32& /*dodge_chance*/, int32& /*parry_chance*/, int32& /*block_chance*/ ) { };
|
||||
|
||||
virtual void OnAuraRemove(Unit* /*unit*/, AuraApplication* /*aurApp*/, AuraRemoveMode /*mode*/) { }
|
||||
|
||||
|
|
@ -1137,13 +1137,13 @@ public:
|
|||
virtual void OnPlayerJoinArena(Player* /*player*/) { }
|
||||
|
||||
//Called when trying to get a team ID of a slot > 2 (This is for custom teams created by modules)
|
||||
virtual void GetCustomGetArenaTeamId(const Player* /*player*/, uint8 /*slot*/, uint32& /*teamID*/) const { }
|
||||
virtual void GetCustomGetArenaTeamId(Player const* /*player*/, uint8 /*slot*/, uint32& /*teamID*/) const { }
|
||||
|
||||
//Called when trying to get players personal rating of an arena slot > 2 (This is for custom teams created by modules)
|
||||
virtual void GetCustomArenaPersonalRating(const Player* /*player*/, uint8 /*slot*/, uint32& /*rating*/) const { }
|
||||
virtual void GetCustomArenaPersonalRating(Player const* /*player*/, uint8 /*slot*/, uint32& /*rating*/) const { }
|
||||
|
||||
//Called after the normal slots (0..2) for arena have been evaluated so that custom arena teams could modify it if nececasry
|
||||
virtual void OnGetMaxPersonalArenaRatingRequirement(const Player* /*player*/, uint32 /*minSlot*/, uint32& /*maxArenaRating*/) const {}
|
||||
virtual void OnGetMaxPersonalArenaRatingRequirement(Player const* /*player*/, uint32 /*minSlot*/, uint32& /*maxArenaRating*/) const {}
|
||||
|
||||
//After looting item
|
||||
virtual void OnLootItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, ObjectGuid /*lootguid*/) { }
|
||||
|
|
@ -1507,7 +1507,7 @@ protected:
|
|||
public:
|
||||
// items
|
||||
virtual void OnItemDelFromDB(CharacterDatabaseTransaction /*trans*/, ObjectGuid::LowType /*itemGuid*/) { }
|
||||
virtual void OnMirrorImageDisplayItem(const Item* /*item*/, uint32& /*display*/) { }
|
||||
virtual void OnMirrorImageDisplayItem(Item const* /*item*/, uint32& /*display*/) { }
|
||||
|
||||
// loot
|
||||
virtual void OnAfterRefCount(Player const* /*player*/, LootStoreItem* /*LootStoreItem*/, Loot& /*loot*/, bool /*canRate*/, uint16 /*lootMode*/, uint32& /*maxcount*/, LootStore const& /*store*/) { }
|
||||
|
|
@ -2213,9 +2213,9 @@ public: /* PlayerScript */
|
|||
void OnEquip(Player* player, Item* it, uint8 bag, uint8 slot, bool update);
|
||||
void OnPlayerJoinBG(Player* player);
|
||||
void OnPlayerJoinArena(Player* player);
|
||||
void GetCustomGetArenaTeamId(const Player* player, uint8 slot, uint32& teamID) const;
|
||||
void GetCustomArenaPersonalRating(const Player* player, uint8 slot, uint32& rating) const;
|
||||
void OnGetMaxPersonalArenaRatingRequirement(const Player* player, uint32 minSlot, uint32& maxArenaRating) const;
|
||||
void GetCustomGetArenaTeamId(Player const* player, uint8 slot, uint32& teamID) const;
|
||||
void GetCustomArenaPersonalRating(Player const* player, uint8 slot, uint32& rating) const;
|
||||
void OnGetMaxPersonalArenaRatingRequirement(Player const* player, uint32 minSlot, uint32& maxArenaRating) const;
|
||||
void OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid lootguid);
|
||||
void OnCreateItem(Player* player, Item* item, uint32 count);
|
||||
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
|
||||
|
|
@ -2341,7 +2341,7 @@ public: /* GroupScript */
|
|||
|
||||
public: /* GlobalScript */
|
||||
void OnGlobalItemDelFromDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid);
|
||||
void OnGlobalMirrorImageDisplayItem(const Item* item, uint32& display);
|
||||
void OnGlobalMirrorImageDisplayItem(Item const* item, uint32& display);
|
||||
void OnBeforeUpdateArenaPoints(ArenaTeam* at, std::map<ObjectGuid, uint32>& ap);
|
||||
void OnAfterRefCount(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, uint32& maxcount, LootStore const& store);
|
||||
void OnBeforeDropAddItem(Player const* player, Loot& loot, bool canRate, uint16 lootMode, LootStoreItem* LootStoreItem, LootStore const& store);
|
||||
|
|
@ -2369,7 +2369,7 @@ public: /* UnitScript */
|
|||
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage);
|
||||
void ModifyHealRecieved(Unit* target, Unit* attacker, uint32& addHealth);
|
||||
uint32 DealDamage(Unit* AttackerUnit, Unit* pVictim, uint32 damage, DamageEffectType damagetype);
|
||||
void OnBeforeRollMeleeOutcomeAgainst(const Unit* attacker, const Unit* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance);
|
||||
void OnBeforeRollMeleeOutcomeAgainst(Unit const* attacker, Unit const* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance);
|
||||
void OnAuraRemove(Unit* unit, AuraApplication* aurApp, AuraRemoveMode mode);
|
||||
bool IfNormalReaction(Unit const* unit, Unit const* target, ReputationRank& repRank);
|
||||
bool IsNeedModSpellDamagePercent(Unit const* unit, AuraEffect* auraEff, float& doneTotalMod, SpellInfo const* spellProto);
|
||||
|
|
|
|||
|
|
@ -2415,7 +2415,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo
|
|||
{
|
||||
if ((*iter)->GetCurrentSpell(i) && (*iter)->GetCurrentSpell(i)->m_targets.GetUnitTargetGUID() == target->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
SpellInfo const* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ void AuraApplication::ClientUpdate(bool remove)
|
|||
BuildUpdatePacket(data, remove);
|
||||
|
||||
if (GetSlot() < MAX_AURAS)
|
||||
if (const Player* plr = GetTarget()->ToPlayer())
|
||||
if (Player const* plr = GetTarget()->ToPlayer())
|
||||
if (Aura* aura = GetBase())
|
||||
if (plr->NeedSendSpectatorData() && ArenaSpectator::ShouldSendAura(aura, GetEffectMask(), GetTarget()->GetGUID(), remove))
|
||||
ArenaSpectator::SendCommand_Aura(plr->FindMap(), plr->GetGUID(), "AUR", aura->GetCasterGUID(), aura->GetSpellInfo()->Id, aura->GetSpellInfo()->IsPositive(), aura->GetSpellInfo()->Dispel, aura->GetDuration(), aura->GetMaxDuration(), (aura->GetCharges() > 1 ? aura->GetCharges() : aura->GetStackAmount()), remove);
|
||||
|
|
|
|||
|
|
@ -5334,7 +5334,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
|
||||
// Spectator check
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (((const Player*)m_caster)->IsSpectator() && m_spellInfo->Id != SPECTATOR_SPELL_BINDSIGHT)
|
||||
if (((Player const*)m_caster)->IsSpectator() && m_spellInfo->Id != SPECTATOR_SPELL_BINDSIGHT)
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
|
||||
SpellCastResult res = SPELL_CAST_OK;
|
||||
|
|
|
|||
|
|
@ -839,13 +839,13 @@ typedef void(Spell::*pEffect)(SpellEffIndex effIndex);
|
|||
class ReflectEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
ReflectEvent(Unit* caster, ObjectGuid targetGUID, const SpellInfo* spellInfo) : _caster(caster), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
|
||||
ReflectEvent(Unit* caster, ObjectGuid targetGUID, SpellInfo const* spellInfo) : _caster(caster), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
|
||||
bool Execute(uint64 e_time, uint32 p_time) override;
|
||||
|
||||
protected:
|
||||
Unit* _caster;
|
||||
ObjectGuid _targetGUID;
|
||||
const SpellInfo* _spellInfo;
|
||||
SpellInfo const* _spellInfo;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4279,7 +4279,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
|||
{
|
||||
if ((*iter)->GetCurrentSpell(i) && (*iter)->GetCurrentSpell(i)->m_targets.GetUnitTargetGUID() == unitTarget->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
SpellInfo const* si = (*iter)->GetCurrentSpell(i)->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
|
|
@ -4968,7 +4968,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
|||
{
|
||||
if (spell->m_targets.GetUnitTargetGUID() == m_caster->GetGUID())
|
||||
{
|
||||
const SpellInfo* si = spell->GetSpellInfo();
|
||||
SpellInfo const* si = spell->GetSpellInfo();
|
||||
if (si->HasAttribute(SPELL_ATTR6_IGNORE_PHASE_SHIFT) && (*iter)->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c = (*iter)->ToCreature();
|
||||
|
|
|
|||
|
|
@ -1725,7 +1725,7 @@ bool SpellInfo::IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const
|
|||
return matchCount * 2 == auraCount;
|
||||
}
|
||||
|
||||
bool SpellInfo::ValidateAttribute6SpellDamageMods(const Unit* caster, const AuraEffect* auraEffect, bool isDot) const
|
||||
bool SpellInfo::ValidateAttribute6SpellDamageMods(Unit const* caster, const AuraEffect* auraEffect, bool isDot) const
|
||||
{
|
||||
// Xinef: no attribute
|
||||
if (!(AttributesEx6 & SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS))
|
||||
|
|
@ -1735,7 +1735,7 @@ bool SpellInfo::ValidateAttribute6SpellDamageMods(const Unit* caster, const Aura
|
|||
// Xinef: Scourge Strike - Trigger
|
||||
if (Id == 70890 && auraEffect)
|
||||
{
|
||||
const SpellInfo* auraInfo = auraEffect->GetSpellInfo();
|
||||
SpellInfo const* auraInfo = auraEffect->GetSpellInfo();
|
||||
return auraInfo->SpellIconID == 3086 ||
|
||||
(auraInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (auraInfo->SpellFamilyFlags & flag96(8388608, 64, 16) || auraInfo->SpellIconID == 235 || auraInfo->SpellIconID == 154));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ public:
|
|||
// xinef: aura stacking
|
||||
bool IsStrongerAuraActive(Unit const* caster, Unit const* target) const;
|
||||
bool IsAuraEffectEqual(SpellInfo const* otherSpellInfo) const;
|
||||
bool ValidateAttribute6SpellDamageMods(const Unit* caster, const AuraEffect* auraEffect, bool isDot) const;
|
||||
bool ValidateAttribute6SpellDamageMods(Unit const* caster, const AuraEffect* auraEffect, bool isDot) const;
|
||||
|
||||
SpellSchoolMask GetSchoolMask() const;
|
||||
uint32 GetAllEffectsMechanicMask() const;
|
||||
|
|
|
|||
|
|
@ -2853,10 +2853,10 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
|
|||
|
||||
for (uint8 j = 0; j < MAX_TALENT_RANK; j++)
|
||||
if (uint32 spellId = talentInfo->RankID[j])
|
||||
if (const SpellInfo* spellInfo = GetSpellInfo(spellId))
|
||||
if (SpellInfo const* spellInfo = GetSpellInfo(spellId))
|
||||
for (uint8 k = 0; k < MAX_SPELL_EFFECTS; ++k)
|
||||
if (spellInfo->Effects[k].Effect == SPELL_EFFECT_LEARN_SPELL)
|
||||
if (const SpellInfo* learnSpell = GetSpellInfo(spellInfo->Effects[k].TriggerSpell))
|
||||
if (SpellInfo const* learnSpell = GetSpellInfo(spellInfo->Effects[k].TriggerSpell))
|
||||
if (learnSpell->IsRanked() && !learnSpell->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_DO_NOT_DISPLAY)))
|
||||
mTalentSpellAdditionalSet.insert(learnSpell->Id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ struct boss_quartermaster_zigris : public BossAI
|
|||
_JustDied();
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_STUNBOMB || spellInfo->Id == SPELL_HOOKEDNET)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* /*target*/) const override { return me->IsVisible(); }
|
||||
bool CanAIAttack(Unit const* /*target*/) const override { return me->IsVisible(); }
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Mechanic == MECHANIC_DISARM && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
|
|
@ -250,7 +250,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_MOUNT_TARGET_MIDNIGHT)
|
||||
{
|
||||
|
|
@ -355,7 +355,7 @@ public:
|
|||
Talk(SAY_ATTUMEN2_DEATH);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Mechanic == MECHANIC_DISARM && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
creature->AI()->KilledUnit(who);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_INFERNAL_RELAY)
|
||||
{
|
||||
|
|
@ -247,7 +247,7 @@ public:
|
|||
|
||||
void EnfeebleHealthEffect()
|
||||
{
|
||||
const SpellInfo* info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT);
|
||||
SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT);
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ public:
|
|||
DrinkInturrupted = true;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) override
|
||||
void SpellHit(Unit* /*pAttacker*/, SpellInfo const* Spell) override
|
||||
{
|
||||
//We only care about interrupt effects and only if they are durring a spell currently being cast
|
||||
if ((Spell->Effects[0].Effect != SPELL_EFFECT_INTERRUPT_CAST &&
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ public:
|
|||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* Spell) override
|
||||
{
|
||||
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand() % 10)))
|
||||
{
|
||||
|
|
@ -1127,7 +1127,7 @@ public:
|
|||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* Spell) override
|
||||
{
|
||||
if (Spell->Id == SPELL_DRINK_POISON)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
SummonList summons;
|
||||
ObjectGuid CrystalGUID;
|
||||
|
||||
bool CanAIAttack(const Unit* who) const override
|
||||
bool CanAIAttack(Unit const* who) const override
|
||||
{
|
||||
return who->GetPositionX() > 216.0f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ public:
|
|||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* pSpell) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* pSpell) override
|
||||
{
|
||||
if (!_duelInProgress && pSpell->Id == SPELL_DUEL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->IsAlive() && !speechCounter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ public:
|
|||
Talk(SAY_MO_KILL);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
|
||||
{
|
||||
//When hit with resurrection say text
|
||||
if (spell->Id == SPELL_SCARLET_RESURRECTION)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ public:
|
|||
}
|
||||
|
||||
// used for shadow portal
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellinfo) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellinfo) override
|
||||
{
|
||||
uint32 room = 0;
|
||||
if (spellinfo && spellinfo->Id == SPELL_SHADOW_PORTAL && target && me->GetVictim())
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ public:
|
|||
me->CastSpell(me, SPELL_DEMONIC_VAPOR_TRAIL_PERIODIC, true);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit*, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit*, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_DEMONIC_VAPOR)
|
||||
me->CastSpell(me, SPELL_SUMMON_BLAZING_DEAD, true);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ public:
|
|||
damage = 0;
|
||||
}
|
||||
|
||||
void SpellHit(Unit*, const SpellInfo* spell) override
|
||||
void SpellHit(Unit*, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_TRANSFORM_SPLIT2)
|
||||
EnterPhase(PHASE_HUMAN);
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ public:
|
|||
|
||||
void Reset() override { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_FIRE_BOMB_THROW)
|
||||
DoCast(me, SPELL_FIRE_BOMB_DUMMY, true);
|
||||
|
|
@ -668,7 +668,7 @@ public:
|
|||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_HATCH_EGG)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ public:
|
|||
|
||||
void EnterCombat(Unit* /*target*/) override { }
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_ZAP_INFORM)
|
||||
DoCast(caster, SPELL_ZAP_DAMAGE, true);
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit*, const SpellInfo* spell) override
|
||||
void SpellHit(Unit*, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_COSMETIC_SPEAR_THROW)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ public:
|
|||
uint32 timer;
|
||||
ObjectGuid _targetGUID;
|
||||
|
||||
void SpellHit(Unit*, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit*, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_SHOOT && roll_chance_i(7))
|
||||
me->CastSpell(me, SPELL_DEATHS_DOOR, true);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public:
|
|||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
if (bReset || spell->Id != 3607)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ struct npc_brewfest_keg_thrower : public ScriptedAI
|
|||
}
|
||||
}
|
||||
|
||||
bool CanBeSeen(const Player* player) override
|
||||
bool CanBeSeen(Player const* player) override
|
||||
{
|
||||
if (player->GetMountID() == RAM_DISPLAY_ID)
|
||||
return true;
|
||||
|
|
@ -343,7 +343,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
|||
void MoveInLineOfSight(Unit* /*who*/) override {}
|
||||
void EnterCombat(Unit*) override {}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_REPORT_DEATH)
|
||||
{
|
||||
|
|
@ -733,7 +733,7 @@ struct npc_dark_iron_guzzler : public ScriptedAI
|
|||
who->CastSpell(who, SPELL_REPORT_DEATH, true);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (me->IsAlive() && spellInfo->Id == SPELL_PLAYER_MUG)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ struct npc_soh_fire_trigger : public NullCreatureAI
|
|||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_START_FIRE)
|
||||
{
|
||||
|
|
@ -882,7 +882,7 @@ struct npc_hallows_end_train_fire : public NullCreatureAI
|
|||
me->CastSpell(me, SPELL_FIRE_AURA_BASE, true);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_WATER_SPLASH && caster->ToPlayer())
|
||||
{
|
||||
|
|
@ -998,7 +998,7 @@ struct boss_headless_horseman : public ScriptedAI
|
|||
health = param;
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_SUMMONING_RHYME_TARGET)
|
||||
{
|
||||
|
|
@ -1007,7 +1007,7 @@ struct boss_headless_horseman : public ScriptedAI
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_THROW_HEAD_BACK)
|
||||
{
|
||||
|
|
@ -1228,7 +1228,7 @@ struct boss_headless_horseman_head : public ScriptedAI
|
|||
uint32 timer;
|
||||
bool handled;
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_THROW_HEAD_BACK)
|
||||
{
|
||||
|
|
@ -1239,7 +1239,7 @@ struct boss_headless_horseman_head : public ScriptedAI
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
|
|
@ -1356,7 +1356,7 @@ struct boss_headless_horseman_pumpkin : public ScriptedAI
|
|||
me->CastSpell(me, SPELL_PUMPKIN_VISUAL, true);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_SPROUTING)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ struct npc_pilgrims_bounty_chair : public VehicleAI
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
Unit* charm = target->GetCharm();
|
||||
if (!charm || !charm->ToCreature())
|
||||
|
|
@ -210,7 +210,7 @@ struct npc_pilgrims_bounty_chair : public VehicleAI
|
|||
charm->ToCreature()->AI()->DoAction(spellInfo->Id);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*target*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*target*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
|
|
@ -281,7 +281,7 @@ struct npc_pilgrims_bounty_plate : public NullCreatureAI
|
|||
{
|
||||
npc_pilgrims_bounty_plate(Creature* creature) : NullCreatureAI(creature) { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ public:
|
|||
void DoCastProtection()
|
||||
{
|
||||
// lets get spell info
|
||||
const SpellInfo* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
|
||||
SpellInfo const* info = sSpellMgr->GetSpellInfo(SPELL_PROTECTION_OF_ELUNE);
|
||||
|
||||
if (!info)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
events.ScheduleEvent(EVENT_SPELL_TIME_STOP, 20000);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_TIME_STEP_H || spellInfo->Id == SPELL_TIME_STEP_N)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1568,7 +1568,7 @@ public:
|
|||
changeTimer = time;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_ARTHAS_CRUSADER_STRIKE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (target->IsPlayer() && spell->DurationEntry && spell->DurationEntry->ID == 328 && spell->Effects[EFFECT_1].TargetA.GetTarget() == 1 && (spell->Effects[EFFECT_1].Amplitude == 50 || spell->Effects[EFFECT_1].Amplitude == 215)) // Deep Breath
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* entry) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* entry) override
|
||||
{
|
||||
if (caster == me)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void SpellHit(Unit* unit, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* unit, SpellInfo const* spell) override
|
||||
{
|
||||
if (spellhit)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* Caster, const SpellInfo* Spell) override
|
||||
void SpellHit(Unit* Caster, SpellInfo const* Spell) override
|
||||
{
|
||||
if (Spell->SpellFamilyFlags[2] & 0x080000000)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) override
|
||||
void SpellHit(Unit* /*pCaster*/, SpellInfo const* pSpell) override
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN)
|
||||
ClearSleeping();
|
||||
|
|
|
|||
|
|
@ -615,7 +615,7 @@ public:
|
|||
DoCast(SPELL_OMEN_SUMMON_SPOTLIGHT);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_ELUNE_CANDLE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public:
|
|||
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) override
|
||||
void SpellHit(Unit* /*pCaster*/, SpellInfo const* pSpell) override
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO)
|
||||
ClearFaint();
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class boss_anub_arak : public CreatureScript
|
|||
|
||||
void SummonHelpers(float x, float y, float z, uint32 spellId)
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
me->SummonCreature(spellInfo->Effects[EFFECT_0].MiscValue, x, y, z);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ struct boss_taldaram : public BossAI
|
|||
me->InterruptNonMeleeSpells(true);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, const SpellInfo *spellInfo) override
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_CONJURE_FLAME_SPHERE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* who) const override
|
||||
bool CanAIAttack(Unit const* who) const override
|
||||
{
|
||||
return me->GetHomePosition().GetExactDist2d(who) < 52.0f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public:
|
|||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == 66905 && me->GetHealth() == 1) // hammer throw back damage (15k)
|
||||
me->CastSpell(me, 68197, true);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) override
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
{
|
||||
|
|
@ -410,7 +410,7 @@ public:
|
|||
events.RescheduleEvent(2, urand(3000, 4000)); // claw
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_BK_GHOUL_EXPLODE)
|
||||
{
|
||||
|
|
@ -419,7 +419,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
switch(spell->Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ public:
|
|||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* target) const override
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
return target->GetEntry() != NPC_FROST_SPHERE;
|
||||
}
|
||||
|
|
@ -505,7 +505,7 @@ public:
|
|||
me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* target) const override
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
return target->GetEntry() != NPC_FROST_SPHERE && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
|
@ -569,7 +569,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if( spell->Id == SPELL_SPIKE_FAIL )
|
||||
{
|
||||
|
|
@ -640,7 +640,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if( !target || !spell )
|
||||
return;
|
||||
|
|
@ -713,7 +713,7 @@ public:
|
|||
me->m_Events.AddEvent(new HideNpcEvent(*me), me->m_Events.CalculateTime(5000));
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* target) const override
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
return target->GetEntry() != NPC_FROST_SPHERE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public:
|
|||
pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) override
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
{
|
||||
|
|
@ -392,7 +392,7 @@ public:
|
|||
events.RescheduleEvent(EVENT_SPELL_MISTRESS_KISS, urand(10000, 15000));
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/) override
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override
|
||||
{
|
||||
//if (caster && spell && spell->Id == 66287 /*control vehicle*/)
|
||||
// caster->ClearUnitState(UNIT_STATE_ONVEHICLE);
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ public:
|
|||
if( !count || !GetOwner() )
|
||||
return;
|
||||
|
||||
if( const SpellInfo* se = GetAura()->GetSpellInfo() )
|
||||
if( SpellInfo const* se = GetAura()->GetSpellInfo() )
|
||||
if( Unit* owner = GetOwner()->ToUnit() )
|
||||
{
|
||||
uint32 auraId = 0;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue