mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Scripts/Commands: Retrieve Creature template in HandlePetCreateCommand from Creature itself
CreatureTemplate can be retrieved directly from the Creature itself instead of using ObjectMgr::GetCreatureTemplate(id) .
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureTemplate const* creatrueTemplate = sObjectMgr->GetCreatureTemplate(creatureTarget->GetEntry());
|
||||
CreatureTemplate const* creatrueTemplate = creatureTarget->GetCreatureTemplate();
|
||||
// Creatures with family 0 crashes the server
|
||||
if (!creatrueTemplate->family)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user