mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(DB/SAI) Quest Feedin' Da Goolz (12652) (#21264)
Co-authored-by: Hexadecimal <hd@hd.hd> Co-authored-by: Jelle Meeus <sogladev@gmail.com>
This commit is contained in:
@@ -233,88 +233,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum eFeedinDaGoolz
|
||||
{
|
||||
NPC_DECAYING_GHOUL = 28565,
|
||||
GO_BOWL = 190656,
|
||||
};
|
||||
|
||||
class npc_feedin_da_goolz : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_feedin_da_goolz() : CreatureScript("npc_feedin_da_goolz") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_feedin_da_goolzAI(creature);
|
||||
}
|
||||
|
||||
struct npc_feedin_da_goolzAI : public NullCreatureAI
|
||||
{
|
||||
npc_feedin_da_goolzAI(Creature* creature) : NullCreatureAI(creature) { findTimer = 1; checkTimer = 0; }
|
||||
|
||||
uint32 findTimer;
|
||||
uint32 checkTimer;
|
||||
ObjectGuid ghoulFed;
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (findTimer)
|
||||
{
|
||||
findTimer += diff;
|
||||
if (findTimer >= 1000)
|
||||
{
|
||||
if (Creature* ghoul = me->FindNearestCreature(NPC_DECAYING_GHOUL, 30.0f, true))
|
||||
{
|
||||
ghoul->SetReactState(REACT_DEFENSIVE);
|
||||
float o = me->GetAngle(ghoul);
|
||||
ghoul->GetMotionMaster()->MovePoint(1, me->GetPositionX() + 2 * cos(o), me->GetPositionY() + 2 * std::sin(o), me->GetPositionZ());
|
||||
checkTimer = 1;
|
||||
findTimer = 0;
|
||||
}
|
||||
else
|
||||
findTimer = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkTimer)
|
||||
{
|
||||
checkTimer += diff;
|
||||
if (checkTimer >= 1500)
|
||||
{
|
||||
checkTimer = 1;
|
||||
if (!ghoulFed)
|
||||
{
|
||||
if (Creature* ghoul = me->FindNearestCreature(NPC_DECAYING_GHOUL, 3.0f, true))
|
||||
{
|
||||
ghoulFed = ghoul->GetGUID();
|
||||
ghoul->HandleEmoteCommand(EMOTE_ONESHOT_EAT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameObject* bowl = me->FindNearestGameObject(GO_BOWL, 10.0f))
|
||||
bowl->Delete();
|
||||
|
||||
if (Creature* ghoul = ObjectAccessor::GetCreature(*me, ghoulFed))
|
||||
{
|
||||
ghoul->SetReactState(REACT_AGGRESSIVE);
|
||||
ghoul->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
|
||||
if (Player* player = owner->ToPlayer())
|
||||
player->KilledMonsterCredit(me->GetEntry());
|
||||
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum overlordDrakuru
|
||||
{
|
||||
SPELL_SHADOW_BOLT = 54113,
|
||||
@@ -953,7 +871,6 @@ void AddSC_zuldrak()
|
||||
// Ours
|
||||
new npc_finklestein();
|
||||
new go_finklestein_cauldron();
|
||||
new npc_feedin_da_goolz();
|
||||
new npc_overlord_drakuru_betrayal();
|
||||
new npc_drakuru_shackles();
|
||||
new npc_captured_rageclaw();
|
||||
|
||||
Reference in New Issue
Block a user