30 static std::vector<ChatCommand> lookupPlayerCommandTable =
37 static std::vector<ChatCommand> lookupSpellCommandTable =
43 static std::vector<ChatCommand> lookupCommandTable =
62 static std::vector<ChatCommand> commandTable =
74 std::string namePart = args;
75 std::wstring wNamePart;
100 if (maxResults && count++ == maxResults)
107 std::ostringstream ss;
109 ss << areaEntry->
m_ID <<
" - |cffffffff|Harea:" << areaEntry->
m_ID <<
"|h[" << name <<
"]|h|r";
111 ss << areaEntry->
m_ID <<
" - " << name;
131 std::string namePart = args;
132 std::wstring wNamePart;
145 for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
147 uint32 id = itr->second.Entry;
151 if (creatureLocale->Name.size() > localeIndex && !creatureLocale->Name[localeIndex].empty())
153 std::string name = creatureLocale->Name[localeIndex];
157 if (maxResults && count++ == maxResults)
176 std::string name = itr->second.Name;
182 if (maxResults && count++ == maxResults)
209 std::string namePart = args;
210 std::wstring wNamePart;
225 for (
uint32 id = 0;
id < events.size(); ++id)
235 if (maxResults && count++ == maxResults)
267 std::string namePart = args;
268 std::wstring wNamePart;
286 std::string name = factionEntry->name;
293 if (maxResults && count++ == maxResults)
301 std::ostringstream ss;
303 ss <<
id <<
" - |cffffffff|Hfaction:" <<
id <<
"|h[" << name <<
"]|h|r";
305 ss <<
id <<
" - " << name;
347 std::string namePart = args;
348 std::wstring wNamePart;
362 for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
365 if (localeIndex >= 0)
370 if (il->Name.size() > ulocaleIndex && !il->Name[ulocaleIndex].empty())
372 std::string name = il->Name[ulocaleIndex];
376 if (maxResults && count++ == maxResults)
396 std::string name = itr->second.Name1;
402 if (maxResults && count++ == maxResults)
429 std::string namePart = args;
430 std::wstring wNamePart;
448 std::string name = set->
name;
455 if (maxResults && count++ == maxResults)
482 std::string namePart = args;
483 std::wstring wNamePart;
496 for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr)
501 if (objectLocalte->Name.size() > localeIndex && !objectLocalte->Name[localeIndex].empty())
503 std::string name = objectLocalte->Name[localeIndex];
507 if (maxResults && count++ == maxResults)
526 std::string name = itr->second.name;
532 if (maxResults && count++ == maxResults)
562 std::string namePart = args;
563 std::wstring wNamePart;
576 for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
578 Quest* qInfo = iter->second;
581 if (localeIndex >= 0)
586 if (questLocale->Title.size() > ulocaleIndex && !questLocale->Title[ulocaleIndex].empty())
588 std::string title = questLocale->Title[ulocaleIndex];
592 if (maxResults && count++ == maxResults)
598 char const* statusStr =
"";
634 std::string title = qInfo->
GetTitle();
640 if (maxResults && count++ == maxResults)
646 char const* statusStr =
"";
692 std::string namePart = args;
693 std::wstring wNamePart;
711 std::string name = skillInfo->
name;
718 if (maxResults && count++ == maxResults)
724 char valStr[50] =
"";
725 char const* knownStr =
"";
735 snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
762 std::string namePart = args;
763 std::wstring wNamePart;
788 if (maxResults && count++ == maxResults)
794 bool known = target && target->
HasSpell(
id);
801 bool talent = (talentCost > 0);
803 bool active = target && target->
HasAura(
id);
807 uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->
GetRank() : spellInfo->
GetRank();
810 std::ostringstream ss;
812 ss <<
id <<
" - |cffffffff|Hspell:" <<
id <<
"|h[" << name;
814 ss <<
id <<
" - " << name;
854 uint32 id = atoi((
char*)args);
859 std::string name = spellInfo->SpellName;
866 bool known = target && target->
HasSpell(
id);
869 SpellInfo const* learnSpellInfo =
sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell);
873 bool talent = (talentCost > 0);
874 bool passive = spellInfo->IsPassive();
875 bool active = target && target->
HasAura(
id);
879 uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->
GetRank() : spellInfo->GetRank();
882 std::ostringstream ss;
884 ss <<
id <<
" - |cffffffff|Hspell:" <<
id <<
"|h[" << name;
886 ss <<
id <<
" - " << name;
921 std::string namePart = args;
922 std::wstring wNamePart;
940 std::string name = nodeEntry->
name;
947 if (maxResults && count++ == maxResults)
956 nodeEntry->
map_id, nodeEntry->
x, nodeEntry->
y, nodeEntry->
z);
959 nodeEntry->
map_id, nodeEntry->
x, nodeEntry->
y, nodeEntry->
z);
981 char const* str = strtok((
char*)args,
" ");
985 std::string namePart = str;
986 std::wstring wNamePart;
994 std::ostringstream reply;
997 bool limitReached =
false;
1000 for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
1002 GameTele const* tele = &itr->second;
1004 if (tele->
wnameLow.find(wNamePart) == std::wstring::npos)
1007 if (maxResults && count++ == maxResults)
1009 limitReached =
true;
1014 reply <<
" |cffffffff|Htele:" << itr->first <<
"|h[" << tele->
name <<
"]|h|r\n";
1016 reply <<
" " << itr->first <<
' ' << tele->
name <<
"\n";
1019 if (reply.str().empty())
1039 char const* targetName = target ? target->
GetName().c_str() :
"NAME";
1041 std::string namePart = args;
1042 std::wstring wNamePart;
1059 std::string name = titleInfo->
name;
1066 if (maxResults && counter == maxResults)
1078 char titleNameStr[80];
1079 snprintf(titleNameStr, 80, name.c_str(), targetName);
1101 std::string namePart = args;
1102 std::wstring wNamePart;
1118 std::string name = mapInfo->name;
1124 if (maxResults && counter == maxResults)
1130 std::ostringstream ss;
1131 ss <<
id <<
" - [" << name <<
']';
1133 if (mapInfo->IsContinent())
1136 switch (mapInfo->map_type)
1186 ip = strtok((
char*)args,
" ");
1187 limitStr = strtok(NULL,
" ");
1188 limit = limitStr ? atoi(limitStr) : -1;
1203 char* accountStr = strtok((
char*)args,
" ");
1207 std::string account = accountStr;
1208 char* limitStr = strtok(NULL,
" ");
1209 int32 limit = limitStr ? atoi(limitStr) : -1;
1227 char* emailStr = strtok((
char*)args,
" ");
1231 std::string email = emailStr;
1232 char* limitStr = strtok(NULL,
" ");
1233 int32 limit = limitStr ? atoi(limitStr) : -1;
1257 if (maxResults && count++ == maxResults)
1263 Field* fields = result->Fetch();
1265 std::string accountName = fields[1].
GetString();
1277 Field* characterFields = result2->Fetch();
1279 std::string name = characterFields[1].
GetString();
1283 }
while (result2->NextRow() && (limit == -1 || counter < limit));
1285 }
while (result->NextRow());
@ CHAR_SEL_CHAR_GUID_NAME_BY_ACC
char const * localeNames[TOTAL_LOCALES]
const uint8 TOTAL_LOCALES
UNORDERED_MAP< uint32, CreatureTemplate > CreatureTemplateContainer
DBCStorage< AreaTableEntry > sAreaStore(AreaTableEntryfmt)
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< ItemSetEntry > sItemSetStore(ItemSetEntryfmt)
uint32 GetTalentSpellCost(uint32 spellId)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
UNORDERED_MAP< uint32, GameObjectTemplate > GameObjectTemplateContainer
UNORDERED_MAP< uint32, ItemTemplate > ItemTemplateContainer
@ LANG_FACTION_PEACE_FORCED
@ LANG_COMMAND_TELE_PARAMETER
@ LANG_COMMAND_NOAREAFOUND
@ LANG_COMMAND_TELE_LOCATION
@ LANG_COMMAND_QUEST_REWARDED
@ LANG_EVENT_ENTRY_LIST_CONSOLE
@ LANG_COMMAND_NOTAXINODEFOUND
@ LANG_GO_ENTRY_LIST_CONSOLE
@ LANG_COMMAND_TELE_NOLOCATION
@ LANG_EVENT_ENTRY_LIST_CHAT
@ LANG_COMMAND_NOCREATUREFOUND
@ LANG_CREATURE_ENTRY_LIST_CONSOLE
@ LANG_FACTION_NOREPUTATION
@ LANG_SKILL_LIST_CONSOLE
@ LANG_FACTION_INVISIBLE_FORCED
@ LANG_COMMAND_NOITEMFOUND
@ LANG_QUEST_LIST_CONSOLE
@ LANG_COMMAND_QUEST_ACTIVE
@ LANG_LOOKUP_PLAYER_CHARACTER
@ LANG_GO_ENTRY_LIST_CHAT
@ LANG_COMMAND_NOMAPFOUND
@ LANG_COMMAND_NOSKILLFOUND
@ LANG_COMMAND_NOTITLEFOUND
@ LANG_COMMAND_NOITEMSETFOUND
@ LANG_TAXINODE_ENTRY_LIST_CHAT
@ LANG_COMMAND_NOSPELLFOUND
@ LANG_COMMAND_LOOKUP_MAX_RESULTS
@ LANG_COMMAND_NOQUESTFOUND
@ LANG_COMMAND_FACTION_NOTFOUND
@ LANG_COMMAND_NOGAMEOBJECTFOUND
@ LANG_TAXINODE_ENTRY_LIST_CONSOLE
@ LANG_COMMAND_QUEST_COMPLETE
@ LANG_TITLE_LIST_CONSOLE
@ LANG_ITEMSET_LIST_CONSOLE
@ LANG_LOOKUP_PLAYER_ACCOUNT
@ LANG_CREATURE_ENTRY_LIST_CHAT
@ LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL
@ LOGIN_SEL_ACCOUNT_BY_IP
@ LOGIN_SEL_ACCOUNT_LIST_BY_NAME
UNORDERED_MAP< uint32, GameTele > GameTeleContainer
Skyfire::AutoPtr< PreparedResultSet, Skyfire::Mutex > PreparedQueryResult
@ QUEST_STATUS_INCOMPLETE
@ FACTION_FLAG_PEACE_FORCED
@ FACTION_FLAG_INVISIBLE_FORCED
@ SPELL_EFFECT_LEARN_SPELL
@ PLAYER_FIELD_PLAYER_TITLE
bool Utf8FitTo(const std::string &str, const std::wstring &search)
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
void wstrToLower(std::wstring &str)
static bool normalizeString(std::string &utf8String)
Player * getSelectedPlayer()
WorldSession * GetSession()
virtual LocaleConstant GetSessionDbcLocale() const
virtual int GetSessionDbLocaleIndex() const
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
void SetSentErrorMessage(bool val)
virtual void SendSysMessage(const char *str)
virtual const char * GetSkyFireString(int32 entry) const
CommandScript(const char *name)
std::string GetString() const
std::vector< GameEventData > GameEventDataMap
std::set< uint16 > ActiveEvents
uint32 GetUInt32Value(uint16 index) const
UNORDERED_MAP< uint32, Quest * > QuestMap
bool HasTitle(uint32 bitIndex)
uint16 GetPureSkillValue(uint32 skill) const
int16 GetSkillTempBonusValue(uint32 skill) const
int16 GetSkillPermBonusValue(uint32 skill) const
WorldSession * GetSession() const
bool HasSkill(uint32 skill) const
uint16 GetPureMaxSkillValue(uint32 skill) const
QuestStatus GetQuestStatus(uint32 quest_id) const
bool HasSpell(uint32 spell) const override
ReputationMgr & GetReputationMgr()
void setString(const uint8 index, const std::string &value)
void setUInt32(const uint8 index, const uint32 value)
int32 GetQuestLevel() const
uint32 GetQuestId() const
std::string const & GetTitle() const
int32 GetReputation(uint32 faction_id) const
FactionState const * GetState(FactionEntry const *factionEntry) const
uint32 GetReputationRankStrIndex(FactionEntry const *factionEntry) const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
std::string const & GetName() const
LocaleConstant GetSessionDbcLocale() const
Player * GetPlayer() const
std::string const & GetRemoteAddress()
static bool HandleLookupPlayerAccountCommand(ChatHandler *handler, char const *args)
static bool HandleLookupSkillCommand(ChatHandler *handler, char const *args)
static bool HandleLookupItemCommand(ChatHandler *handler, char const *args)
static bool HandleLookupSpellIdCommand(ChatHandler *handler, char const *args)
static bool HandleLookupPlayerEmailCommand(ChatHandler *handler, char const *args)
static bool HandleLookupFactionCommand(ChatHandler *handler, char const *args)
static bool HandleLookupPlayerIpCommand(ChatHandler *handler, char const *args)
static bool HandleLookupMapCommand(ChatHandler *handler, char const *args)
static bool HandleLookupAreaCommand(ChatHandler *handler, char const *args)
static bool HandleLookupTaxiNodeCommand(ChatHandler *handler, const char *args)
static bool LookupPlayerSearchCommand(PreparedQueryResult result, int32 limit, ChatHandler *handler)
static bool HandleLookupItemSetCommand(ChatHandler *handler, char const *args)
std::vector< ChatCommand > GetCommands() const OVERRIDE
static bool HandleLookupObjectCommand(ChatHandler *handler, char const *args)
static bool HandleLookupCreatureCommand(ChatHandler *handler, char const *args)
static bool HandleLookupSpellCommand(ChatHandler *handler, char const *args)
static bool HandleLookupQuestCommand(ChatHandler *handler, char const *args)
static bool HandleLookupTitleCommand(ChatHandler *handler, char const *args)
static bool HandleLookupEventCommand(ChatHandler *handler, char const *args)
static bool HandleLookupTeleCommand(ChatHandler *handler, char const *args)
void AddSC_lookup_commandscript()
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
@ CONFIG_MAX_RESULTS_LOOKUP_COMMANDS
@ RBAC_PERM_COMMAND_LOOKUP_QUEST
@ RBAC_PERM_COMMAND_LOOKUP_EVENT
@ RBAC_PERM_COMMAND_LOOKUP_SPELL
@ RBAC_PERM_COMMAND_LOOKUP_PLAYER_EMAIL
@ RBAC_PERM_COMMAND_LOOKUP_OBJECT
@ RBAC_PERM_COMMAND_LOOKUP_PLAYER
@ RBAC_PERM_COMMAND_LOOKUP_AREA
@ RBAC_PERM_COMMAND_LOOKUP_ITEMSET
@ RBAC_PERM_COMMAND_LOOKUP_FACTION
@ RBAC_PERM_COMMAND_LOOKUP_TELE
@ RBAC_PERM_COMMAND_LOOKUP_PLAYER_IP
@ RBAC_PERM_COMMAND_LOOKUP
@ RBAC_PERM_COMMAND_LOOKUP_SPELL_ID
@ RBAC_PERM_COMMAND_LOOKUP_SKILL
@ RBAC_PERM_COMMAND_LOOKUP_CREATURE
@ RBAC_PERM_COMMAND_LOOKUP_TITLE
@ RBAC_PERM_COMMAND_LOOKUP_PLAYER_ACCOUNT
@ RBAC_PERM_COMMAND_LOOKUP_ITEM
@ RBAC_PERM_COMMAND_LOOKUP_MAP
@ RBAC_PERM_COMMAND_LOOKUP_TAXINODE
LoginDatabaseWorkerPool LoginDatabase