mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 20:37:45 +00:00
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;
|
||||
player->PlayerTalkClass->SendCloseGossip();
|
||||
|
||||
if (ObjectAccessor::GetCreature(*me, _creatureGuid))
|
||||
Creature* lastSpawn = ObjectAccessor::GetCreature(*me, _creatureGuid);
|
||||
if (lastSpawn && lastSpawn->IsAlive())
|
||||
{
|
||||
// We already summoned something recently, return.
|
||||
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))
|
||||
{
|
||||
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
|
||||
summons->AI()->Talk(SAY_ON_SPAWN_IN);
|
||||
summons->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summons->SendMeleeAttackStart(player);
|
||||
summons->CombatStart(player);
|
||||
summons->SetTarget(player->GetGUID());
|
||||
summons->AI()->Talk(SAY_ON_SPAWN_IN, player);
|
||||
summons->AI()->AttackStart(player);
|
||||
_creatureGuid = summons->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user