Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
cs_list.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7Name: list_commandscript
8%Complete: 100
9Comment: All list related commands
10Category: commandscripts
11EndScriptData */
12
13#include "Chat.h"
14#include "Language.h"
15#include "ObjectAccessor.h"
16#include "ObjectMgr.h"
17#include "Player.h"
18#include "ScriptMgr.h"
19#include "SpellAuraEffects.h"
20#include <iostream>
21
23{
24public:
25 list_commandscript() : CommandScript("list_commandscript") { }
26
27 std::vector<ChatCommand> GetCommands() const OVERRIDE
28 {
29 static std::vector<ChatCommand> listCommandTable =
30 {
36 };
37 static std::vector<ChatCommand> commandTable =
38 {
39 { "list", rbac::RBAC_PERM_COMMAND_LIST,true, NULL, "", listCommandTable },
40 };
41 return commandTable;
42 }
43
44 static bool HandleListCreatureCommand(ChatHandler* handler, char const* args)
45 {
46 if (!*args)
47 return false;
48
49 // number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r
50 char* id = handler->extractKeyFromLink((char*)args, "Hcreature_entry");
51 if (!id)
52 return false;
53
54 uint32 creatureId = atol(id);
55 if (!creatureId)
56 {
58 handler->SetSentErrorMessage(true);
59 return false;
60 }
61
62 CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creatureId);
63 if (!cInfo)
64 {
66 handler->SetSentErrorMessage(true);
67 return false;
68 }
69
70 char* countStr = strtok(NULL, " ");
71 uint32 count = countStr ? atol(countStr) : 10;
72
73 if (count == 0)
74 return false;
75
76 QueryResult result;
77
78 uint32 creatureCount = 0;
79 result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM creature WHERE id='%u'", creatureId);
80 if (result)
81 creatureCount = (*result)[0].GetUInt64();
82
83 if (handler->GetSession())
84 {
85 Player* player = handler->GetSession()->GetPlayer();
86 result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM creature WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
87 player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), creatureId, count);
88 }
89 else
90 result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '%u' LIMIT %u",
91 creatureId, count);
92
93 if (result)
94 {
95 do
96 {
97 Field* fields = result->Fetch();
98 uint32 guid = fields[0].GetUInt32();
99 float x = fields[1].GetFloat();
100 float y = fields[2].GetFloat();
101 float z = fields[3].GetFloat();
102 uint16 mapId = fields[4].GetUInt16();
103
104 if (handler->GetSession())
105 handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, cInfo->Name.c_str(), x, y, z, mapId);
106 else
107 handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId);
108 } while (result->NextRow());
109 }
110
111 handler->PSendSysMessage(LANG_COMMAND_LISTCREATUREMESSAGE, creatureId, creatureCount);
112
113 return true;
114 }
115
116 static bool HandleListItemCommand(ChatHandler* handler, char const* args)
117 {
118 if (!*args)
119 return false;
120
121 char* id = handler->extractKeyFromLink((char*)args, "Hitem");
122 if (!id)
123 return false;
124
125 uint32 itemId = atol(id);
126 if (!itemId)
127 {
129 handler->SetSentErrorMessage(true);
130 return false;
131 }
132
133 ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
134 if (!itemTemplate)
135 {
137 handler->SetSentErrorMessage(true);
138 return false;
139 }
140
141 char* countStr = strtok(NULL, " ");
142 uint32 count = countStr ? atol(countStr) : 10;
143
144 if (count == 0)
145 return false;
146
147 PreparedQueryResult result;
148
149 // inventory case
150 uint32 inventoryCount = 0;
151
153 stmt->setUInt32(0, itemId);
154 result = CharacterDatabase.Query(stmt);
155
156 if (result)
157 inventoryCount = (*result)[0].GetUInt64();
158
159 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_INVENTORY_ITEM_BY_ENTRY);
160 stmt->setUInt32(0, itemId);
161 stmt->setUInt32(1, count);
162 result = CharacterDatabase.Query(stmt);
163
164 if (result)
165 {
166 do
167 {
168 Field* fields = result->Fetch();
169 uint32 itemGuid = fields[0].GetUInt32();
170 uint32 itemBag = fields[1].GetUInt32();
171 uint8 itemSlot = fields[2].GetUInt8();
172 uint32 ownerGuid = fields[3].GetUInt32();
173 uint32 ownerAccountId = fields[4].GetUInt32();
174 std::string ownerName = fields[5].GetString();
175
176 char const* itemPos = 0;
177 if (Player::IsEquipmentPos(itemBag, itemSlot))
178 itemPos = "[equipped]";
179 else if (Player::IsInventoryPos(itemBag, itemSlot))
180 itemPos = "[in inventory]";
181 else if (Player::IsBankPos(itemBag, itemSlot))
182 itemPos = "[in bank]";
183 else
184 itemPos = "";
185
186 handler->PSendSysMessage(LANG_ITEMLIST_SLOT, itemGuid, ownerName.c_str(), ownerGuid, ownerAccountId, itemPos);
187 } while (result->NextRow());
188
189 uint32 resultCount = uint32(result->GetRowCount());
190
191 if (count > resultCount)
192 count -= resultCount;
193 else if (count)
194 count = 0;
195 }
196
197 // mail case
198 uint32 mailCount = 0;
199
200 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_COUNT_ITEM);
201 stmt->setUInt32(0, itemId);
202 result = CharacterDatabase.Query(stmt);
203
204 if (result)
205 mailCount = (*result)[0].GetUInt64();
206
207 if (count > 0)
208 {
209 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_ITEMS_BY_ENTRY);
210 stmt->setUInt32(0, itemId);
211 stmt->setUInt32(1, count);
212 result = CharacterDatabase.Query(stmt);
213 }
214 else
215 result = PreparedQueryResult(NULL);
216
217 if (result)
218 {
219 do
220 {
221 Field* fields = result->Fetch();
222 uint32 itemGuid = fields[0].GetUInt32();
223 uint32 itemSender = fields[1].GetUInt32();
224 uint32 itemReceiver = fields[2].GetUInt32();
225 uint32 itemSenderAccountId = fields[3].GetUInt32();
226 std::string itemSenderName = fields[4].GetString();
227 uint32 itemReceiverAccount = fields[5].GetUInt32();
228 std::string itemReceiverName = fields[6].GetString();
229
230 char const* itemPos = "[in mail]";
231
232 handler->PSendSysMessage(LANG_ITEMLIST_MAIL, itemGuid, itemSenderName.c_str(), itemSender, itemSenderAccountId, itemReceiverName.c_str(), itemReceiver, itemReceiverAccount, itemPos);
233 } while (result->NextRow());
234
235 uint32 resultCount = uint32(result->GetRowCount());
236
237 if (count > resultCount)
238 count -= resultCount;
239 else if (count)
240 count = 0;
241 }
242
243 // auction case
244 uint32 auctionCount = 0;
245
246 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_AUCTIONHOUSE_COUNT_ITEM);
247 stmt->setUInt32(0, itemId);
248 result = CharacterDatabase.Query(stmt);
249
250 if (result)
251 auctionCount = (*result)[0].GetUInt64();
252
253 if (count > 0)
254 {
255 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_AUCTIONHOUSE_ITEM_BY_ENTRY);
256 stmt->setUInt32(0, itemId);
257 stmt->setUInt32(1, count);
258 result = CharacterDatabase.Query(stmt);
259 }
260 else
261 result = PreparedQueryResult(NULL);
262
263 if (result)
264 {
265 do
266 {
267 Field* fields = result->Fetch();
268 uint32 itemGuid = fields[0].GetUInt32();
269 uint32 owner = fields[1].GetUInt32();
270 uint32 ownerAccountId = fields[2].GetUInt32();
271 std::string ownerName = fields[3].GetString();
272
273 char const* itemPos = "[in auction]";
274
275 handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName.c_str(), owner, ownerAccountId, itemPos);
276 } while (result->NextRow());
277 }
278
279 // guild bank case
280 uint32 guildCount = 0;
281
282 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_BANK_COUNT_ITEM);
283 stmt->setUInt32(0, itemId);
284 result = CharacterDatabase.Query(stmt);
285
286 if (result)
287 guildCount = (*result)[0].GetUInt64();
288
289 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY);
290 stmt->setUInt32(0, itemId);
291 stmt->setUInt32(1, count);
292 result = CharacterDatabase.Query(stmt);
293
294 if (result)
295 {
296 do
297 {
298 Field* fields = result->Fetch();
299 uint32 itemGuid = fields[0].GetUInt32();
300 uint32 guildGuid = fields[1].GetUInt32();
301 std::string guildName = fields[2].GetString();
302
303 char const* itemPos = "[in guild bank]";
304
305 handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName.c_str(), guildGuid, itemPos);
306 } while (result->NextRow());
307
308 uint32 resultCount = uint32(result->GetRowCount());
309
310 if (count > resultCount)
311 count -= resultCount;
312 else if (count)
313 count = 0;
314 }
315
316 if (inventoryCount + mailCount + auctionCount + guildCount == 0)
317 {
319 handler->SetSentErrorMessage(true);
320 return false;
321 }
322
323 handler->PSendSysMessage(LANG_COMMAND_LISTITEMMESSAGE, itemId, inventoryCount + mailCount + auctionCount + guildCount, inventoryCount, mailCount, auctionCount, guildCount);
324
325 return true;
326 }
327
328 static bool HandleListObjectCommand(ChatHandler* handler, char const* args)
329 {
330 if (!*args)
331 return false;
332
333 // number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
334 char* id = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
335 if (!id)
336 return false;
337
338 uint32 gameObjectId = atol(id);
339 if (!gameObjectId)
340 {
341 handler->PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, gameObjectId);
342 handler->SetSentErrorMessage(true);
343 return false;
344 }
345
346 GameObjectTemplate const* gInfo = sObjectMgr->GetGameObjectTemplate(gameObjectId);
347 if (!gInfo)
348 {
349 handler->PSendSysMessage(LANG_COMMAND_LISTOBJINVALIDID, gameObjectId);
350 handler->SetSentErrorMessage(true);
351 return false;
352 }
353
354 char* countStr = strtok(NULL, " ");
355 uint32 count = countStr ? atol(countStr) : 10;
356
357 if (count == 0)
358 return false;
359
360 QueryResult result;
361
362 uint32 objectCount = 0;
363 result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM gameobject WHERE id='%u'", gameObjectId);
364 if (result)
365 objectCount = (*result)[0].GetUInt64();
366
367 if (handler->GetSession())
368 {
369 Player* player = handler->GetSession()->GetPlayer();
370 result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
371 player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), gameObjectId, count);
372 }
373 else
374 result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id FROM gameobject WHERE id = '%u' LIMIT %u",
375 gameObjectId, count);
376
377 if (result)
378 {
379 do
380 {
381 Field* fields = result->Fetch();
382 uint32 guid = fields[0].GetUInt32();
383 float x = fields[1].GetFloat();
384 float y = fields[2].GetFloat();
385 float z = fields[3].GetFloat();
386 uint16 mapId = fields[4].GetUInt16();
387 uint32 entry = fields[5].GetUInt32();
388
389 if (handler->GetSession())
390 handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapId);
391 else
392 handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name.c_str(), x, y, z, mapId);
393 } while (result->NextRow());
394 }
395
396 handler->PSendSysMessage(LANG_COMMAND_LISTOBJMESSAGE, gameObjectId, objectCount);
397
398 return true;
399 }
400
401 static bool HandleListAurasCommand(ChatHandler* handler, char const* /*args*/)
402 {
403 Unit* unit = handler->getSelectedUnit();
404 if (!unit)
405 {
407 handler->SetSentErrorMessage(true);
408 return false;
409 }
410
411 char const* talentStr = handler->GetSkyFireString(LANG_TALENT);
412 char const* passiveStr = handler->GetSkyFireString(LANG_PASSIVE);
413
414 Unit::AuraApplicationMap const& auras = unit->GetAppliedAuras();
415 handler->PSendSysMessage(LANG_COMMAND_TARGET_LISTAURAS, auras.size());
416 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
417 {
418 bool talent = GetTalentSpellCost(itr->second->GetBase()->GetId()) > 0;
419
420 AuraApplication const* aurApp = itr->second;
421 Aura const* aura = aurApp->GetBase();
422 char const* name = aura->GetSpellInfo()->SpellName;
423
424 std::ostringstream ss_name;
425 ss_name << "|cffffffff|Hspell:" << aura->GetId() << "|h[" << name << "]|h|r";
426
427 handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str().c_str() : name),
428 aurApp->GetEffectMask(), aura->GetCharges(), aura->GetStackAmount(), aurApp->GetSlot(),
429 aura->GetDuration(), aura->GetMaxDuration(), (aura->IsPassive() ? passiveStr : ""),
430 (talent ? talentStr : ""), IS_PLAYER_GUID(aura->GetCasterGUID()) ? "player" : "creature",
431 GUID_LOPART(aura->GetCasterGUID()));
432 }
433
434 for (uint16 i = 0; i < TOTAL_AURAS; ++i)
435 {
436 Unit::AuraEffectList const& auraList = unit->GetAuraEffectsByType(AuraType(i));
437 if (auraList.empty())
438 continue;
439
440 handler->PSendSysMessage(LANG_COMMAND_TARGET_LISTAURATYPE, auraList.size(), i);
441
442 for (Unit::AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end(); ++itr)
443 handler->PSendSysMessage(LANG_COMMAND_TARGET_AURASIMPLE, (*itr)->GetId(), (*itr)->GetEffIndex(), (*itr)->GetAmount());
444 }
445
446 return true;
447 }
448 // handle list mail command
449 static bool HandleListMailCommand(ChatHandler* handler, char const* args)
450 {
451 Player* target;
452 uint64 targetGuid;
453 std::string targetName;
454
455 if (!*args)
456 return false;
457
458 uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER);
459
460 if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
461 {
462 target = sObjectMgr->GetPlayerByLowGUID(parseGUID);
463 targetGuid = parseGUID;
464 }
465 else if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
466 return false;
467
469 stmt->setUInt32(0, targetGuid);
470 PreparedQueryResult result = CharacterDatabase.Query(stmt);
471 if (result)
472 {
473 Field* fields = result->Fetch();
474 uint32 countMail = fields[0].GetUInt64();
475 std::string nameLink = handler->playerLink(targetName);
476 handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), targetGuid);
478 PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO);
479 stmt->setUInt32(0, targetGuid);
480 PreparedQueryResult result = CharacterDatabase.Query(stmt);
481 if (result)
482 {
483 do
484 {
485 Field* fields = result->Fetch();
486 uint32 messageId = fields[0].GetUInt32();
487 uint32 senderId = fields[1].GetUInt32();
488 std::string sender = fields[2].GetString();
489 uint32 receiverId = fields[3].GetUInt32();
490 std::string receiver = fields[4].GetString();
491 std::string subject = fields[5].GetString();
492 uint64 deliverTime = fields[6].GetUInt32();
493 uint64 expireTime = fields[7].GetUInt32();
494 uint32 money = fields[8].GetUInt32();
495 int hasItem = fields[9].GetUInt8();
496 uint32 gold = money / GOLD;
497 uint32 silv = (money % GOLD) / SILVER;
498 uint32 copp = (money % GOLD) % SILVER;
499 std::string receiverStr = handler->playerLink(receiver);
500 std::string senderStr = handler->playerLink(sender);
501 handler->PSendSysMessage(LANG_LIST_MAIL_INFO_1, messageId, subject.c_str(), gold, silv, copp);
502 handler->PSendSysMessage(LANG_LIST_MAIL_INFO_2, senderStr.c_str(), senderId, receiverStr.c_str(), receiverId);
503 handler->PSendSysMessage(LANG_LIST_MAIL_INFO_3, TimeToTimestampStr(deliverTime).c_str(), TimeToTimestampStr(expireTime).c_str());
504 if (hasItem == 1)
505 {
506 QueryResult result2;
507 result2 = CharacterDatabase.PQuery("SELECT item_guid FROM mail_items WHERE mail_id = '%u'", messageId);
508 if (result2)
509 {
510 do
511 {
512 uint32 item_guid = (*result2)[0].GetUInt32();
514 stmt->setUInt32(0, item_guid);
515 PreparedQueryResult result3 = CharacterDatabase.Query(stmt);
516 if (result3)
517 {
518 do
519 {
520 Field* fields = result3->Fetch();
521 uint32 item_entry = fields[0].GetUInt32();
522 uint32 item_count = fields[1].GetUInt32();
523 QueryResult result4;
524 result4 = WorldDatabase.PQuery("SELECT name, quality FROM item_template WHERE entry = '%u'", item_entry);
525 Field* fields1 = result4->Fetch();
526 std::string item_name = fields1[0].GetString();
527 int item_quality = fields1[1].GetUInt8();
528 if (handler->GetSession())
529 {
530 uint32 color = ItemQualityColors[item_quality];
531 std::ostringstream itemStr;
532 itemStr << "|c" << std::hex << color << "|Hitem:" << item_entry << ":0:0:0:0:0:0:0:0:0|h[" << item_name << "]|h|r";
533 handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, itemStr.str().c_str(), item_entry, item_guid, item_count);
534 }
535 else
536 handler->PSendSysMessage(LANG_LIST_MAIL_INFO_ITEM, item_name.c_str(), item_entry, item_guid, item_count);
537 } while (result3->NextRow());
538 }
539 } while (result2->NextRow());
540 }
541 }
543 } while (result->NextRow());
544 }
545 else
547 return true;
548 }
549 else
551 return true;
552 }
553};
554
@ CHAR_SEL_CHAR_INVENTORY_ITEM_BY_ENTRY
@ CHAR_SEL_MAIL_LIST_COUNT
@ CHAR_SEL_MAIL_LIST_ITEMS
@ CHAR_SEL_MAIL_LIST_INFO
@ CHAR_SEL_MAIL_COUNT_ITEM
@ CHAR_SEL_AUCTIONHOUSE_COUNT_ITEM
@ CHAR_SEL_GUILD_BANK_COUNT_ITEM
@ CHAR_SEL_AUCTIONHOUSE_ITEM_BY_ENTRY
@ CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY
@ CHAR_SEL_CHAR_INVENTORY_COUNT_ITEM
@ CHAR_SEL_MAIL_ITEMS_BY_ENTRY
uint32 GetTalentSpellCost(uint32 spellId)
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
std::uint16_t uint16
Definition Define.h:78
@ LANG_ITEMLIST_GUILD
Definition Language.h:908
@ LANG_COMMAND_TARGET_LISTAURAS
Definition Language.h:447
@ LANG_LIST_MAIL_INFO_ITEM
Definition Language.h:945
@ LANG_LIST_MAIL_INFO_1
Definition Language.h:942
@ LANG_CREATURE_LIST_CONSOLE
Definition Language.h:900
@ LANG_ITEMLIST_MAIL
Definition Language.h:499
@ LANG_TALENT
Definition Language.h:47
@ LANG_COMMAND_NOITEMFOUND
Definition Language.h:416
@ LANG_ITEMLIST_AUCTION
Definition Language.h:500
@ LANG_GO_LIST_CHAT
Definition Language.h:508
@ LANG_LIST_MAIL_NOT_FOUND
Definition Language.h:946
@ LANG_COMMAND_LISTOBJMESSAGE
Definition Language.h:419
@ LANG_LIST_MAIL_HEADER
Definition Language.h:941
@ LANG_ACCOUNT_LIST_BAR
Definition Language.h:870
@ LANG_ITEMLIST_SLOT
Definition Language.h:498
@ LANG_COMMAND_TARGET_AURADETAIL
Definition Language.h:448
@ LANG_GO_LIST_CONSOLE
Definition Language.h:901
@ LANG_SELECT_CHAR_OR_CREATURE
Definition Language.h:12
@ LANG_COMMAND_INVALIDCREATUREID
Definition Language.h:420
@ LANG_COMMAND_LISTCREATUREMESSAGE
Definition Language.h:421
@ LANG_PASSIVE
Definition Language.h:46
@ LANG_CREATURE_LIST_CHAT
Definition Language.h:506
@ LANG_LIST_MAIL_INFO_2
Definition Language.h:943
@ LANG_COMMAND_TARGET_AURASIMPLE
Definition Language.h:450
@ LANG_COMMAND_LISTITEMMESSAGE
Definition Language.h:418
@ LANG_COMMAND_TARGET_LISTAURATYPE
Definition Language.h:449
@ LANG_LIST_MAIL_INFO_3
Definition Language.h:944
@ LANG_COMMAND_LISTOBJINVALIDID
Definition Language.h:417
@ LANG_COMMAND_ITEMIDINVALID
Definition Language.h:415
uint32 GUID_LOPART(uint64 x)
@ HIGHGUID_PLAYER
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
bool IS_PLAYER_GUID(uint64 guid)
#define sObjectMgr
Definition ObjectMgr.h:1617
Skyfire::AutoPtr< PreparedResultSet, Skyfire::Mutex > PreparedQueryResult
Definition QueryResult.h:94
Skyfire::AutoPtr< ResultSet, Skyfire::Mutex > QueryResult
Definition QueryResult.h:48
const uint32 ItemQualityColors[MAX_ITEM_QUALITY]
@ SILVER
@ GOLD
@ TOTAL_AURAS
std::string TimeToTimestampStr(time_t t)
Definition Util.cpp:213
Aura * GetBase() const
Definition SpellAuras.h:55
uint8 GetSlot() const
Definition SpellAuras.h:57
uint32 GetEffectMask() const
Definition SpellAuras.h:59
uint64 GetCasterGUID() const
Definition SpellAuras.h:91
int32 GetMaxDuration() const
Definition SpellAuras.h:115
uint32 GetId() const
Definition SpellAuras.h:88
int32 GetDuration() const
Definition SpellAuras.h:119
uint8 GetStackAmount() const
Definition SpellAuras.h:133
uint8 GetCharges() const
Definition SpellAuras.h:126
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:87
bool IsPassive() const
std::string playerLink(std::string const &name) const
Definition Chat.h:108
Unit * getSelectedUnit()
Definition Chat.cpp:841
WorldSession * GetSession()
Definition Chat.h:43
char * extractKeyFromLink(char *text, char const *linkType, char **something1=NULL)
Definition Chat.cpp:873
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
Definition Chat.cpp:221
void SetSentErrorMessage(bool val)
Definition Chat.h:114
bool extractPlayerTarget(char *args, Player **player, uint64 *player_guid=NULL, std::string *player_name=NULL)
Definition Chat.cpp:1184
virtual void SendSysMessage(const char *str)
Definition Chat.cpp:153
virtual const char * GetSkyFireString(int32 entry) const
Definition Chat.cpp:68
CommandScript(const char *name)
Definition Field.h:16
uint8 GetUInt8() const
Definition Field.h:26
std::string GetString() const
Definition Field.h:228
uint64 GetUInt64() const
Definition Field.h:141
uint16 GetUInt16() const
Definition Field.h:69
float GetFloat() const
Definition Field.h:177
uint32 GetUInt32() const
Definition Field.h:105
static bool IsEquipmentPos(uint16 pos)
Definition Player.h:1536
static bool IsInventoryPos(uint16 pos)
Definition Player.h:1531
static bool IsBankPos(uint16 pos)
Definition Player.h:1542
void setUInt32(const uint8 index, const uint32 value)
char * SpellName
Definition SpellInfo.h:222
Definition Unit.h:1367
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
Definition Unit.h:2243
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:1376
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:2204
std::list< AuraEffect * > AuraEffectList
Definition Unit.h:1383
Player * GetPlayer() const
std::vector< ChatCommand > GetCommands() const OVERRIDE
Definition cs_list.cpp:27
static bool HandleListItemCommand(ChatHandler *handler, char const *args)
Definition cs_list.cpp:116
static bool HandleListCreatureCommand(ChatHandler *handler, char const *args)
Definition cs_list.cpp:44
static bool HandleListObjectCommand(ChatHandler *handler, char const *args)
Definition cs_list.cpp:328
static bool HandleListMailCommand(ChatHandler *handler, char const *args)
Definition cs_list.cpp:449
static bool HandleListAurasCommand(ChatHandler *handler, char const *)
Definition cs_list.cpp:401
void AddSC_list_commandscript()
Definition cs_list.cpp:555
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition Main.cpp:41
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
Definition Main.cpp:40
@ RBAC_PERM_COMMAND_LIST_MAIL
Definition RBAC.h:329
@ RBAC_PERM_COMMAND_LIST_ITEM
Definition RBAC.h:326
@ RBAC_PERM_COMMAND_LIST_CREATURE
Definition RBAC.h:325
@ RBAC_PERM_COMMAND_LIST_OBJECT
Definition RBAC.h:327
@ RBAC_PERM_COMMAND_LIST_AURAS
Definition RBAC.h:328
@ RBAC_PERM_COMMAND_LIST
Definition RBAC.h:324
std::string Name
Definition Creature.h:71
std::string name
Definition GameObject.h:28
float GetPositionZ() const
Definition Object.h:330
float GetPositionX() const
Definition Object.h:328
float GetPositionY() const
Definition Object.h:329