feat(Core/SmartAI): Implement SMART_EVENT_SUMMONED_UNIT and SMART_EVE… (#14811)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
@@ -1233,6 +1233,16 @@ void SmartGameObjectAI::SpellHit(Unit* unit, SpellInfo const* spellInfo)
|
|||||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SmartGameObjectAI::JustSummoned(Creature* creature)
|
||||||
|
{
|
||||||
|
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT, creature);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SmartGameObjectAI::SummonedCreatureDespawn(Creature* unit)
|
||||||
|
{
|
||||||
|
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMON_DESPAWNED, unit, unit->GetEntry());
|
||||||
|
}
|
||||||
|
|
||||||
class SmartTrigger : public AreaTriggerScript
|
class SmartTrigger : public AreaTriggerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -274,6 +274,12 @@ public:
|
|||||||
void EventInform(uint32 eventId) override;
|
void EventInform(uint32 eventId) override;
|
||||||
void SpellHit(Unit* unit, SpellInfo const* spellInfo) override;
|
void SpellHit(Unit* unit, SpellInfo const* spellInfo) override;
|
||||||
|
|
||||||
|
// Called when the gameobject summon successfully other creature
|
||||||
|
void JustSummoned(Creature* creature) override;
|
||||||
|
|
||||||
|
// Called when a summoned creature dissapears (UnSummoned)
|
||||||
|
void SummonedCreatureDespawn(Creature* unit) override;
|
||||||
|
|
||||||
// Called when a summoned unit dies
|
// Called when a summoned unit dies
|
||||||
void SummonedCreatureDies(Creature* summon, Unit* killer) override;
|
void SummonedCreatureDies(Creature* summon, Unit* killer) override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user