Core: define CREATURE_FAMILY_NONE to avoid magic numbers in code

This commit is contained in:
Aokromes committed 2016-07-20 12:49:38 +02:00
1 parent dadd81afe0
commit 11636faadf
6 files changed
+10 -7

No files matched your search

+2 -2
View File
@@ -69,10 +69,10 @@ public:
}
CreatureTemplate const* creatureTemplate = creatureTarget->GetCreatureTemplate();
// Creatures with family 0 crashes the server
// Creatures with family CREATURE_FAMILY_NONE crashes the server
if (!creatureTemplate->family)
{
handler->PSendSysMessage("This creature cannot be tamed. (family id: 0).");
handler->PSendSysMessage("This creature cannot be tamed. (family id: CREATURE_FAMILY_NONE).");
handler->SetSentErrorMessage(true);
return false;
}