aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp5
-rw-r--r--src/game/SpellEffects.cpp30
-rw-r--r--src/game/Unit.cpp8
3 files changed, 19 insertions, 24 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 15893c51adb..71b0acfbbdc 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3562,10 +3562,7 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
case FORM_BEAR:
case FORM_DIREBEAR:
if (urand(0,99) < FurorChance)
- {
- int32 basePoints = 100; // Not sure if 100 is correct basePoints, maybe it should be 10?
- m_target->CastCustomSpell(m_target, 17057, &basePoints, NULL, NULL, true, NULL, this);
- }
+ m_target->CastSpell(m_target, 17057, true);
default:
{
uint32 newEnergy = std::min(m_target->GetPower(POWER_ENERGY), FurorChance);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ebb372c84a0..bcd1634ec1c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1606,8 +1606,8 @@ void Spell::EffectDummy(uint32 i)
if (!unitTarget || !unitTarget->isAlive())
return;
- int hurt = 0;
- int heal = 0;
+ uint32 hurt = 0;
+ uint32 heal = 0;
switch(m_spellInfo->Id)
{
case 47540: hurt = 47758; heal = 47757; break;
@@ -1630,15 +1630,15 @@ void Spell::EffectDummy(uint32 i)
if (m_spellInfo->SpellFamilyFlags[2] & 0x100)
{
//Shapeshifting into an animal form or mounting cancels the effect.
- if(m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
+ if (m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
{
- if(m_triggeredByAuraSpell)
+ if (m_triggeredByAuraSpell)
m_caster->RemoveAurasDueToSpell(m_triggeredByAuraSpell->Id);
return;
}
//Any effect which causes you to lose control of your character will supress the starfall effect.
- if(m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
+ if (m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
return;
m_caster->CastSpell(unitTarget, damage, true);
@@ -1652,35 +1652,35 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 63848, true);
break;
}
- switch(m_spellInfo->Id )
+ switch(m_spellInfo->Id)
{
case 5938: // Shiv
{
- if(m_caster->GetTypeId() != TYPEID_PLAYER)
+ if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
Player *pCaster = ((Player*)m_caster);
Item *item = pCaster->GetWeaponForAttack(OFF_ATTACK);
- if(!item)
+ if (!item)
return;
// all poison enchantments is temporary
uint32 enchant_id = item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT);
- if(!enchant_id)
+ if (!enchant_id)
return;
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
- if(!pEnchant)
+ if (!pEnchant)
return;
- for (int s=0; s<3; s++)
+ for (uint8 s = 0; s < 3; ++s)
{
- if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
+ if(pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
- SpellEntry const* combatEntry = sSpellStore.LookupEntry(pEnchant->spellid[s]);
- if(!combatEntry || combatEntry->Dispel != DISPEL_POISON)
+ SpellEntry const *combatEntry = sSpellStore.LookupEntry(pEnchant->spellid[s]);
+ if (!combatEntry || combatEntry->Dispel != DISPEL_POISON)
continue;
m_caster->CastSpell(unitTarget, combatEntry, true, item);
@@ -1691,7 +1691,7 @@ void Spell::EffectDummy(uint32 i)
}
case 14185: // Preparation
{
- if(m_caster->GetTypeId() != TYPEID_PLAYER)
+ if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
//immediately finishes the cooldown on certain Rogue abilities
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 280529a9cb1..884463cbc1e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -929,7 +929,7 @@ void Unit::CastStop(uint32 except_spellid)
void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castItem, AuraEffect* triggeredByAura, uint64 originalCaster)
{
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId );
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
@@ -937,10 +937,10 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte
return;
}
- CastSpell(Victim,spellInfo,triggered,castItem,triggeredByAura, originalCaster);
+ CastSpell(Victim, spellInfo, triggered, castItem, triggeredByAura, originalCaster);
}
-void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, Item *castItem, AuraEffect* triggeredByAura, uint64 originalCaster)
+void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered, Item *castItem, AuraEffect* triggeredByAura, uint64 originalCaster)
{
if (!spellInfo)
{
@@ -14790,9 +14790,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
}
if (!player)
- {
GetMotionMaster()->MoveKnockbackFrom(x, y, speedXY, speedZ);
- }
else
{
float vcos, vsin;