mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Creature/Script: Daegarn
Remove the incorrect SAI and move it to cpp
This commit is contained in:
3
sql/updates/world/3.3.5/2019_03_06_02_world.sql
Normal file
3
sql/updates/world/3.3.5/2019_03_06_02_world.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET AIName="" WHERE `entry` IN (24151);
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24151) AND `source_type`=0;
|
||||||
@@ -356,6 +356,7 @@ enum Daegarnn
|
|||||||
NPC_PRISONER_1 = 24253, // looks the same but has different abilities
|
NPC_PRISONER_1 = 24253, // looks the same but has different abilities
|
||||||
NPC_PRISONER_2 = 24254,
|
NPC_PRISONER_2 = 24254,
|
||||||
NPC_PRISONER_3 = 24255,
|
NPC_PRISONER_3 = 24255,
|
||||||
|
SAY_TEXT = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static float afSummon[] = {838.81f, -4678.06f, -94.182f};
|
static float afSummon[] = {838.81f, -4678.06f, -94.182f};
|
||||||
@@ -382,10 +383,19 @@ public:
|
|||||||
|
|
||||||
bool bEventInProgress;
|
bool bEventInProgress;
|
||||||
ObjectGuid uiPlayerGUID;
|
ObjectGuid uiPlayerGUID;
|
||||||
|
TaskScheduler _scheduler;
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
|
_scheduler.Schedule(40s, [this](TaskContext sayContext)
|
||||||
|
{
|
||||||
|
if (!bEventInProgress)
|
||||||
|
{
|
||||||
|
Talk(SAY_TEXT);
|
||||||
|
sayContext.Repeat(40s);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartEvent(ObjectGuid uiGUID)
|
void StartEvent(ObjectGuid uiGUID)
|
||||||
@@ -395,8 +405,18 @@ public:
|
|||||||
|
|
||||||
uiPlayerGUID = uiGUID;
|
uiPlayerGUID = uiGUID;
|
||||||
|
|
||||||
|
bEventInProgress = true;
|
||||||
SummonGladiator(NPC_FIRJUS);
|
SummonGladiator(NPC_FIRJUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
if (bEventInProgress && !UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_scheduler.Update(diff);
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user