Skip to content

Commit

Permalink
[9442] Add dummy effect of spell 44454 and script effect of spell 44455
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Feb 24, 2010
1 parent 2376224 commit 3f98042
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -1164,6 +1164,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->RemoveAurasDueToSpell(43874);
return;
}
case 44454: // Tasty Reef Fish
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;

m_caster->CastSpell(unitTarget, 44455, true, m_CastItem);
return;
}
case 44875: // Complete Raptor Capture
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
Expand Down Expand Up @@ -5306,6 +5314,39 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 41131, true);
break;
}
case 44455: // Character Script Effect Reverse Cast
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;

Creature* pTarget = (Creature*)unitTarget;

if (const SpellEntry *pSpell = sSpellStore.LookupEntry(m_spellInfo->CalculateSimpleValue(eff_idx)))
{
// if we used item at least once...
if (pTarget->isTemporarySummon() && pTarget->GetEntry() == pSpell->EffectMiscValue[eff_idx])
{
TemporarySummon* pSummon = (TemporarySummon*)pTarget;

// can only affect "own" summoned
if (pSummon->GetSummonerGUID() == m_caster->GetGUID())
{
if (pTarget->hasUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE))
pTarget->GetMotionMaster()->MovementExpired();

pTarget->GetMotionMaster()->MovePoint(0, m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ());
}

return;
}

// or if we are first time used item
m_caster->CastSpell(pTarget, pSpell, true);
pTarget->ForcedDespawn();
}

return;
}
case 44876: // Force Cast - Portal Effect: Sunwell Isle
{
if (!unitTarget)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9441"
#define REVISION_NR "9442"
#endif // __REVISION_NR_H__

6 comments on commit 3f98042

@athor
Copy link

@athor athor commented on 3f98042 Feb 24, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from where should be called spell 44456 in part of this script ? from EventAI ?
http://www.wowhead.com/?spell=44456
The Way to His Heart...: Summon Attracted Reef Bull - Summon (24804)

thank you

@NoFantasy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. set gm on
  2. tele to a near city
  3. yell in trade channel you are selling green items
  4. cast self 44456
  5. yell in channel again, this time in world
  6. summon a raid boss to the city and tell other GM's you didn't do it.
  7. set visibility off
  8. watch the effect of spell 44456
    ...no, honestly: read the code man, it's right there in front of you.
    m_caster->CastSpell(pTarget, pSpell, true);

@athor
Copy link

@athor athor commented on 3f98042 Feb 25, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real question more about dbc reading :i dont get how 44456 called from spell 44455 witch has scripteffect basepoint 44455 , is this basepoint +addition of EffectDieSide or EffectBaseDice ? indeed tested scripteffect works really nice.
anyway take it easy ;it may be a newbie question but dont need to be rude when ppl ask things nicely ^^

@NoFantasy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add the emote ":)" which i should have done. Anyway, the answer to how spellId 44456 is obtained is within the calculateSimpleValue function itself.

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this basepoint +addition of EffectDieSide or EffectBaseDice ?

Yes, source code is most up-to-date documentation and your friend and often can answer to you more fast that online discussion:

int32 CalculateSimpleValue(SpellEffectIndex eff) const { return _EffectBasePoints_[eff]+int32(_EffectBaseDice_[eff]); }

@athor
Copy link

@athor athor commented on 3f98042 Feb 25, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haa here it is, i get it now, would never had find this //helpers part def alone honestly . ok thanks to both of you guys and ofc no hard feelings NoFantasy :)

Please sign in to comment.