Core/Misc: Reduce differences between branches

This commit is contained in:
Shauren
2025-07-25 16:55:15 +02:00
parent f536e1a266
commit 65715e7dd9
6 changed files with 29 additions and 26 deletions

View File

@@ -393,25 +393,6 @@ class NecroticPlagueTargetCheck
uint32 _notAura2;
};
class HeightDifferenceCheck
{
public:
HeightDifferenceCheck(GameObject* go, float diff, bool reverse)
: _baseObject(go), _difference(diff), _reverse(reverse)
{
}
bool operator()(WorldObject* unit) const
{
return (unit->GetPositionZ() - _baseObject->GetPositionZ() > _difference) != _reverse;
}
private:
GameObject* _baseObject;
float _difference;
bool _reverse;
};
class FrozenThroneResetWorker
{
public:
@@ -1510,7 +1491,7 @@ struct npc_valkyr_shadowguard : public ScriptedAI
{
std::list<Creature*> triggers;
GetCreatureListWithEntryInGrid(triggers, me, NPC_WORLD_TRIGGER, 150.0f);
triggers.remove_if(HeightDifferenceCheck(platform, 5.0f, true));
triggers.remove_if(Trinity::HeightDifferenceCheck(platform, 5.0f, true));
if (triggers.empty())
return;
@@ -2196,7 +2177,7 @@ class spell_the_lich_king_quake : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets)
{
if (GameObject* platform = ObjectAccessor::GetGameObject(*GetCaster(), GetCaster()->GetInstanceScript()->GetGuidData(DATA_ARTHAS_PLATFORM)))
targets.remove_if(HeightDifferenceCheck(platform, 5.0f, false));
targets.remove_if(Trinity::HeightDifferenceCheck(platform, 5.0f, false));
}
void HandleSendEvent(SpellEffIndex /*effIndex*/)

View File

@@ -712,7 +712,7 @@ class spell_warl_life_tap : public SpellScript
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
bool Validate(SpellInfo const* /*spell*/) override
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_WARLOCK_LIFE_TAP_ENERGIZE, SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 });
}