*Fix Lightwell. By Elron
--HG-- branch : trunk
This commit is contained in:
@@ -72,14 +72,15 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
||||
( 20594, 65116, 0, 'Stoneform'),
|
||||
( 49039, 50397, 2, 'Lichborne - shapeshift'),
|
||||
( 64382, 64380, 0, 'Shattering Throw'),
|
||||
( 19574, 24395, 2, 'Beast Within'),
|
||||
( 19574, 24396, 2, 'Beast Within'),
|
||||
( 19574, 24397, 2, 'Beast Within'),
|
||||
( 19574, 26592, 2, 'Beast Within'),
|
||||
( 34471, 24395, 2, 'Beast Within'),
|
||||
( 34471, 24396, 2, 'Beast Within'),
|
||||
( 34471, 24397, 2, 'Beast Within'),
|
||||
( 34471, 26592, 2, 'Beast Within'),
|
||||
( 19574, 24395, 2, 'Bestial Wrath'),
|
||||
( 19574, 24396, 2, 'Bestial Wrath'),
|
||||
( 19574, 24397, 2, 'Bestial Wrath'),
|
||||
( 19574, 26592, 2, 'Bestial Wrath'),
|
||||
( 34471, 24395, 2, 'The Beast Within'),
|
||||
( 34471, 24396, 2, 'The Beast Within'),
|
||||
( 34471, 24397, 2, 'The Beast Within'),
|
||||
( 34471, 26592, 2, 'The Beast Within'),
|
||||
(-59907, 7, 0, 'Lightwell Charges - Suicide'),
|
||||
|
||||
-- Creature
|
||||
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
|
||||
@@ -2072,3 +2073,23 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (54643);
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
( 54643,-54643, 2, 'Wintergrasp Defender Teleport');
|
||||
|
||||
|
||||
-- lightwell
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_lightwell' WHERE `entry` IN (31883, 31893, 31894, 31895, 31896, 31897);
|
||||
|
||||
REPLACE INTO `npc_spellclick_spells` (npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags, quest_status) VALUES
|
||||
(31883, 60123, 0, 0, 0, 2, 0),
|
||||
(31893, 60123, 0, 0, 0, 2, 0),
|
||||
(31894, 60123, 0, 0, 0, 2, 0),
|
||||
(31895, 60123, 0, 0, 0, 2, 0),
|
||||
(31896, 60123, 0, 0, 0, 2, 0),
|
||||
(31897, 60123, 0, 0, 0, 2, 0);
|
||||
|
||||
REPLACE INTO `spell_bonus_data` (entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus, comments) VALUES
|
||||
(7001, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 1'),
|
||||
(27873, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 2'),
|
||||
(27874, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 3'),
|
||||
(28276, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 4'),
|
||||
(48084, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 5'),
|
||||
(48085, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 6');
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_lightwell' WHERE `entry` IN (31883, 31893, 31894, 31895, 31896, 31897);
|
||||
|
||||
REPLACE INTO `npc_spellclick_spells` (npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags, quest_status) VALUES
|
||||
(31883, 60123, 0, 0, 0, 2, 0),
|
||||
(31893, 60123, 0, 0, 0, 2, 0),
|
||||
(31894, 60123, 0, 0, 0, 2, 0),
|
||||
(31895, 60123, 0, 0, 0, 2, 0),
|
||||
(31896, 60123, 0, 0, 0, 2, 0),
|
||||
(31897, 60123, 0, 0, 0, 2, 0);
|
||||
|
||||
REPLACE INTO `spell_bonus_data` (entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus, comments) VALUES
|
||||
(7001, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 1'),
|
||||
(27873, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 2'),
|
||||
(27874, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 3'),
|
||||
(28276, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 4'),
|
||||
(48084, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 5'),
|
||||
(48085, -1, 0.3333, -1, -1, 'Priest - Lightwell Renew Rank 6');
|
||||
|
||||
REPLACE INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
(-59907, 7, 0, 'Lightwell Charges - Suicide');
|
||||
@@ -1679,6 +1679,40 @@ CreatureAI* GetAI_npc_mirror_image(Creature *_Creature)
|
||||
return new npc_mirror_image (_Creature);
|
||||
}
|
||||
|
||||
//TODO: 30% Attackdamage check for Lightwell
|
||||
struct TRINITY_DLL_DECL npc_lightwellAI : public PassiveAI
|
||||
{
|
||||
npc_lightwellAI(Creature *c) : PassiveAI(c) {}
|
||||
|
||||
//uint32 desummon_timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
//desummon_timer = 180000;
|
||||
m_creature->CastSpell(m_creature, 59907, false); // Spell for Lightwell Charges
|
||||
}
|
||||
|
||||
/*
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(desummon_timer < diff)
|
||||
{
|
||||
m_creature->Kill(m_creature);
|
||||
}else desummon_timer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(59907))
|
||||
{
|
||||
m_creature->Kill(m_creature);
|
||||
}
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_lightwellAI(Creature *_Creature)
|
||||
{
|
||||
return new npc_lightwellAI (_Creature);
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL npc_training_dummy : Scripted_NoMovementAI
|
||||
{
|
||||
npc_training_dummy(Creature *c) : Scripted_NoMovementAI(c) {}
|
||||
@@ -1812,6 +1846,11 @@ void AddSC_npcs_special()
|
||||
newscript->GetAI = &GetAI_npc_snake_trap_serpents;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_lightwell";
|
||||
newscript->GetAI = &GetAI_npc_lightwellAI;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_mirror_image";
|
||||
newscript->GetAI = &GetAI_npc_mirror_image;
|
||||
|
||||
@@ -5181,6 +5181,57 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
if(Unit *passenger = ((Vehicle*)m_caster)->GetPassenger(0))
|
||||
passenger->CastSpell(m_caster->m_Vehicle, damage, true);
|
||||
return;
|
||||
case 60123: // Lightwell Renew, TODO: 30% Attackdamage check for Lightwell
|
||||
{
|
||||
if(unitTarget && m_originalCaster)
|
||||
{
|
||||
Unit* owner = m_originalCaster->GetOwner();
|
||||
uint32 spell_heal;
|
||||
uint32 spell_charges = 59907;
|
||||
|
||||
switch(m_originalCaster->GetEntry())
|
||||
{
|
||||
case 31897: spell_heal = 7001; break;
|
||||
case 31896: spell_heal = 27873; break;
|
||||
case 31895: spell_heal = 27874; break;
|
||||
case 31894: spell_heal = 28276; break;
|
||||
case 31893: spell_heal = 48084; break;
|
||||
case 31883: spell_heal = 48085; break;
|
||||
}
|
||||
|
||||
if(owner && spell_heal && spell_charges)
|
||||
{
|
||||
if(owner->GetTypeId() == TYPEID_PLAYER && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if(((Player*)owner)->IsInSameRaidWith(((Player*)unitTarget)) && (!((Player*)unitTarget)->duel || unitTarget == owner) && !unitTarget->HasAura(spell_heal))
|
||||
{
|
||||
Aura *chargesaura = m_originalCaster->GetAura(spell_charges);
|
||||
if(chargesaura)
|
||||
{
|
||||
if(chargesaura->GetAuraCharges() > 1)
|
||||
{
|
||||
chargesaura->SetAuraCharges(chargesaura->GetAuraCharges() - 1);
|
||||
owner->CastSpell(unitTarget, spell_heal, true);
|
||||
if(unitTarget->IsPvP() && !owner->IsPvP())
|
||||
{
|
||||
owner->SetPvP(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_originalCaster->RemoveAura(chargesaura);
|
||||
owner->CastSpell(unitTarget, spell_heal, true);
|
||||
if(unitTarget->IsPvP() && !owner->IsPvP())
|
||||
{
|
||||
owner->SetPvP(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user