aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp8
-rw-r--r--src/server/game/Spells/SpellScript.cpp3
-rw-r--r--src/server/game/Spells/SpellScript.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 9954a89d928..95df657d03d 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4040,9 +4040,9 @@ void Spell::EffectKnockBack()
return;
float ratio = 0.1f;
- float speedxy = float(effectInfo->MiscValue) * ratio;
- float speedz = float(damage) * ratio;
- if (speedxy < 0.01f && speedz < 0.01f)
+ float speedXY = float(effectInfo->MiscValue) * ratio;
+ float speedZ = float(damage) * ratio;
+ if (std::abs(speedXY) < 0.01f && std::abs(speedZ) < 0.01f)
return;
Position origin;
@@ -4056,7 +4056,7 @@ void Spell::EffectKnockBack()
else //if (effectInfo->Effect == SPELL_EFFECT_KNOCK_BACK)
origin = m_caster->GetPosition();
- unitTarget->KnockbackFrom(origin, speedxy, speedz);
+ unitTarget->KnockbackFrom(origin, speedXY, speedZ);
Unit::ProcSkillsAndAuras(GetUnitCasterForEffectHandlers(), unitTarget, PROC_FLAG_NONE, { PROC_FLAG_NONE, PROC_FLAG_2_KNOCKBACK },
PROC_SPELL_TYPE_MASK_ALL, PROC_SPELL_PHASE_HIT, PROC_HIT_NONE, nullptr, nullptr, nullptr);
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 9ffefa47fc6..db24e13cb19 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -21,7 +21,6 @@
#include "Spell.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
-#include "StringConvert.h"
#include "Unit.h"
#include <string>
@@ -35,7 +34,7 @@ bool SpellScriptBase::_Validate(SpellInfo const* entry)
return true;
}
-SpellScriptBase::SpellScriptBase() noexcept : m_currentScriptState(SPELL_SCRIPT_STATE_NONE), m_scriptSpellId(0)
+SpellScriptBase::SpellScriptBase() noexcept : m_scriptSpellId(0), m_currentScriptState(SPELL_SCRIPT_STATE_NONE)
{
}
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 77c5c512fc7..739355cd21e 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -174,9 +174,9 @@ protected:
Ret(* Thunk)(BaseClass&, Args..., StorageType);
};
- uint8 m_currentScriptState;
std::string_view m_scriptName;
uint32 m_scriptSpellId;
+ uint8 m_currentScriptState;
private: