Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.x
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
UPDATE `creature_template` SET `mindmg`=509,`maxdmg`=683,`attackpower`=805,`dmg_multiplier`=150 WHERE `entry`=36597; -- The Lich King 10N
|
||||
UPDATE `creature_template` SET `mindmg`=509,`maxdmg`=683,`attackpower`=805,`dmg_multiplier`=180 WHERE `entry`=39166; -- The Lich King 25N
|
||||
UPDATE `creature_template` SET `mindmg`=509,`maxdmg`=683,`attackpower`=805,`dmg_multiplier`=180 WHERE `entry`=39167; -- The Lich King 10H
|
||||
UPDATE `creature_template` SET `mindmg`=509,`maxdmg`=683,`attackpower`=805,`dmg_multiplier`=225 WHERE `entry`=39168; -- The Lich King 25H
|
||||
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_gen_damage_reduction_aura';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(20911,'spell_gen_damage_reduction_aura'), -- Blessing of Sanctuary
|
||||
(25899,'spell_gen_damage_reduction_aura'), -- Greater Blessing of Sanctuary
|
||||
(63944,'spell_gen_damage_reduction_aura'), -- Renewed Hope
|
||||
(50720,'spell_gen_damage_reduction_aura'); -- Vigilance
|
||||
@@ -664,9 +664,9 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
|
||||
return 0;
|
||||
}
|
||||
|
||||
creature->m_isWorldObject = true; //so it will not be unloaded with grid
|
||||
map->AddToMap(creature);
|
||||
m_NPCPassengerSet.insert(creature);
|
||||
creature->SetWorldObject(true); //so it will not be unloaded with grid
|
||||
|
||||
if (tguid == 0)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->CastSpell(player, SPELL_LEARN_SMELT, false);
|
||||
player->CastSpell(player, SPELL_LEARN_SMELT, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
|
||||
@@ -240,6 +240,8 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
_cannotMove = true;
|
||||
|
||||
me->SetFlying(true);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data)
|
||||
@@ -351,6 +353,8 @@ public:
|
||||
_EnterCombat();
|
||||
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetFlying(false);
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
Talk(SAY_AGGRO_P_ONE);
|
||||
@@ -404,6 +408,7 @@ public:
|
||||
void PrepareForVortex()
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetFlying(true);
|
||||
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MovePoint(MOVE_VORTEX, MalygosPositions[1].GetPositionX(), MalygosPositions[1].GetPositionY(), MalygosPositions[1].GetPositionZ());
|
||||
@@ -439,6 +444,7 @@ public:
|
||||
me->SetInCombatWithZone();
|
||||
break;
|
||||
case MOVE_CENTER_PLATFORM:
|
||||
// Malygos is already flying here, there is no need to set it again.
|
||||
_cannotMove = false;
|
||||
// malygos will move into center of platform and then he does not chase dragons, he just turns to his current target.
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
@@ -451,22 +457,21 @@ public:
|
||||
SetPhase(PHASE_TWO, true);
|
||||
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetFlying(true);
|
||||
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->GetMotionMaster()->MovePoint(MOVE_DEEP_BREATH_ROTATION, MalygosPhaseTwoWaypoints[0]);
|
||||
|
||||
Creature* summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS-1]);
|
||||
if (summon && summon->IsAIEnabled)
|
||||
summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_2);
|
||||
summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[0]);
|
||||
if (summon && summon->IsAIEnabled)
|
||||
summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_1);
|
||||
|
||||
for (uint8 i = 0; i < 2; i++)
|
||||
{
|
||||
// Starting position. One starts from the first waypoint and another from the last.
|
||||
uint8 pos = !i ? MAX_HOVER_DISK_WAYPOINTS-1 : 0;
|
||||
if (Creature* summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[pos]))
|
||||
if (summon->IsAIEnabled)
|
||||
summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_1+i);
|
||||
|
||||
// not sure about its position.
|
||||
summon = me->SummonCreature(NPC_HOVER_DISK_MELEE, HoverDiskWaypoints[0]);
|
||||
if (summon)
|
||||
if (Creature* summon = me->SummonCreature(NPC_HOVER_DISK_MELEE, HoverDiskWaypoints[0]))
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
@@ -695,6 +700,7 @@ class spell_malygos_vortex_visual : public SpellScriptLoader
|
||||
malygos->SetInCombatWithZone();
|
||||
|
||||
malygos->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
malygos->SetFlying(false);
|
||||
|
||||
malygos->GetMotionMaster()->MoveChase(caster->getVictim());
|
||||
malygos->RemoveAura(SPELL_VORTEX_1);
|
||||
|
||||
@@ -1359,6 +1359,69 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum DamageReductionAura
|
||||
{
|
||||
SPELL_BLESSING_OF_SANCTUARY = 20911,
|
||||
SPELL_GREATER_BLESSING_OF_SANCTUARY = 25899,
|
||||
SPELL_RENEWED_HOPE = 63944,
|
||||
SPELL_VIGILANCE = 50720,
|
||||
SPELL_DAMAGE_REDUCTION_AURA = 68066,
|
||||
};
|
||||
|
||||
class spell_gen_damage_reduction_aura : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_damage_reduction_aura() : SpellScriptLoader("spell_gen_damage_reduction_aura") { }
|
||||
|
||||
class spell_gen_damage_reduction_auraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_damage_reduction_auraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*SpellEntry*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DAMAGE_REDUCTION_AURA))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (!target || target->HasAura(SPELL_DAMAGE_REDUCTION_AURA))
|
||||
return;
|
||||
|
||||
target->CastSpell(target, SPELL_DAMAGE_REDUCTION_AURA, true);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (!target || !target->HasAura(SPELL_DAMAGE_REDUCTION_AURA))
|
||||
return;
|
||||
|
||||
if (target->HasAura(SPELL_BLESSING_OF_SANCTUARY) ||
|
||||
target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY) ||
|
||||
target->HasAura(SPELL_RENEWED_HOPE) ||
|
||||
target->HasAura(SPELL_VIGILANCE))
|
||||
return;
|
||||
|
||||
target->RemoveAurasDueToSpell(SPELL_DAMAGE_REDUCTION_AURA);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_gen_damage_reduction_auraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_gen_damage_reduction_auraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_gen_damage_reduction_auraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -1390,4 +1453,5 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_launch();
|
||||
new spell_gen_vehicle_scaling();
|
||||
new spell_gen_oracle_wolvar_reputation();
|
||||
new spell_gen_damage_reduction_aura();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user