fix(Core/Spells): Set Crashin' Thrashin' Robot duration to 3 min. (#15342)
* fix(Core/Spells): Set Crashin' Thrashin' Robot duration to 3 min. Fixes #15220 * Update. * missing sql. * buildfix. * Update src/server/scripts/World/npcs_special.cpp --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_crashin_thrashin_robot' WHERE `entry`=17299;
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "ScriptedGossip.h"
|
#include "ScriptedGossip.h"
|
||||||
#include "SmartAI.h"
|
#include "SmartAI.h"
|
||||||
#include "SpellAuras.h"
|
#include "SpellAuras.h"
|
||||||
|
#include "TaskScheduler.h"
|
||||||
#include "WaypointMgr.h"
|
#include "WaypointMgr.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
|
||||||
@@ -2653,6 +2654,32 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct npc_crashin_thrashin_robot : public ScriptedAI
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_crashin_thrashin_robot(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||||
|
{
|
||||||
|
_scheduler.Schedule(180s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
me->KillSelf();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
_scheduler.Update(diff);
|
||||||
|
|
||||||
|
ScriptedAI::UpdateAI(diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
TaskScheduler _scheduler;
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_npcs_special()
|
void AddSC_npcs_special()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -2680,4 +2707,5 @@ void AddSC_npcs_special()
|
|||||||
new npc_spring_rabbit();
|
new npc_spring_rabbit();
|
||||||
new npc_stable_master();
|
new npc_stable_master();
|
||||||
RegisterCreatureAI(npc_arcanite_dragonling);
|
RegisterCreatureAI(npc_arcanite_dragonling);
|
||||||
|
RegisterCreatureAI(npc_crashin_thrashin_robot);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user