Core/Scripts/SmartAI: add test for TextMgr (temp)
Core/CreatureTextMgr: added basic chat function, you can now experiment with it if bored --HG-- branch : trunk
This commit is contained in:
@@ -25,15 +25,17 @@
|
||||
#include "ObjectDefines.h"
|
||||
#include "GridDefines.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
|
||||
void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
//Drop Existing SmartAI List
|
||||
}
|
||||
|
||||
SmartAI::SmartAI(Creature *c) : CreatureAI(c), me(c)
|
||||
SmartAI::SmartAI(Creature *c) : CreatureAI(c)
|
||||
{
|
||||
// copy script to local (pretection for table reload)
|
||||
mTestTimer = 0;
|
||||
}
|
||||
|
||||
int SmartAI::Permissible(const Creature *creature)
|
||||
@@ -45,6 +47,11 @@ int SmartAI::Permissible(const Creature *creature)
|
||||
|
||||
void SmartAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (mTestTimer < diff)
|
||||
{
|
||||
mTestTimer = 60000;
|
||||
sCreatureTextMgr.SendChat(me,"CHAT_TYPE_SAY", CHAT_TYPE_SAY);
|
||||
} else mTestTimer -= diff;
|
||||
}
|
||||
|
||||
void SmartAI::JustRespawned()
|
||||
|
||||
@@ -50,6 +50,8 @@ void setinhabittype
|
||||
|
||||
event change flags
|
||||
|
||||
need a local SendChat()
|
||||
|
||||
*/
|
||||
|
||||
//temp copied from eai, will be modded
|
||||
@@ -247,9 +249,6 @@ class SmartAIMgr
|
||||
|
||||
class SmartAI : public CreatureAI
|
||||
{
|
||||
protected:
|
||||
Creature * const me;
|
||||
|
||||
public:
|
||||
~SmartAI(){};
|
||||
explicit SmartAI(Creature *c);
|
||||
@@ -363,6 +362,7 @@ class SmartAI : public CreatureAI
|
||||
void SetMovePathEndAction(SMARTAI_ACTION action = SMART_ACTION_FORCE_DESPAWN);
|
||||
|
||||
private:
|
||||
uint32 mTestTimer;
|
||||
};
|
||||
|
||||
#define sSmartAIMgr (*ACE_Singleton<SmartAIMgr, ACE_Null_Mutex>::instance())
|
||||
|
||||
Reference in New Issue
Block a user