[12090] Implement some spells for AQ40

Dark Glare beam spells: 26137, 26009, 26136 and 26029
Server side spell: 26133
This commit is contained in:
Xfurry 2012-08-13 20:24:01 +02:00 committed by Antz
parent 636afadf45
commit 5aef24e6f5
6 changed files with 45 additions and 10 deletions

View file

@ -18018,6 +18018,7 @@ INSERT INTO `spell_template` VALUES
(21387, 0x00000028, 15, 21, 6, 1, 0, 42, 0, 21388, 'Melt-Weapon trigger aura related used by Ragnaros'),
(23363, 0x00000000, 101, 21, 76, 18, 0, 0, 179804, 0, 'Summon Drakonid Corpse Trigger'),
(25192, 0x00000000, 101, 21, 76, 18, 0, 0, 180619, 0, 'Summon Ossirian Crystal'),
(26133, 0x00000000, 101, 21, 76, 18, 0, 0, 180795, 0, 'Summon Sandworm Base'),
(62388, 0x00000000, 101, 21, 6, 1, 0, 4, 0, 0, 'Aura required for Demonic Circle 48020');
/*!40000 ALTER TABLE `spell_template` ENABLE KEYS */;
UNLOCK TABLES;

View file

@ -0,0 +1,3 @@
DELETE FROM spell_template WHERE id IN (26133);
INSERT INTO spell_template VALUES
(26133, 0x00000000, 101, 21, 76, 18, 0, 0, 180795, 0, 'Summon Sandworm Base');

View file

@ -2482,8 +2482,13 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
break;
case TARGET_IN_FRONT_OF_CASTER:
{
bool inFront = m_spellInfo->SpellVisual[0] != 3879;
FillAreaTargets(targetUnitMap, radius, inFront ? PUSH_IN_FRONT : PUSH_IN_BACK, SPELL_TARGETS_AOE_DAMAGE);
SpellNotifyPushType pushType = PUSH_IN_FRONT;
switch (m_spellInfo->SpellVisual[0]) // Some spell require a different target fill
{
case 3879: pushType = PUSH_IN_BACK; break;
case 7441: pushType = PUSH_IN_FRONT_15; break;
}
FillAreaTargets(targetUnitMap, radius, pushType, SPELL_TARGETS_AOE_DAMAGE);
break;
}
case TARGET_LARGE_FRONTAL_CONE:

View file

@ -46,6 +46,7 @@
#include "Vehicle.h"
#include "CellImpl.h"
#include "Language.h"
#include "MapManager.h"
#define NULL_AURA_SLOT 0xFF
@ -1264,10 +1265,23 @@ void Aura::TriggerSpell()
}
// // Pain Spike
// case 25572: break;
// // Rotate 360
// case 26009: break;
// // Rotate -360
// case 26136: break;
case 26009: // Rotate 360
case 26136: // Rotate -360
{
float newAngle = target->GetOrientation();
if (auraId == 26009)
newAngle += M_PI_F/40;
else
newAngle -= M_PI_F/40;
MapManager::NormalizeOrientation(newAngle);
target->SetFacingTo(newAngle);
target->CastSpell(target, 26029, true);
return;
}
// // Consume
// case 26196: break;
// // Berserk
@ -8094,9 +8108,13 @@ void Aura::PeriodicDummyTick()
case 68876: // Wailing Souls
{
// Sweep around
float newAngle = target->GetOrientation() + (spell->Id == 68875 ? 0.09f : 2 * M_PI_F - 0.09f);
if (newAngle > 2 * M_PI_F)
newAngle -= 2 * M_PI_F;
float newAngle = target->GetOrientation();
if (spell->Id == 68875)
newAngle += 0.09f;
else
newAngle -= 0.09f;
MapManager::NormalizeOrientation(newAngle);
target->SetFacingTo(newAngle);

View file

@ -6871,6 +6871,14 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect)
unitTarget->HandleEmote(EMOTE_ONESHOT_CHEER);
return;
}
case 26137: // Rotate Trigger
{
if (!unitTarget)
return;
unitTarget->CastSpell(unitTarget, urand(0, 1) ? 26009 : 26136, true);
return;
}
case 26218: // Mistletoe
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "0078"
#define REVISION_NR "12090"
#endif // __REVISION_NR_H__