@@ -0,0 +1,34 @@
|
||||
UPDATE `creature_template` SET `ScriptName`="npc_king_jokkum_vehicle" WHERE `entry`=30331;
|
||||
|
||||
-- Pathing for King Jokkum Entry: 30331
|
||||
-- by malcrom
|
||||
SET @PATH := 2072200;
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN (@PATH, @PATH+1);
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
-- Path to event
|
||||
(@PATH,1,7357.088,-2865.398,803.5008,0,0,1,0,100,0),
|
||||
(@PATH,2,7357.088,-2865.398,803.5008,0,0,1,0,100,0),
|
||||
(@PATH,3,7355.184,-2904.322,821.0084,0,0,1,0,100,0),
|
||||
(@PATH,4,7355.473,-2946.654,833.0916,0,0,1,0,100,0),
|
||||
(@PATH,5,7360.866,-2994.785,845.9886,0,0,1,0,100,0),
|
||||
(@PATH,6,7378.764,-3035.887,840.6003,0,0,1,0,100,0),
|
||||
(@PATH,7,7411.658,-3072.211,837.5768,0,0,1,0,100,0),
|
||||
(@PATH,8,7453.996,-3088.695,837.5768,0,0,1,0,100,0),
|
||||
(@PATH,9,7496.08,-3113.922,837.5829,0,0,1,0,100,0),
|
||||
(@PATH,10,7536.843,-3136.489,837.5808,0,0,1,0,100,0),
|
||||
(@PATH,11,7564.738,-3145.144,844.8308,0,0,1,0,100,0),
|
||||
(@PATH,12,7604.358,-3171.258,850.8867,0,0,1,0,100,0),
|
||||
(@PATH,13,7635.467,-3207.211,857.19,0,0,1,0,100,0),
|
||||
(@PATH,14,7657.858,-3219.258,863.19,0,0,1,0,100,0),
|
||||
(@PATH,15,7706.542,-3219.742,864.3326,0,0,1,0,100,0),
|
||||
(@PATH,16,7747.335,-3226.993,862.4576,0,0,1,0,100,0),
|
||||
(@PATH,17,7796.658,-3221.782,860.6461,0,0,1,0,100,0),
|
||||
(@PATH,18,7827.596,-3229.273,856.4147,0,0,1,0,100,0),
|
||||
(@PATH,19,7846.174,-3253.239,852.1281,0,0,1,0,100,0),
|
||||
(@PATH,20,7846.174,-3253.239,852.1281,0.418879,0,1,0,100,0),
|
||||
-- Path after event and despawn
|
||||
(@PATH+1,1,7837.094,-3235.536,853.8781,0,0,1,0,100,0),
|
||||
(@PATH+1,2,7828.622,-3230.38,855.9147,0,0,1,0,100,0),
|
||||
(@PATH+1,3,7793.782,-3219.743,861.1461,0,0,1,0,100,0),
|
||||
(@PATH+1,4,7765.224,-3225.374,864.0826,0,0,1,0,100,0),
|
||||
(@PATH+1,5,7736.733,-3226.5,861.4576,0,0,1,0,100,0);
|
||||
@@ -3393,6 +3393,11 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
case 34471: // The Beast Within
|
||||
spellInfo->AttributesEx5 |= SPELL_ATTR5_USABLE_WHILE_CONFUSED | SPELL_ATTR5_USABLE_WHILE_FEARED | SPELL_ATTR5_USABLE_WHILE_STUNNED;
|
||||
break;
|
||||
case 56606: // Ride Jokkum
|
||||
case 61791: // Ride Vehicle (Yogg-Saron)
|
||||
/// @todo: remove this when basepoints of all Ride Vehicle auras are calculated correctly
|
||||
spellInfo->Effects[EFFECT_0].BasePoints = 1;
|
||||
break;
|
||||
// ULDUAR SPELLS
|
||||
//
|
||||
case 62374: // Pursued (Flame Leviathan)
|
||||
@@ -3431,10 +3436,6 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
// that will be clear if we get more spells with problem like this
|
||||
spellInfo->AttributesEx |= SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY;
|
||||
break;
|
||||
case 61791: // Ride Vehicle (Yogg-Saron)
|
||||
// TODO: remove this when basepoints of all Ride Vehicle auras are calculated correctly
|
||||
spellInfo->Effects[EFFECT_0].BasePoints = 1;
|
||||
break;
|
||||
case 64468: // Empowering Shadows (Yogg-Saron)
|
||||
case 64486: // Empowering Shadows (Yogg-Saron)
|
||||
spellInfo->MaxAffectedTargets = 3; // same for both modes?
|
||||
|
||||
@@ -163,7 +163,8 @@ public:
|
||||
## npc_brunnhildar_prisoner
|
||||
######*/
|
||||
|
||||
enum BrunnhildarPrisoner {
|
||||
enum BrunnhildarPrisoner
|
||||
{
|
||||
SPELL_ICE_PRISON = 54894,
|
||||
SPELL_ICE_LANCE = 55046,
|
||||
SPELL_FREE_PRISONER = 55048,
|
||||
@@ -635,14 +636,13 @@ class spell_close_rift : public SpellScriptLoader
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_jokkum_scriptcast
|
||||
# Krolmir, Hammer of Storms
|
||||
#####*/
|
||||
|
||||
enum JokkumScriptcast
|
||||
{
|
||||
SPELL_JOKKUM_KILL_CREDIT = 56545,
|
||||
SPELL_JOKKUM_SUMMON = 56541,
|
||||
SPELL_RIDE_JOKKUM = 56606,
|
||||
NPC_KINGJOKKUM = 30331,
|
||||
SAY_HOLD_ON = 0,
|
||||
PATH_JOKKUM = 2072200
|
||||
@@ -658,29 +658,15 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_JOKKUM_KILL_CREDIT) || !sSpellMgr->GetSpellInfo(SPELL_JOKKUM_SUMMON))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_JOKKUM_SUMMON))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
{
|
||||
player->CastSpell(player, SPELL_JOKKUM_KILL_CREDIT, true);
|
||||
player->CastSpell(player, SPELL_JOKKUM_SUMMON, true);
|
||||
|
||||
if (Creature* kingjokkum = GetClosestCreatureWithEntry(player, NPC_KINGJOKKUM, 10.0f))
|
||||
{
|
||||
kingjokkum->setFaction(player->getFaction());
|
||||
player->CastSpell(kingjokkum, SPELL_RIDE_JOKKUM, true);
|
||||
player->SetUInt64Value(PLAYER_FARSIGHT, player->GetGUID());
|
||||
kingjokkum->AI()->Talk(0, player->GetGUID());
|
||||
kingjokkum->ToPlayer()->SetClientControl(kingjokkum, 1);
|
||||
kingjokkum->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
|
||||
kingjokkum->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
}
|
||||
}
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, SPELL_JOKKUM_SUMMON, true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -695,6 +681,45 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class npc_king_jokkum_vehicle : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
|
||||
|
||||
struct npc_king_jokkum_vehicleAI : public VehicleAI
|
||||
{
|
||||
npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature) { }
|
||||
|
||||
void OnCharmed(bool /*apply*/) OVERRIDE { }
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
Talk(SAY_HOLD_ON, who->GetGUID());
|
||||
me->CastSpell(who, SPELL_JOKKUM_KILL_CREDIT, true);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) OVERRIDE
|
||||
{
|
||||
if (type != WAYPOINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
// PointId in WaypointMovementGenerator doesn't match with PointId in DB
|
||||
if (id == 19)
|
||||
me->GetVehicleKit()->RemoveAllPassengers();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_king_jokkum_vehicleAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_storm_peaks()
|
||||
{
|
||||
new npc_injured_goblin();
|
||||
@@ -706,4 +731,5 @@ void AddSC_storm_peaks()
|
||||
new npc_brann_bronzebeard_keystone();
|
||||
new spell_close_rift();
|
||||
new spell_jokkum_scriptcast();
|
||||
new npc_king_jokkum_vehicle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user