=================================================================== src/game/Chat.cpp ------------------------------------------------------------------- + { "bug", SEC_PLAYER, &ChatHandler::HandleBugCommand, "", NULL }, =================================================================== src/game/Chat.h ------------------------------------------------------------------- + bool HandleBugCommand(const char* args); =================================================================== src/game/Language.h ------------------------------------------------------------------- +#define LANG_CREATUREINFO_CHAR "Player selected Creature\nGUID: %u.\nEntry: %u." =================================================================== Index: src/game/Level0.cpp ------------------------------------------------------------------- +bool ChatHandler::HandleCreatureInfoCommand(const char* args) +{ + Creature* target = getSelectedCreature(); + + if(!target) + { + SendSysMessage(LANG_SELECT_CREATURE); + return true; + } + + uint32 Entry = target->GetUInt32Value(OBJECT_FIELD_ENTRY); + CreatureInfo const* cInfo = target->GetCreatureInfo(); + + PSendSysMessage(LANG_CREATUREINFO_CHAR, target->GetDBTableGUIDLow(), Entry); + + return true; +} +bool ChatHandler::HandleBugCommand(const char* args) +{ + if (!*args) + return false; + + WorldDatabase.PQuery("INSERT INTO `bugs` (`name`, `bug`) VALUES ('%s', '%s')", m_session->GetPlayerName(), args); + return true; +} ===================================================================