refactor(Scripts/TempleOfAhnQiraj): Remove Giant Flesh Claw script as… (#12526)

refactor(Scripts/TempleOfAhnQiraj): Remove Giant Flesh Claw script as it is not needed
This commit is contained in:
Skjalf
2022-07-25 12:12:43 -03:00
committed by GitHub
parent e3c7b52253
commit 1cec5d2534
2 changed files with 9 additions and 33 deletions

View File

@@ -831,13 +831,11 @@ public:
}
}
void DoAction(int32 param) override
void SummonedCreatureDies(Creature* creature, Unit* /*killer*/) override
{
switch (param)
if (creature->GetEntry() == NPC_FLESH_TENTACLE)
{
case ACTION_FLESH_TENTACLE_KILLED:
++FleshTentaclesKilled;
break;
++FleshTentaclesKilled;
}
}
};
@@ -1190,33 +1188,6 @@ public:
};
};
class npc_giant_flesh_tentacle : public CreatureScript
{
public:
npc_giant_flesh_tentacle() : CreatureScript("npc_giant_flesh_tentacle") { }
CreatureAI* GetAI(Creature* creature) const override
{
return new flesh_tentacleAI(creature);
}
struct flesh_tentacleAI : public ScriptedAI
{
flesh_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
SetCombatMovement(false);
}
void JustDied(Unit* /*killer*/) override
{
if (TempSummon* summon = me->ToTempSummon())
if (Unit* summoner = summon->GetSummonerUnit())
if (summoner->IsAIEnabled)
summoner->GetAI()->DoAction(ACTION_FLESH_TENTACLE_KILLED);
}
};
};
//GetAIs
void AddSC_boss_cthun()
@@ -1227,5 +1198,4 @@ void AddSC_boss_cthun()
new npc_claw_tentacle();
new npc_giant_claw_tentacle();
new npc_giant_eye_tentacle();
new npc_giant_flesh_tentacle();
}