mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Feat(AllCreatureEvent): Add RegisterAllCreatureEvent and support for CreatureTemplate object. (#312)
This commit is contained in:
@@ -57,6 +57,7 @@ public:
|
||||
void OnCreatureAddWorld(Creature* creature) override
|
||||
{
|
||||
sEluna->OnAddToWorld(creature);
|
||||
sEluna->OnAllCreatureAddToWorld(creature);
|
||||
|
||||
if (creature->IsGuardian() && creature->ToTempSummon() && creature->ToTempSummon()->GetSummonerGUID().IsPlayer())
|
||||
sEluna->OnPetAddedToWorld(creature->ToTempSummon()->GetSummonerUnit()->ToPlayer(), creature);
|
||||
@@ -65,6 +66,7 @@ public:
|
||||
void OnCreatureRemoveWorld(Creature* creature) override
|
||||
{
|
||||
sEluna->OnRemoveFromWorld(creature);
|
||||
sEluna->OnAllCreatureRemoveFromWorld(creature);
|
||||
}
|
||||
|
||||
bool CanCreatureQuestAccept(Player* player, Creature* creature, Quest const* quest) override
|
||||
@@ -92,6 +94,16 @@ public:
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void OnCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature) override
|
||||
{
|
||||
sEluna->OnAllCreatureSelectLevel(cinfo, creature);
|
||||
}
|
||||
|
||||
void OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level) override
|
||||
{
|
||||
sEluna->OnAllCreatureBeforeSelectLevel(cinfo, creature, level);
|
||||
}
|
||||
};
|
||||
|
||||
class Eluna_AllGameObjectScript : public AllGameObjectScript
|
||||
|
||||
Reference in New Issue
Block a user