mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Scripts: Fix crossfaction combat issue (#23818)
* Scripts/PitOfSaron: Fix Martin Victus combat in crossfaction groups
Fix Martin Victus attacking players in crossfaction groups because it was spawned as summon of the boss, triggering DoCombatInZone()
* Scripts/ForgeOfSouls: Fix guards combat in crossfaction groups
Fix Devourer of Souls guardians attacking players in crossfaction groups because they were spawned as summons of the boss, triggering DoCombatInZone()
* Scripts/Misc: Fix no PCH build
(cherry picked from commit ef694cc251)
This commit is contained in:
@@ -209,8 +209,9 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
for (int8 i = 0; outroPositions[i].entry[entryIndex] != 0; ++i)
|
||||
{
|
||||
if (Creature* summon = me->SummonCreature(outroPositions[i].entry[entryIndex], spawnPoint, TEMPSUMMON_DEAD_DESPAWN))
|
||||
if (TempSummon* summon = instance->instance->SummonCreature(outroPositions[i].entry[entryIndex], spawnPoint))
|
||||
{
|
||||
summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
|
||||
summon->GetMotionMaster()->MovePoint(0, outroPositions[i].movePosition);
|
||||
if (summon->GetEntry() == NPC_JAINA_PART2)
|
||||
summon->AI()->Talk(SAY_JAINA_OUTRO);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Map.h"
|
||||
#include "pit_of_saron.h"
|
||||
#include "Player.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
// positions for Martin Victus (37591) and Gorkun Ironskull (37592)
|
||||
Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f};
|
||||
@@ -157,9 +158,15 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
if (Creature* summoner = instance->GetCreature(_garfrostGUID))
|
||||
{
|
||||
if (_teamInInstance == ALLIANCE)
|
||||
summoner->SummonCreature(NPC_MARTIN_VICTUS_1, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
{
|
||||
if (TempSummon* summon = instance->SummonCreature(NPC_MARTIN_VICTUS_1, SlaveLeaderPos))
|
||||
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
else
|
||||
summoner->SummonCreature(NPC_GORKUN_IRONSKULL_2, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
{
|
||||
if (TempSummon* summon = instance->SummonCreature(NPC_GORKUN_IRONSKULL_2, SlaveLeaderPos))
|
||||
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -169,9 +176,15 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
if (Creature* summoner = instance->GetCreature(_tyrannusGUID))
|
||||
{
|
||||
if (_teamInInstance == ALLIANCE)
|
||||
summoner->SummonCreature(NPC_JAINA_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
{
|
||||
if (TempSummon * summon = instance->SummonCreature(NPC_JAINA_PART2, EventLeaderPos2))
|
||||
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
else
|
||||
summoner->SummonCreature(NPC_SYLVANAS_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
{
|
||||
if (TempSummon * summon = instance->SummonCreature(NPC_SYLVANAS_PART2, EventLeaderPos2))
|
||||
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user