Core/Misc: 3.3.5a fixes

This commit is contained in:
Aokromes
2015-08-02 03:06:49 +02:00
parent 18251392b9
commit d39b762d88
9 changed files with 141 additions and 31 deletions

View File

@@ -150,13 +150,7 @@ enum Actions
ACTION_MONITOR_CORPOREALITY = 3,
// Orb Carrier
ACTION_SHOOT = 4,
// Living Inferno
ACTION_SUMMON_LIVING_EMBERS = 5,
// Meteor Flame
ACTION_SUMMON_FLAME = 6
ACTION_SHOOT = 4
};
enum Phases
@@ -1006,7 +1000,7 @@ class npc_meteor_strike_initial : public CreatureScript
if (HalionAI* halionAI = CAST_AI(HalionAI, owner->AI()))
{
Position const* ownerPos = halionAI->GetMeteorStrikePosition();
float randomAdjustment = frand(0.0f, static_cast<float>(M_PI / 7.0f));
float randomAdjustment = frand(0.0f, static_cast<float>(M_PI / 5.0f));
float angle[4];
angle[0] = me->GetAngle(ownerPos);
angle[1] = angle[0] + randomAdjustment;
@@ -1090,7 +1084,7 @@ class npc_meteor_strike : public CreatureScript
if (_events.ExecuteEvent() == EVENT_SPAWN_METEOR_FLAME)
{
Position pos = me->GetNearPosition(5.0f, frand(0.0f, static_cast<float>(M_PI / 8.0f)));
Position pos = me->GetNearPosition(5.0f, frand(-static_cast<float>(M_PI / 6.0f), static_cast<float>(M_PI / 6.0f)));
if (Creature* flame = me->SummonCreature(NPC_METEOR_STRIKE_FLAME, pos, TEMPSUMMON_TIMED_DESPAWN, 25000))
flame->AI()->SetGUID(me->GetGUID());
}
@@ -1150,8 +1144,7 @@ class npc_meteor_strike_flame : public CreatureScript
if (meteorStrike->AI()->GetData(DATA_SPAWNED_FLAMES) > 5)
return;
Position pos = me->GetNearPosition(5.0f, frand(0.0f, static_cast<float>(M_PI / 8.0f)));
Position pos = me->GetNearPosition(5.0f, frand(-static_cast<float>(M_PI / 6.0f), static_cast<float>(M_PI / 6.0f)));
if (Creature* flame = me->SummonCreature(NPC_METEOR_STRIKE_FLAME, pos, TEMPSUMMON_TIMED_DESPAWN, 25000))
flame->AI()->SetGUID(_rootOwnerGuid);
}
@@ -1358,7 +1351,7 @@ class go_twilight_portal : public GameObjectScript
_spellId = gameobject->GetGOInfo()->goober.spellId;
break;
case GO_HALION_PORTAL_1:
case GO_HALION_PORTAL_2: // Not used, not seen in sniffs. Just in case.
case GO_HALION_PORTAL_2:
gameobject->SetPhaseMask(0x1, true);
/// Because WDB template has non-existent spell ID, not seen in sniffs either, meh
_spellId = SPELL_TWILIGHT_REALM;

View File

@@ -697,6 +697,45 @@ class spell_hun_rapid_recuperation : public SpellScriptLoader
}
};
// 56654, 58882 - Rapid Recuperation
class spell_hun_rapid_recuperation : public SpellScriptLoader
{
public:
spell_hun_rapid_recuperation() : SpellScriptLoader("spell_hun_rapid_recuperation") { }
class spell_hun_rapid_recuperation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_rapid_recuperation_AuraScript);
bool Validate(SpellInfo const* spellInfo) override
{
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell))
return false;
return true;
}
void HandlePeriodic(AuraEffect const* aurEff)
{
PreventDefaultAction();
Unit* target = GetTarget();
uint32 mana = CalculatePct(target->GetMaxPower(POWER_MANA), aurEff->GetAmount());
target->CastCustomSpell(GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, SPELLVALUE_BASE_POINT0, int32(mana), target, true, nullptr, aurEff);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_rapid_recuperation_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_hun_rapid_recuperation_AuraScript();
}
};
// 23989 - Readiness
class spell_hun_readiness : public SpellScriptLoader
{
@@ -1095,6 +1134,7 @@ void AddSC_hunter_spell_scripts()
new spell_hun_pet_carrion_feeder();
new spell_hun_pet_heart_of_the_phoenix();
new spell_hun_rapid_recuperation();
new spell_hun_rapid_recuperation();
new spell_hun_readiness();
new spell_hun_ready_set_aim();
new spell_hun_scatter_shot();