[11523] Implement .npc aiinfo

Comamnd show information about used AI and scripts for targeted creature.
AI classes (including from script DLL) can provide additinal info about own state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Schmoozerd 2011-05-23 03:01:43 +04:00 committed by VladimirMangos
parent ae2a9e1c6a
commit 4ba5aa83e3
14 changed files with 94 additions and 11 deletions

View file

@ -389,6 +389,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
{ "aiinfo", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAIInfoCommand, "", NULL },
{ "allowmove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAllowMovementCommand, "", NULL },
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
@ -809,6 +810,11 @@ const char *ChatHandler::GetMangosString(int32 entry) const
return m_session->GetMangosString(entry);
}
const char *ChatHandler::GetOnOffStr(bool value) const
{
return value ? GetMangosString(LANG_ON) : GetMangosString(LANG_OFF);
}
uint32 ChatHandler::GetAccountId() const
{
return m_session->GetAccountId();