mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Core/Events): Corrections to Apothecary Hummel (#10674)
This commit is contained in:
@@ -71,7 +71,8 @@ enum ApothecaryMisc
|
||||
NPC_VIAL_BUNNY = 36530,
|
||||
NPC_CROWN_APOTHECARY = 36885,
|
||||
PHASE_ALL = 0,
|
||||
PHASE_INTRO = 1
|
||||
PHASE_INTRO = 1,
|
||||
PHASE_COMBAT = 2
|
||||
};
|
||||
|
||||
Position const BaxterMovePos = { -221.4115f, 2206.825f, 79.93151f, 0.0f };
|
||||
@@ -108,22 +109,21 @@ public:
|
||||
_deadCount = 0;
|
||||
_isDead = false;
|
||||
_phase = PHASE_ALL;
|
||||
summons.DespawnAll();
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SummonCreatureGroup(1);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void EnterEvadeMode() override
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
_EnterEvadeMode();
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_START_EVENT && events.IsInPhase(PHASE_ALL))
|
||||
if (action == ACTION_START_EVENT && _phase == PHASE_ALL)
|
||||
{
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
_phase = PHASE_INTRO;
|
||||
_scheduler.Schedule(1ms, [this](TaskContext /*context*/)
|
||||
{
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
.Schedule(12s, [this](TaskContext context)
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
_phase = PHASE_COMBAT;
|
||||
DoZoneInCombat();
|
||||
|
||||
context.Schedule(6s, [this](TaskContext /*context*/) // Call Baxter
|
||||
|
||||
@@ -51,6 +51,15 @@ public:
|
||||
case NPC_DND_CRAZED_APOTHECARY_GENERATOR:
|
||||
_crazedApothecaryGeneratorGUIDs.push_back(creature->GetGUID());
|
||||
break;
|
||||
case NPC_APOTHECARY_HUMMEL:
|
||||
_apothecaryHummel = creature->GetGUID();
|
||||
break;
|
||||
case NPC_CRAZED_APOTHECARY:
|
||||
if (Creature* hummel = instance->GetCreature(_apothecaryHummel))
|
||||
{
|
||||
hummel->AI()->JustSummoned(creature);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -132,6 +141,7 @@ public:
|
||||
private:
|
||||
uint32 _encounters[MAX_ENCOUNTERS];
|
||||
GuidVector _crazedApothecaryGeneratorGUIDs;
|
||||
ObjectGuid _apothecaryHummel;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ enum DataTypes
|
||||
|
||||
enum SKCreatures
|
||||
{
|
||||
NPC_DND_CRAZED_APOTHECARY_GENERATOR = 36212
|
||||
NPC_DND_CRAZED_APOTHECARY_GENERATOR = 36212,
|
||||
NPC_APOTHECARY_HUMMEL = 36296,
|
||||
NPC_CRAZED_APOTHECARY = 36568
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
|
||||
Reference in New Issue
Block a user