Core/AI: Factory functions cleanup
- Get rid of fugly void pointers - Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code - Moved IdleMovementGenerator singleton to factory code
This commit is contained in:
1 parent
04f799c14b
commit
1c6021ba96
34 files changed
+268
-304
No files matched your search
@@ -595,13 +595,6 @@ void SmartAI::JustRespawned()
|
||||
mFollowCreditType = 0;
|
||||
}
|
||||
|
||||
int SmartAI::Permissible(const Creature* creature)
|
||||
{
|
||||
if (creature->GetAIName() == "SmartAI")
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
void SmartAI::JustReachedHome()
|
||||
{
|
||||
GetScript()->OnReset();
|
||||
@@ -958,13 +951,6 @@ void SmartAI::CheckConditions(uint32 diff)
|
||||
mConditionsTimer -= diff;
|
||||
}
|
||||
|
||||
int SmartGameObjectAI::Permissible(const GameObject* g)
|
||||
{
|
||||
if (g->GetAIName() == "SmartGameObjectAI")
|
||||
return PERMIT_BASE_SPECIAL;
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::UpdateAI(uint32 diff)
|
||||
{
|
||||
GetScript()->OnUpdate(diff);
|
||||
|
||||
Reference in new issue
Block a user