Skip to content

Commit

Permalink
[9182] Replace 0 with NULL in a few CastSpell calls (removed where no…
Browse files Browse the repository at this point in the history
…t needed)

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Jan 15, 2010
1 parent b26b912 commit ac7ef53
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/game/CharacterHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
{
// not blizz like, we must correctly save and load player instead...
if(pCurrChar->getRace() == RACE_NIGHTELF)
pCurrChar->CastSpell(pCurrChar, 20584, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
pCurrChar->CastSpell(pCurrChar, 20584, true); // auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
pCurrChar->CastSpell(pCurrChar, 8326, true); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)

pCurrChar->SetMovement(MOVE_WATER_WALK);
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void GameObject::Update(uint32 /*p_time*/)
{
Unit *caster = owner ? owner : ok;

caster->CastSpell(ok, goInfo->trap.spellId, true, 0, 0, GetGUID());
caster->CastSpell(ok, goInfo->trap.spellId, true, NULL, NULL, GetGUID());
m_cooldownTime = time(NULL) + 4; // 4 seconds

// count charges
Expand Down Expand Up @@ -804,7 +804,7 @@ void GameObject::TriggeringLinkedGameObject( uint32 trapEntry, Unit* target)
// found correct GO
// FIXME: when GO casting will be implemented trap must cast spell to target
if(trapGO)
target->CastSpell(target,trapSpell,true, 0, 0, GetGUID());
target->CastSpell(target, trapSpell, true, NULL, NULL, GetGUID());
}

GameObject* GameObject::LookupFishingHoleAround(float range)
Expand Down
8 changes: 4 additions & 4 deletions src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ void Aura::TriggerSpell()
// Brood Affliction: Bronze
case 23170:
{
m_target->CastSpell(m_target, 23171, true, 0, this);
m_target->CastSpell(m_target, 23171, true, NULL, this);
return;
}
// // Mark of Frost
Expand Down Expand Up @@ -4363,7 +4363,7 @@ void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
if ((*i)->GetSpellProto()->SpellIconID == 2229)
{
if (apply)
owner->CastSpell(owner, 34471, true, 0, this);
owner->CastSpell(owner, 34471, true, NULL, this);
else
owner->RemoveAurasDueToSpell(34471);
break;
Expand Down Expand Up @@ -7488,12 +7488,12 @@ void Aura::PeriodicDummyTick()
// Feeding Frenzy Rank 1
case 53511:
if ( m_target->GetHealth() * 100 < m_target->GetMaxHealth() * 35 )
m_target->CastSpell(m_target, 60096, true, 0, this);
m_target->CastSpell(m_target, 60096, true, NULL, this);
return;
// Feeding Frenzy Rank 2
case 53512:
if ( m_target->GetHealth() * 100 < m_target->GetMaxHealth() * 35 )
m_target->CastSpell(m_target, 60097, true, 0, this);
m_target->CastSpell(m_target, 60097, true, NULL, this);
return;
default:
break;
Expand Down
10 changes: 5 additions & 5 deletions src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
int chance = (*i)->GetSpellProto()->CalculateSimpleValue(1);
if (roll_chance_i(chance))
// Mind Trauma
m_caster->CastSpell(unitTarget, 48301, true, 0);
m_caster->CastSpell(unitTarget, 48301, true);
break;
}
}
Expand Down Expand Up @@ -1582,9 +1582,9 @@ void Spell::EffectDummy(uint32 i)
return;
}
if (m_caster->IsFriendlyTo(unitTarget))
m_caster->CastSpell(unitTarget, heal, true, 0);
m_caster->CastSpell(unitTarget, heal, true);
else
m_caster->CastSpell(unitTarget, hurt, true, 0);
m_caster->CastSpell(unitTarget, hurt, true);
return;
}
break;
Expand Down Expand Up @@ -1800,9 +1800,9 @@ void Spell::EffectDummy(uint32 i)
}

if (m_caster->IsFriendlyTo(unitTarget))
m_caster->CastSpell(unitTarget, heal, true, 0);
m_caster->CastSpell(unitTarget, heal, true);
else
m_caster->CastSpell(unitTarget, hurt, true, 0);
m_caster->CastSpell(unitTarget, hurt, true);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/SpellHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
if(spellInfo)
_player->CastSpell(_player,spellInfo,false,0);
_player->CastSpell(_player, spellInfo, false);

_player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9181"
#define REVISION_NR "9182"
#endif // __REVISION_NR_H__

0 comments on commit ac7ef53

Please sign in to comment.