fix(Scripts/Silithus): Wind stone summons (#9859)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1640271107041665100');
|
||||||
|
|
||||||
|
-- Wind Stone Summons: Have talk event take target into consideration
|
||||||
|
UPDATE `smart_scripts` SET `action_param3` = 1 WHERE `entryorguid` IN (15203, 15204, 15205, 15206, 15207, 15208, 15209, 15211, 15212, 15220, 15305, 15307) AND `source_type` = 0 AND `id` = 0;
|
||||||
@@ -1055,7 +1055,8 @@ public:
|
|||||||
Seconds respawnTimer = 0s;
|
Seconds respawnTimer = 0s;
|
||||||
player->PlayerTalkClass->SendCloseGossip();
|
player->PlayerTalkClass->SendCloseGossip();
|
||||||
|
|
||||||
if (ObjectAccessor::GetCreature(*me, _creatureGuid))
|
Creature* lastSpawn = ObjectAccessor::GetCreature(*me, _creatureGuid);
|
||||||
|
if (lastSpawn && lastSpawn->IsAlive())
|
||||||
{
|
{
|
||||||
// We already summoned something recently, return.
|
// We already summoned something recently, return.
|
||||||
CloseGossipMenuFor(player);
|
CloseGossipMenuFor(player);
|
||||||
@@ -1167,10 +1168,9 @@ public:
|
|||||||
if (TempSummon* summons = go->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - M_PI, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10 * 60 * 1000))
|
if (TempSummon* summons = go->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - M_PI, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10 * 60 * 1000))
|
||||||
{
|
{
|
||||||
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
|
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
|
||||||
summons->AI()->Talk(SAY_ON_SPAWN_IN);
|
summons->SetTarget(player->GetGUID());
|
||||||
summons->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
summons->AI()->Talk(SAY_ON_SPAWN_IN, player);
|
||||||
summons->SendMeleeAttackStart(player);
|
summons->AI()->AttackStart(player);
|
||||||
summons->CombatStart(player);
|
|
||||||
_creatureGuid = summons->GetGUID();
|
_creatureGuid = summons->GetGUID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user