Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
cs_debug.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: debug_commandscript
8%Complete: 100
9Comment: All debug related commands
10Category: commandscripts
11EndScriptData */
12
13#include "BattlegroundMgr.h"
14#include "BattlegroundSA.h"
15#include "Cell.h"
16#include "CellImpl.h"
17#include "Chat.h"
18#include "GossipDef.h"
19#include "GridNotifiers.h"
20#include "GridNotifiersImpl.h"
21#include "Group.h"
22#include "Language.h"
23#include "LFGMgr.h"
24#include "ObjectAccessor.h"
25#include "ObjectMgr.h"
26#include "Player.h"
27#include "PlayerRestState.h"
28#include "ScriptMgr.h"
29#include "Transport.h"
30#include "WorldSession.h"
31
33{
34public:
35 debug_commandscript() : CommandScript("debug_commandscript") { }
36
37 std::vector<ChatCommand> GetCommands() const OVERRIDE
38 {
39 static std::vector<ChatCommand> debugPlayCommandTable =
40 {
44 };
45 static std::vector<ChatCommand> debugSendCommandTable =
46 {
57 };
58 static std::vector<ChatCommand> boatCommandTable =
59 {
62 };
63 static std::vector<ChatCommand> debugLfgCommandTable =
64 {
68 };
69 static std::vector<ChatCommand> debugCommandTable =
70 {
71 { "boat", rbac::RBAC_PERM_COMMAND_DEBUG_BG, false, NULL, "", boatCommandTable },
72 { "lfg", rbac::RBAC_PERM_COMMAND_DEBUG_LFG_REQUIREMENTS, true, NULL, "", debugLfgCommandTable },
84 { "play", rbac::RBAC_PERM_COMMAND_DEBUG_PLAY, false, NULL, "", debugPlayCommandTable },
85 { "send", rbac::RBAC_PERM_COMMAND_DEBUG_SEND, false, NULL, "", debugSendCommandTable },
100 };
101 static std::vector<ChatCommand> commandTable =
102 {
103 { "boat", rbac::RBAC_PERM_COMMAND_DEBUG_BG, false, NULL, "", boatCommandTable },
104 { "debug", rbac::RBAC_PERM_COMMAND_DEBUG, true, NULL, "", debugCommandTable },
105 { "wpgps", rbac::RBAC_PERM_COMMAND_WPGPS, false, &HandleWPGPSCommand, "", },
106 };
107 return commandTable;
108 }
109
111 {
112 if (!sBattlegroundMgr->isTesting())
113 {
114 handler->SendSysMessage("Enable battleground debug mode with .debug bg before using boat debug commands.");
115 handler->SetSentErrorMessage(true);
116 return NULL;
117 }
118
119 WorldSession* session = handler->GetSession();
120 Player* player = session ? session->GetPlayer() : NULL;
121 if (!player)
122 {
123 handler->SendSysMessage("Boat debug commands require an in-game player session.");
124 handler->SetSentErrorMessage(true);
125 return NULL;
126 }
127
128 Battleground* bg = player->GetBattleground();
129 if (!bg || bg->GetTypeID(true) != BattlegroundTypeId::BATTLEGROUND_SA)
130 {
131 handler->SendSysMessage("Boat debug commands can only be used inside Strand of the Ancients.");
132 handler->SetSentErrorMessage(true);
133 return NULL;
134 }
135
136 return static_cast<BattlegroundSA*>(bg);
137 }
138
139 static bool HandleBoatStartCommand(ChatHandler* handler, char const* /*args*/)
140 {
142 if (!bg)
143 return false;
144
145 Player* player = handler->GetSession()->GetPlayer();
146 if (!bg->DebugStartBoats(player))
147 {
148 handler->SendSysMessage("SOTA boat debug start failed: one or more boat objects are missing.");
149 handler->SetSentErrorMessage(true);
150 return false;
151 }
152
153 handler->SendSysMessage("SOTA boat debug timer started. Use .boat stop to freeze boats and log elapsed time.");
154 handler->PSendSysMessage("SOTA boat debug status: %s", bg->GetBoatDebugStatus().c_str());
155 return true;
156 }
157
158 static bool HandleBoatStopCommand(ChatHandler* handler, char const* /*args*/)
159 {
161 if (!bg)
162 return false;
163
164 if (!bg->DebugStopBoats(handler->GetSession()->GetPlayer()))
165 {
166 handler->SendSysMessage("SOTA boat debug stop failed: one or more boat objects are missing.");
167 handler->SetSentErrorMessage(true);
168 return false;
169 }
170
171 handler->SendSysMessage("SOTA boat debug timer stopped and written to the packet log.");
172 handler->PSendSysMessage("SOTA boat debug status: %s", bg->GetBoatDebugStatus().c_str());
173 return true;
174 }
175
177 {
179 HashMapHolder<Player>::MapType const& players = sObjectAccessor->GetPlayers();
180 for (HashMapHolder<Player>::MapType::const_iterator itr = players.begin(); itr != players.end(); ++itr)
181 if (WorldSession* session = itr->second->GetSession())
182 session->SendLfgPlayerLockInfo();
183 }
184
185 static bool HandleDebugLfgRequirementsCommand(ChatHandler* handler, char const* args)
186 {
187 if (!*args)
188 {
189 handler->PSendSysMessage("LFG requirement override is currently %s server-wide.", sLFGMgr->IsDebugRequirementOverrideEnabled() ? "ON" : "OFF");
190 handler->SendSysMessage("Usage: .debug lfg requirements on|off");
191 handler->SetSentErrorMessage(true);
192 return false;
193 }
194
195 if (!stricmp(args, "on"))
196 {
197 sLFGMgr->SetDebugRequirementOverride(true);
199 handler->SendSysMessage("LFG requirement override is ON server-wide.");
200 return true;
201 }
202
203 if (!stricmp(args, "off"))
204 {
205 sLFGMgr->SetDebugRequirementOverride(false);
207 handler->SendSysMessage("LFG requirement override is OFF server-wide.");
208 return true;
209 }
210
211 handler->SendSysMessage("Usage: .debug lfg requirements on|off");
212 handler->SetSentErrorMessage(true);
213 return false;
214 }
215
216 static bool HandleDebugLfgFlexCommand(ChatHandler* handler, char const* args)
217 {
218 if (!*args || !stricmp(args, "status"))
219 {
220 handler->PSendSysMessage("LFG flex raid minimum override is currently %s server-wide.", sLFGMgr->IsDebugFlexRaidMinimumOverrideEnabled() ? "ON" : "OFF");
221 handler->SendSysMessage("Usage: .debug lfg flex on|off|status");
222 return true;
223 }
224
225 if (!stricmp(args, "on"))
226 {
227 sLFGMgr->SetDebugFlexRaidMinimumOverride(true);
228 handler->SendSysMessage("LFG flex raid minimum override is ON server-wide.");
229 return true;
230 }
231
232 if (!stricmp(args, "off"))
233 {
234 sLFGMgr->SetDebugFlexRaidMinimumOverride(false);
235 handler->SendSysMessage("LFG flex raid minimum override is OFF server-wide.");
236 return true;
237 }
238
239 handler->SendSysMessage("Usage: .debug lfg flex on|off|status");
240 handler->SetSentErrorMessage(true);
241 return false;
242 }
243
244 static bool HandleDebugLfgGroupCommand(ChatHandler* handler, char const* args)
245 {
246 WorldSession* session = handler->GetSession();
247 Player* player = session ? session->GetPlayer() : NULL;
248 if (!player)
249 {
250 handler->SendSysMessage("Usage: .debug lfg group raid|party|status");
251 handler->SetSentErrorMessage(true);
252 return false;
253 }
254
255 Group* group = player->GetGroup();
256 if (!group)
257 {
258 handler->SendSysMessage("You are not in a group.");
259 handler->SetSentErrorMessage(true);
260 return false;
261 }
262
263 if (!group->IsLeader(player->GetGUID()))
264 {
265 handler->SendSysMessage("Only the group leader can convert the group.");
266 handler->SetSentErrorMessage(true);
267 return false;
268 }
269
270 if (!*args || !stricmp(args, "status"))
271 {
272 uint32 missingRoles = 0;
273 Group::MemberSlotList const& slots = group->GetMemberSlots();
274 for (Group::MemberSlotList::const_iterator itr = slots.begin(); itr != slots.end(); ++itr)
275 if (!itr->roles)
276 ++missingRoles;
277
278 handler->PSendSysMessage("Current group mode: %s (%u/%u members).",
279 group->isRaidGroup() ? "raid" : "party",
280 group->GetMembersCount(),
282 handler->PSendSysMessage("Members missing LFG roles: %u.", missingRoles);
283 handler->SendSysMessage("Usage: .debug lfg group raid|party|status");
284 return true;
285 }
286
287 if (!stricmp(args, "raid"))
288 {
289 if (!group->isRaidGroup())
290 group->ConvertToRaid();
291
292 uint32 seededRoles = 0;
293 Group::MemberSlotList const& slots = group->GetMemberSlots();
294 for (Group::MemberSlotList::const_iterator itr = slots.begin(); itr != slots.end(); ++itr)
295 {
296 if (itr->roles)
297 continue;
298
299 group->SetMemberRole(itr->guid, lfg::PLAYER_ROLE_DAMAGE);
300 ++seededRoles;
301 }
302
303 if (seededRoles)
304 group->SendUpdate();
305
306 handler->PSendSysMessage("Current group converted to raid mode (%u/%u members).", group->GetMembersCount(), MAXRAIDSIZE);
307 if (seededRoles)
308 handler->PSendSysMessage("Seeded %u missing LFG role(s) as damage for flex raid testing.", seededRoles);
309 return true;
310 }
311
312 if (!stricmp(args, "party"))
313 {
314 if (group->GetMembersCount() > MAXGROUPSIZE)
315 {
316 handler->PSendSysMessage("Cannot convert back to party while the group has %u members.", group->GetMembersCount());
317 handler->SetSentErrorMessage(true);
318 return false;
319 }
320
321 if (group->isRaidGroup())
322 group->ConvertToGroup();
323
324 handler->PSendSysMessage("Current group converted to party mode (%u/%u members).", group->GetMembersCount(), MAXGROUPSIZE);
325 return true;
326 }
327
328 handler->SendSysMessage("Usage: .debug lfg group raid|party|status");
329 handler->SetSentErrorMessage(true);
330 return false;
331 }
332
333 static bool HandleDebugPlayCinematicCommand(ChatHandler* handler, char const* args)
334 {
335 // USAGE: .debug play cinematic #cinematicid
336 // #cinematicid - ID decimal number from CinemaicSequences.dbc (1st column)
337 if (!*args)
338 {
340 handler->SetSentErrorMessage(true);
341 return false;
342 }
343
344 uint32 id = atoi((char*)args);
345
346 if (!sCinematicSequencesStore.LookupEntry(id))
347 {
349 handler->SetSentErrorMessage(true);
350 return false;
351 }
352
353 handler->GetSession()->GetPlayer()->SendCinematicStart(id);
354 return true;
355 }
356
357 static bool HandleDebugPlayMovieCommand(ChatHandler* handler, char const* args)
358 {
359 // USAGE: .debug play movie #movieid
360 // #movieid - ID decimal number from Movie.dbc (1st column)
361 if (!*args)
362 {
364 handler->SetSentErrorMessage(true);
365 return false;
366 }
367
368 uint32 id = atoi((char*)args);
369
370 if (!sMovieStore.LookupEntry(id))
371 {
373 handler->SetSentErrorMessage(true);
374 return false;
375 }
376
377 handler->GetSession()->GetPlayer()->SendMovieStart(id);
378 return true;
379 }
380
381 //Play sound
382 static bool HandleDebugPlaySoundCommand(ChatHandler* handler, char const* args)
383 {
384 // USAGE: .debug playsound #soundid
385 // #soundid - ID decimal number from SoundEntries.dbc (1st column)
386 if (!*args)
387 {
389 handler->SetSentErrorMessage(true);
390 return false;
391 }
392
393 uint32 soundId = atoi((char*)args);
394
395 if (!sSoundEntriesStore.LookupEntry(soundId))
396 {
397 handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId);
398 handler->SetSentErrorMessage(true);
399 return false;
400 }
401
402 Unit* unit = handler->getSelectedUnit();
403 if (!unit)
404 {
406 handler->SetSentErrorMessage(true);
407 return false;
408 }
409
410 if (handler->GetSession()->GetPlayer()->GetTarget())
411 unit->PlayDistanceSound(soundId, handler->GetSession()->GetPlayer());
412 else
413 unit->PlayDirectSound(soundId, handler->GetSession()->GetPlayer());
414
415 handler->PSendSysMessage(LANG_YOU_HEAR_SOUND, soundId);
416 return true;
417 }
418
419 static bool HandleDebugSendSpellFailCommand(ChatHandler* handler, char const* args)
420 {
421 if (!*args)
422 return false;
423
424 char* result = strtok((char*)args, " ");
425 if (!result)
426 return false;
427
428 uint8 failNum = (uint8)atoi(result);
429 if (failNum == 0 && *result != '0')
430 return false;
431
432 char* fail1 = strtok(NULL, " ");
433 uint8 failArg1 = fail1 ? (uint8)atoi(fail1) : 0;
434
435 char* fail2 = strtok(NULL, " ");
436 uint8 failArg2 = fail2 ? (uint8)atoi(fail2) : 0;
437
439 data << uint8(0);
440 data << uint32(133);
441 data << uint8(failNum);
442 if (fail1 || fail2)
443 data << uint32(failArg1);
444 if (fail2)
445 data << uint32(failArg2);
446
447 handler->GetSession()->SendPacket(&data);
448
449 return true;
450 }
451
452 static bool HandleDebugSendEquipErrorCommand(ChatHandler* handler, char const* args)
453 {
454 if (!*args)
455 return false;
456
457 InventoryResult msg = InventoryResult(atoi(args));
458 handler->GetSession()->GetPlayer()->SendEquipError(msg, NULL, NULL);
459 return true;
460 }
461
462 static bool HandleDebugSendSellErrorCommand(ChatHandler* handler, char const* args)
463 {
464 if (!*args)
465 return false;
466
467 SellResult msg = SellResult(atoi(args));
468 handler->GetSession()->GetPlayer()->SendSellResponse(msg, 0, 0);
469 return true;
470 }
471
472 static bool HandleDebugSendBuyErrorCommand(ChatHandler* handler, char const* args)
473 {
474 if (!*args)
475 return false;
476
477 BuyResult msg = BuyResult(atoi(args));
478 handler->GetSession()->GetPlayer()->SendBuyFailed(msg, 0, 0);
479 return true;
480 }
481
482 static bool HandleDebugUpdateWorldStateCommand(ChatHandler* handler, char const* args)
483 {
484 char* w = strtok((char*)args, " ");
485 char* s = strtok(NULL, " ");
486
487 if (!w || !s)
488 return false;
489
490 uint32 world = (uint32)atoi(w);
491 uint32 state = (uint32)atoi(s);
492 handler->GetSession()->GetPlayer()->SendUpdateWorldState(world, state);
493 return true;
494 }
495
496 static bool HandleDebugAreaTriggersCommand(ChatHandler* handler, char const* /*args*/)
497 {
498 Player* player = handler->GetSession()->GetPlayer();
499 if (!player->isDebugAreaTriggers)
500 {
502 player->isDebugAreaTriggers = true;
503 }
504 else
505 {
507 player->isDebugAreaTriggers = false;
508 }
509 return true;
510 }
511
512 //Send notification in channel
513 static bool HandleDebugSendChannelNotifyCommand(ChatHandler* handler, char const* args)
514 {
515 if (!*args)
516 return false;
517
518 char const* name = "test";
519 uint8 code = atoi(args);
520
521 WorldPacket data(SMSG_CHANNEL_NOTIFY, (1 + 10));
522 data << code; // notify type
523 data << name; // channel name
524 data << uint32(0);
525 data << uint32(0);
526 handler->GetSession()->SendPacket(&data);
527 return true;
528 }
529
530 //Send notification in chat
531 static bool HandleDebugSendChatMsgCommand(ChatHandler* handler, char const* args)
532 {
533 if (!*args)
534 return false;
535
536 char const* msg = "testtest";
537 uint8 type = atoi(args);
538 WorldPacket data;
539 ChatHandler::BuildChatPacket(data, ChatMsg(type), Language::LANG_UNIVERSAL, handler->GetSession()->GetPlayer(), handler->GetSession()->GetPlayer(), msg, 0, "chan");
540 handler->GetSession()->SendPacket(&data);
541 return true;
542 }
543
544 static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler* handler, char const* args)
545 {
546 uint32 msg = atol((char*)args);
547 handler->GetSession()->GetPlayer()->SendPushToPartyResponse(handler->GetSession()->GetPlayer(), msg);
548 return true;
549 }
550
551 static bool HandleDebugGetLootRecipientCommand(ChatHandler* handler, char const* /*args*/)
552 {
553 Creature* target = handler->getSelectedCreature();
554 if (!target)
555 return false;
556
557 handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, DB GUID %u) is %s",
558 target->GetName().c_str(), target->GetGUIDLow(), target->GetDBTableGUIDLow(),
559 target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName().c_str() : "offline") : "no loot recipient");
560 return true;
561 }
562
563 static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler* handler, char const* args)
564 {
565 QuestFailedReason msg = static_cast<QuestFailedReason>(atol((char*)args));
567 return true;
568 }
569
570 static bool HandleDebugGetItemStateCommand(ChatHandler* handler, char const* args)
571 {
572 if (!*args)
573 return false;
574
575 std::string itemState = args;
576
578 bool listQueue = false;
579 bool checkAll = false;
580
581 if (itemState == "unchanged")
582 state = ITEM_UNCHANGED;
583 else if (itemState == "changed")
584 state = ITEM_CHANGED;
585 else if (itemState == "new")
586 state = ITEM_NEW;
587 else if (itemState == "removed")
588 state = ITEM_REMOVED;
589 else if (itemState == "queue")
590 listQueue = true;
591 else if (itemState == "check_all")
592 checkAll = true;
593 else
594 return false;
595
596 Player* player = handler->getSelectedPlayer();
597 if (!player)
598 player = handler->GetSession()->GetPlayer();
599
600 if (!listQueue && !checkAll)
601 {
602 itemState = "The player has the following " + itemState + " items: ";
603 handler->SendSysMessage(itemState.c_str());
604 for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
605 {
606 if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
607 continue;
608
609 if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i))
610 {
611 if (Bag* bag = item->ToBag())
612 {
613 for (uint8 j = 0; j < bag->GetBagSize(); ++j)
614 if (Item* item2 = bag->GetItemByPos(j))
615 if (item2->GetState() == state)
616 handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item2->GetSlot(), item2->GetGUIDLow(), GUID_LOPART(item2->GetOwnerGUID()));
617 }
618 else if (item->GetState() == state)
619 handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()));
620 }
621 }
622 }
623
624 if (listQueue)
625 {
626 std::vector<Item*>& updateQueue = player->GetItemUpdateQueue();
627 for (size_t i = 0; i < updateQueue.size(); ++i)
628 {
629 Item* item = updateQueue[i];
630 if (!item)
631 continue;
632
633 Bag* container = item->GetContainer();
634 uint8 bagSlot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0);
635
636 std::string st;
637 switch (item->GetState())
638 {
639 case ITEM_UNCHANGED:
640 st = "unchanged";
641 break;
642 case ITEM_CHANGED:
643 st = "changed";
644 break;
645 case ITEM_NEW:
646 st = "new";
647 break;
648 case ITEM_REMOVED:
649 st = "removed";
650 break;
651 }
652
653 handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
654 }
655 if (updateQueue.empty())
656 handler->PSendSysMessage("The player's updatequeue is empty");
657 }
658
659 if (checkAll)
660 {
661 bool error = false;
662 std::vector<Item*>& updateQueue = player->GetItemUpdateQueue();
663 for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
664 {
665 if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
666 continue;
667
668 Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
669 if (!item)
670 continue;
671
672 if (item->GetSlot() != i)
673 {
674 handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUIDLow(), item->GetSlot());
675 error = true;
676 continue;
677 }
678
679 if (item->GetOwnerGUID() != player->GetGUID())
680 {
681 handler->PSendSysMessage("The item with slot %d and itemguid %d does have non-matching owner guid (%d) and player guid (%d) !", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
682 error = true;
683 continue;
684 }
685
686 if (Bag* container = item->GetContainer())
687 {
688 handler->PSendSysMessage("The item with slot %d and guid %d has a container (slot: %d, guid: %d) but shouldn't!", item->GetSlot(), item->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
689 error = true;
690 continue;
691 }
692
693 if (item->IsInUpdateQueue())
694 {
695 uint16 qp = item->GetQueuePos();
696 if (qp > updateQueue.size())
697 {
698 handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUIDLow(), qp);
699 error = true;
700 continue;
701 }
702
703 if (updateQueue[qp] == NULL)
704 {
705 handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUIDLow(), qp);
706 error = true;
707 continue;
708 }
709
710 if (updateQueue[qp] != item)
711 {
712 handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
713 error = true;
714 continue;
715 }
716 }
717 else if (item->GetState() != ITEM_UNCHANGED)
718 {
719 handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUIDLow(), item->GetState());
720 error = true;
721 continue;
722 }
723
724 if (Bag* bag = item->ToBag())
725 {
726 for (uint8 j = 0; j < bag->GetBagSize(); ++j)
727 {
728 Item* item2 = bag->GetItemByPos(j);
729 if (!item2)
730 continue;
731
732 if (item2->GetSlot() != j)
733 {
734 handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUIDLow(), item2->GetSlot());
735 error = true;
736 continue;
737 }
738
739 if (item2->GetOwnerGUID() != player->GetGUID())
740 {
741 handler->PSendSysMessage("The item in bag %d at slot %d and with itemguid %d, the owner's guid (%d) and the player's guid (%d) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), GUID_LOPART(item2->GetOwnerGUID()), player->GetGUIDLow());
742 error = true;
743 continue;
744 }
745
746 Bag* container = item2->GetContainer();
747 if (!container)
748 {
749 handler->PSendSysMessage("The item in bag %d at slot %d with guid %d has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow());
750 error = true;
751 continue;
752 }
753
754 if (container != bag)
755 {
756 handler->PSendSysMessage("The item in bag %d at slot %d with guid %d has a different container(slot %d guid %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
757 error = true;
758 continue;
759 }
760
761 if (item2->IsInUpdateQueue())
762 {
763 uint16 qp = item2->GetQueuePos();
764 if (qp > updateQueue.size())
765 {
766 handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
767 error = true;
768 continue;
769 }
770
771 if (updateQueue[qp] == NULL)
772 {
773 handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
774 error = true;
775 continue;
776 }
777
778 if (updateQueue[qp] != item2)
779 {
780 handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
781 error = true;
782 continue;
783 }
784 }
785 else if (item2->GetState() != ITEM_UNCHANGED)
786 {
787 handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), item2->GetState());
788 error = true;
789 continue;
790 }
791 }
792 }
793 }
794
795 for (size_t i = 0; i < updateQueue.size(); ++i)
796 {
797 Item* item = updateQueue[i];
798 if (!item)
799 continue;
800
801 if (item->GetOwnerGUID() != player->GetGUID())
802 {
803 handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
804 error = true;
805 continue;
806 }
807
808 if (item->GetQueuePos() != i)
809 {
810 handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
811 error = true;
812 continue;
813 }
814
815 if (item->GetState() == ITEM_REMOVED)
816 continue;
817
818 Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
819
820 if (test == NULL)
821 {
822 handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have any item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
823 error = true;
824 continue;
825 }
826
827 if (test != item)
828 {
829 handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, an item which guid is %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
830 error = true;
831 continue;
832 }
833 }
834 if (!error)
835 handler->SendSysMessage("All OK!");
836 }
837
838 return true;
839 }
840
841 static bool HandleDebugBattlegroundCommand(ChatHandler* /*handler*/, char const* /*args*/)
842 {
843 sBattlegroundMgr->ToggleTesting();
844 return true;
845 }
846
847 static bool HandleDebugArenaCommand(ChatHandler* /*handler*/, char const* /*args*/)
848 {
849 sBattlegroundMgr->ToggleArenaTesting();
850 return true;
851 }
852
853 static bool HandleDebugThreatListCommand(ChatHandler* handler, char const* /*args*/)
854 {
855 Creature* target = handler->getSelectedCreature();
856 if (!target || target->IsTotem() || target->IsPet())
857 return false;
858
859 ThreatContainer::StorageType const& threatList = target->getThreatManager().getThreatList();
860 ThreatContainer::StorageType::const_iterator itr;
861 uint32 count = 0;
862 handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
863 for (itr = threatList.begin(); itr != threatList.end(); ++itr)
864 {
865 Unit* unit = (*itr)->getTarget();
866 if (!unit)
867 continue;
868 ++count;
869 handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), (*itr)->getThreat());
870 }
871 handler->SendSysMessage("End of threat list.");
872 return true;
873 }
874
875 static bool HandleDebugHostileRefListCommand(ChatHandler* handler, char const* /*args*/)
876 {
877 Unit* target = handler->getSelectedUnit();
878 if (!target)
879 target = handler->GetSession()->GetPlayer();
881 uint32 count = 0;
882 handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName().c_str(), target->GetGUIDLow());
883 while (ref)
884 {
885 if (Unit* unit = ref->GetSource()->GetOwner())
886 {
887 ++count;
888 handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName().c_str(), unit->GetGUIDLow(), ref->getThreat());
889 }
890 ref = ref->next();
891 }
892 handler->SendSysMessage("End of hostil reference list.");
893 return true;
894 }
895
896 static bool HandleDebugSetVehicleIdCommand(ChatHandler* handler, char const* args)
897 {
898 Unit* target = handler->getSelectedUnit();
899 if (!target || target->IsVehicle())
900 return false;
901
902 if (!args)
903 return false;
904
905 char* i = strtok((char*)args, " ");
906 if (!i)
907 return false;
908
909 uint32 id = (uint32)atoi(i);
910 //target->SetVehicleId(id);
911 handler->PSendSysMessage("Vehicle id set to %u", id);
912 return true;
913 }
914
915 static bool HandleDebugEnterVehicleCommand(ChatHandler* handler, char const* args)
916 {
917 Unit* target = handler->getSelectedUnit();
918 if (!target || !target->IsVehicle())
919 return false;
920
921 if (!args)
922 return false;
923
924 char* i = strtok((char*)args, " ");
925 if (!i)
926 return false;
927
928 char* j = strtok(NULL, " ");
929
930 uint32 entry = (uint32)atoi(i);
931 int8 seatId = j ? (int8)atoi(j) : -1;
932
933 if (!entry)
934 handler->GetSession()->GetPlayer()->EnterVehicle(target, seatId);
935 else
936 {
937 Creature* passenger = NULL;
938 Skyfire::AllCreaturesOfEntryInRange check(handler->GetSession()->GetPlayer(), entry, 20.0f);
940 handler->GetSession()->GetPlayer()->VisitNearbyObject(30.0f, searcher);
941 if (!passenger || passenger == target)
942 return false;
943 passenger->EnterVehicle(target, seatId);
944 }
945
946 handler->PSendSysMessage("Unit %u entered vehicle %d", entry, (int32)seatId);
947 return true;
948 }
949
950 static bool HandleDebugSpawnVehicleCommand(ChatHandler* handler, char const* args)
951 {
952 if (!*args)
953 return false;
954
955 char* e = strtok((char*)args, " ");
956 char* i = strtok(NULL, " ");
957
958 if (!e)
959 return false;
960
961 uint32 entry = (uint32)atoi(e);
962
963 float x, y, z, o = handler->GetSession()->GetPlayer()->GetOrientation();
964 handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, handler->GetSession()->GetPlayer()->GetObjectSize());
965
966 if (!i)
967 return handler->GetSession()->GetPlayer()->SummonCreature(entry, x, y, z, o);
968
969 uint32 id = (uint32)atoi(i);
970
971 CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry);
972
973 if (!ci)
974 return false;
975
976 VehicleEntry const* ve = sVehicleStore.LookupEntry(id);
977
978 if (!ve)
979 return false;
980
981 Creature* v = new Creature;
982
983 Map* map = handler->GetSession()->GetPlayer()->GetMap();
984
985 if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, entry, id, handler->GetSession()->GetPlayer()->GetTeam(), x, y, z, o))
986 {
987 delete v;
988 return false;
989 }
990
991 for (auto phase : handler->GetSession()->GetPlayer()->GetPhases())
992 v->SetPhased(phase, false, true);
993
994 map->AddToMap(v->ToCreature());
995
996 return true;
997 }
998
999 static bool HandleDebugSendLargePacketCommand(ChatHandler* handler, char const* /*args*/)
1000 {
1001 const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
1002 std::ostringstream ss;
1003 while (ss.str().size() < 128000)
1004 ss << stuffingString;
1005 handler->SendSysMessage(ss.str().c_str());
1006 return true;
1007 }
1008
1009 static bool HandleDebugSendSetPhaseShiftCommand(ChatHandler* handler, char const* args)
1010 {
1011 if (!*args)
1012 return false;
1013
1014 char* t = strtok((char*)args, " ");
1015 char* p = strtok(NULL, " ");
1016
1017 if (!t)
1018 return false;
1019
1020 std::set<uint32> terrainswap;
1021 std::set<uint32> phaseId;
1022 std::set<uint32> worldMapArea;
1023
1024 terrainswap.insert((uint32)atoi(t));
1025
1026 if (p)
1027 phaseId.insert((uint32)atoi(p));
1028
1029 handler->GetSession()->SendSetPhaseShift(phaseId, terrainswap, worldMapArea);
1030 return true;
1031 }
1032
1033 static bool HandleDebugGetItemValueCommand(ChatHandler* handler, char const* args)
1034 {
1035 if (!*args)
1036 return false;
1037
1038 char* e = strtok((char*)args, " ");
1039 char* f = strtok(NULL, " ");
1040
1041 if (!e || !f)
1042 return false;
1043
1044 uint32 guid = (uint32)atoi(e);
1045 uint32 index = (uint32)atoi(f);
1046
1047 Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
1048
1049 if (!i)
1050 return false;
1051
1052 if (index >= i->GetValuesCount())
1053 return false;
1054
1055 uint32 value = i->GetUInt32Value(index);
1056
1057 handler->PSendSysMessage("Item %u: value at %u is %u", guid, index, value);
1058
1059 return true;
1060 }
1061
1062 static bool HandleDebugSetItemValueCommand(ChatHandler* handler, char const* args)
1063 {
1064 if (!*args)
1065 return false;
1066
1067 char* e = strtok((char*)args, " ");
1068 char* f = strtok(NULL, " ");
1069 char* g = strtok(NULL, " ");
1070
1071 if (!e || !f || !g)
1072 return false;
1073
1074 uint32 guid = (uint32)atoi(e);
1075 uint32 index = (uint32)atoi(f);
1076 uint32 value = (uint32)atoi(g);
1077
1078 Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
1079
1080 if (!i)
1081 return false;
1082
1083 if (index >= i->GetValuesCount())
1084 return false;
1085
1086 i->SetUInt32Value(index, value);
1087
1088 return true;
1089 }
1090
1091 static bool HandleDebugItemExpireCommand(ChatHandler* handler, char const* args)
1092 {
1093 if (!*args)
1094 return false;
1095
1096 char* e = strtok((char*)args, " ");
1097 if (!e)
1098 return false;
1099
1100 uint32 guid = (uint32)atoi(e);
1101
1102 Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
1103
1104 if (!i)
1105 return false;
1106
1107 handler->GetSession()->GetPlayer()->DestroyItem(i->GetBagSlot(), i->GetSlot(), true);
1108 sScriptMgr->OnItemExpire(handler->GetSession()->GetPlayer(), i->GetTemplate());
1109
1110 return true;
1111 }
1112
1113 //show animation
1114 static bool HandleDebugAnimCommand(ChatHandler* handler, char const* args)
1115 {
1116 if (!*args)
1117 return false;
1118
1119 uint32 animId = atoi((char*)args);
1120 handler->GetSession()->GetPlayer()->HandleEmoteCommand(animId);
1121 return true;
1122 }
1123
1124 static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
1125 {
1126 if (Unit* unit = handler->getSelectedUnit())
1127 handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName().c_str(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
1128 return true;
1129 }
1130
1131 static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, char const* args)
1132 {
1133 if (!*args)
1134 {
1136 handler->SetSentErrorMessage(true);
1137 return false;
1138 }
1139
1140 Unit* unit = handler->getSelectedUnit();
1141 if (!unit)
1142 {
1144 handler->SetSentErrorMessage(true);
1145 return false;
1146 }
1147
1148 int32 state = atoi((char*)args);
1149 if (!state)
1150 {
1151 // reset all states
1152 for (int i = 1; i <= 32; ++i)
1153 unit->ModifyAuraState(AuraStateType(i), false);
1154 return true;
1155 }
1156
1157 unit->ModifyAuraState(AuraStateType(abs(state)), state > 0);
1158 return true;
1159 }
1160
1161 static bool HandleDebugSetValueCommand(ChatHandler* handler, char const* args)
1162 {
1163 if (!*args)
1164 return false;
1165
1166 char* x = strtok((char*)args, " ");
1167 char* y = strtok(NULL, " ");
1168 char* z = strtok(NULL, " ");
1169
1170 if (!x || !y)
1171 return false;
1172
1173 WorldObject* target = handler->getSelectedObject();
1174 if (!target)
1175 {
1177 handler->SetSentErrorMessage(true);
1178 return false;
1179 }
1180
1181 uint64 guid = target->GetGUID();
1182
1183 uint32 opcode = (uint32)atoi(x);
1184 if (opcode >= target->GetValuesCount())
1185 {
1186 handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, GUID_LOPART(guid), target->GetValuesCount());
1187 return false;
1188 }
1189
1190 bool isInt32 = true;
1191 if (z)
1192 isInt32 = (bool)atoi(z);
1193
1194 if (isInt32)
1195 {
1196 uint32 value = (uint32)atoi(y);
1197 target->SetUInt32Value(opcode, value);
1198 handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), opcode, value);
1199 }
1200 else
1201 {
1202 float value = (float)atof(y);
1203 target->SetFloatValue(opcode, value);
1204 handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value);
1205 }
1206
1207 return true;
1208 }
1209
1210 static bool HandleDebugGetValueCommand(ChatHandler* handler, char const* args)
1211 {
1212 if (!*args)
1213 return false;
1214
1215 char* x = strtok((char*)args, " ");
1216 char* z = strtok(NULL, " ");
1217
1218 if (!x)
1219 return false;
1220
1221 Unit* target = handler->getSelectedUnit();
1222 if (!target)
1223 {
1225 handler->SetSentErrorMessage(true);
1226 return false;
1227 }
1228
1229 uint64 guid = target->GetGUID();
1230
1231 uint32 opcode = (uint32)atoi(x);
1232 if (opcode >= target->GetValuesCount())
1233 {
1234 handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, GUID_LOPART(guid), target->GetValuesCount());
1235 return false;
1236 }
1237
1238 bool isInt32 = true;
1239 if (z)
1240 isInt32 = (bool)atoi(z);
1241
1242 if (isInt32)
1243 {
1244 uint32 value = target->GetUInt32Value(opcode);
1245 handler->PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), opcode, value);
1246 }
1247 else
1248 {
1249 float value = target->GetFloatValue(opcode);
1250 handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value);
1251 }
1252
1253 return true;
1254 }
1255
1256 static bool HandleDebugMod32ValueCommand(ChatHandler* handler, char const* args)
1257 {
1258 if (!*args)
1259 return false;
1260
1261 char* x = strtok((char*)args, " ");
1262 char* y = strtok(NULL, " ");
1263
1264 if (!x || !y)
1265 return false;
1266
1267 uint32 opcode = (uint32)atoi(x);
1268 int value = atoi(y);
1269
1270 if (opcode >= handler->GetSession()->GetPlayer()->GetValuesCount())
1271 {
1272 handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, handler->GetSession()->GetPlayer()->GetGUIDLow(), handler->GetSession()->GetPlayer()->GetValuesCount());
1273 return false;
1274 }
1275
1276 int currentValue = (int)handler->GetSession()->GetPlayer()->GetUInt32Value(opcode);
1277
1278 currentValue += value;
1279 handler->GetSession()->GetPlayer()->SetUInt32Value(opcode, (uint32)currentValue);
1280
1281 handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, opcode, currentValue);
1282
1283 return true;
1284 }
1285
1286 static bool HandleDebugUpdateCommand(ChatHandler* handler, char const* args)
1287 {
1288 if (!*args)
1289 return false;
1290
1291 uint32 updateIndex;
1292 uint32 value;
1293
1294 char* index = strtok((char*)args, " ");
1295
1296 Unit* unit = handler->getSelectedUnit();
1297 if (!unit)
1298 {
1300 handler->SetSentErrorMessage(true);
1301 return false;
1302 }
1303
1304 if (!index)
1305 return true;
1306
1307 updateIndex = atoi(index);
1308 //check updateIndex
1309 if (unit->GetTypeId() == TypeID::TYPEID_PLAYER)
1310 {
1311 if (updateIndex >= PLAYER_END)
1312 return true;
1313 }
1314 else if (updateIndex >= UNIT_END)
1315 return true;
1316
1317 char* val = strtok(NULL, " ");
1318 if (!val)
1319 {
1320 value = unit->GetUInt32Value(updateIndex);
1321
1322 handler->PSendSysMessage(LANG_UPDATE, unit->GetGUIDLow(), updateIndex, value);
1323 return true;
1324 }
1325
1326 value = atoi(val);
1327
1328 handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUIDLow(), updateIndex, value);
1329
1330 unit->SetUInt32Value(updateIndex, value);
1331
1332 return true;
1333 }
1334
1335 static bool HandleDebugSet32BitCommand(ChatHandler* handler, char const* args)
1336 {
1337 if (!*args)
1338 return false;
1339
1340 WorldObject* target = handler->getSelectedObject();
1341 if (!target)
1342 {
1344 handler->SetSentErrorMessage(true);
1345 return false;
1346 }
1347
1348 char* x = strtok((char*)args, " ");
1349 char* y = strtok(NULL, " ");
1350
1351 if (!x || !y)
1352 return false;
1353
1354 uint32 opcode = (uint32)atoi(x);
1355 uint32 val = (uint32)atoi(y);
1356 if (val > 32) //uint32 = 32 bits
1357 return false;
1358
1359 uint32 value = val ? 1 << (val - 1) : 0;
1360 target->SetUInt32Value(opcode, value);
1361
1362 handler->PSendSysMessage(LANG_SET_32BIT_FIELD, opcode, value);
1363 return true;
1364 }
1365
1366 static bool HandleDebugMoveflagsCommand(ChatHandler* handler, char const* args)
1367 {
1368 Unit* target = handler->getSelectedUnit();
1369 if (!target)
1370 target = handler->GetSession()->GetPlayer();
1371
1372 if (!*args)
1373 {
1376 }
1377 else
1378 {
1379 char* mask1 = strtok((char*)args, " ");
1380 if (!mask1)
1381 return false;
1382
1383 char* mask2 = strtok(NULL, " \n");
1384
1385 uint32 moveFlags = (uint32)atoi(mask1);
1386 target->SetUnitMovementFlags(moveFlags);
1387
1389
1390 if (mask2)
1391 {
1392 uint32 moveFlagsExtra = uint32(atoi(mask2));
1393 target->SetExtraUnitMovementFlags(moveFlagsExtra);
1394 }
1395
1396 if (target->GetTypeId() != TypeID::TYPEID_PLAYER)
1397 target->DestroyForNearbyPlayers(); // Force new SMSG_UPDATE_OBJECT:CreateObject
1398 else
1399 {
1401 target->WriteMovementInfo(data);
1402 target->SendMessageToSet(&data, true);
1403 }
1404
1406 }
1407
1408 return true;
1409 }
1410
1411 static char const* GetRestTypeName(RestType restType)
1412 {
1413 switch (restType)
1414 {
1415 case REST_TYPE_NO:
1416 return "none";
1418 return "tavern";
1419 case REST_TYPE_IN_CITY:
1420 return "city";
1421 default:
1422 return "unknown";
1423 }
1424 }
1425
1427 {
1429 bounds.MapId = player->GetInnPosMapId();
1430 bounds.X = player->GetInnPosX();
1431 bounds.Y = player->GetInnPosY();
1432 bounds.Z = player->GetInnPosZ();
1433 bounds.Radius = player->GetInnAreaRadius();
1434 bounds.BoxX = player->GetInnAreaBoxX();
1435 bounds.BoxY = player->GetInnAreaBoxY();
1436 bounds.BoxZ = player->GetInnAreaBoxZ();
1437 bounds.BoxOrientation = player->GetInnAreaBoxOrientation();
1438 return bounds;
1439 }
1440
1442 {
1444 bounds.MapId = restArea.MapId;
1445 bounds.X = restArea.X;
1446 bounds.Y = restArea.Y;
1447 bounds.Z = restArea.Z;
1448 bounds.Radius = restArea.Radius;
1449 bounds.BoxX = restArea.BoxX;
1450 bounds.BoxY = restArea.BoxY;
1451 bounds.BoxZ = restArea.BoxZ;
1452 bounds.BoxOrientation = restArea.BoxOrientation;
1453 return bounds;
1454 }
1455
1456 static bool HandleDebugRestCommand(ChatHandler* handler, char const* /*args*/)
1457 {
1458 Player* player = handler->GetSession()->GetPlayer();
1459
1461 RestType restType = player->GetRestType();
1462 Skyfire::Rest::InnAreaBounds storedBounds = BuildInnAreaBounds(player);
1463 bool hasStoredBounds = Skyfire::Rest::HasInnAreaBounds(storedBounds);
1464
1465 handler->PSendSysMessage("Rest state: flag=%s type=%u (%s) bonus=%.2f",
1466 resting ? "yes" : "no", uint32(restType), GetRestTypeName(restType), player->GetRestBonus());
1467 handler->PSendSysMessage("Position: map=%u zone=%u area=%u x=%.2f y=%.2f z=%.2f o=%.2f",
1468 player->GetMapId(), player->GetZoneId(), player->GetAreaId(),
1469 player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
1470
1471 std::string storedText = Skyfire::Rest::FormatInnAreaBounds(storedBounds);
1472 handler->PSendSysMessage("Stored inn: %s", storedText.c_str());
1473 handler->PSendSysMessage("Stored inn bounds: %s inside=%s",
1474 hasStoredBounds ? "yes" : "no",
1475 hasStoredBounds && player->IsInCurrentInnArea(1.0f) ? "yes" : "no");
1476
1477 TavernRestArea const* restArea = sObjectMgr->GetTavernRestAreaAtPosition(
1478 player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
1479
1480 if (!restArea)
1481 {
1482 handler->PSendSysMessage("Tavern override at position: none");
1483 return true;
1484 }
1485
1486 std::string overrideText = Skyfire::Rest::FormatInnAreaBounds(BuildInnAreaBounds(*restArea));
1487 handler->PSendSysMessage("Tavern override at position: trigger=%u %s", restArea->TriggerId, overrideText.c_str());
1488 return true;
1489 }
1490
1491 static bool HandleWPGPSCommand(ChatHandler* handler, char const* /*args*/)
1492 {
1493 Player* player = handler->GetSession()->GetPlayer();
1494
1495 SF_LOG_INFO("sql.dev", "(@PATH, XX, %.3f, %.3f, %.5f, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
1496
1497 handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
1498 return true;
1499 }
1500
1501 static bool HandleDebugTransportCommand(ChatHandler* handler, char const* args)
1502 {
1503 Transport* transport = handler->GetSession()->GetPlayer()->GetTransport();
1504 if (!transport)
1505 return false;
1506
1507 bool start = false;
1508 if (!stricmp(args, "stop"))
1509 transport->EnableMovement(false);
1510 else if (!stricmp(args, "start"))
1511 {
1512 transport->EnableMovement(true);
1513 start = true;
1514 }
1515 else
1516 {
1517 handler->PSendSysMessage("Transport %s is %s", transport->GetName().c_str(), transport->GetGoState() == GOState::GO_STATE_READY ? "stopped" : "moving");
1518 return true;
1519 }
1520
1521 handler->PSendSysMessage("Transport %s %s", transport->GetName().c_str(), start ? "started" : "stopped");
1522 return true;
1523 }
1524};
1525
1527{
1528 new debug_commandscript();
1529}
#define sBattlegroundMgr
DBCStorage< MovieEntry > sMovieStore(MovieEntryfmt)
DBCStorage< VehicleEntry > sVehicleStore(VehicleEntryfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define SIZEFMTD
Definition Define.h:70
std::int8_t int8
Definition Define.h:75
#define OVERRIDE
Definition Define.h:60
std::uint64_t uint64
Definition Define.h:76
std::uint16_t uint16
Definition Define.h:78
@ GO_STATE_READY
Definition GameObject.h:577
#define MAXGROUPSIZE
Definition Group.h:29
#define MAXRAIDSIZE
Definition Group.h:30
BuyResult
Definition Item.h:125
InventoryResult
Definition Item.h:27
ItemUpdateState
Definition Item.h:190
@ ITEM_CHANGED
Definition Item.h:192
@ ITEM_REMOVED
Definition Item.h:194
@ ITEM_NEW
Definition Item.h:193
@ ITEM_UNCHANGED
Definition Item.h:191
SellResult
Definition Item.h:138
#define sLFGMgr
Definition LFGMgr.h:518
@ LANG_UPDATE_CHANGE
Definition Language.h:565
@ LANG_CHANGE_32BIT_FIELD
Definition Language.h:578
@ LANG_DEBUG_AREATRIGGER_ON
Definition Language.h:952
@ LANG_CINEMATIC_NOT_EXIST
Definition Language.h:950
@ LANG_MOVEFLAGS_GET
Definition Language.h:933
@ LANG_UPDATE
Definition Language.h:564
@ LANG_TOO_BIG_INDEX
Definition Language.h:566
@ LANG_SET_UINT_FIELD
Definition Language.h:568
@ LANG_YOU_HEAR_SOUND
Definition Language.h:166
@ LANG_MOVEFLAGS_SET
Definition Language.h:934
@ LANG_SELECT_CHAR_OR_CREATURE
Definition Language.h:12
@ LANG_MOVIE_NOT_EXIST
Definition Language.h:951
@ LANG_SOUND_NOT_EXIST
Definition Language.h:180
@ LANG_GET_UINT_FIELD
Definition Language.h:572
@ LANG_BAD_VALUE
Definition Language.h:117
@ LANG_SET_32BIT_FIELD
Definition Language.h:576
@ LANG_SET_FLOAT_FIELD
Definition Language.h:570
@ LANG_GET_FLOAT_FIELD
Definition Language.h:574
@ LANG_DEBUG_AREATRIGGER_OFF
Definition Language.h:953
#define SF_LOG_INFO(filterType__,...)
Definition Log.h:137
@ TYPEID_PLAYER
Definition Object.h:55
#define sObjectAccessor
uint32 GUID_LOPART(uint64 x)
@ HIGHGUID_ITEM
@ HIGHGUID_VEHICLE
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
#define sObjectMgr
Definition ObjectMgr.h:1617
@ PLAYER_FLAGS_RESTING
Definition Player.h:542
@ BUYBACK_SLOT_END
Definition Player.h:739
@ BUYBACK_SLOT_START
Definition Player.h:738
#define INVENTORY_SLOT_BAG_0
Definition Player.h:684
@ PLAYER_SLOT_START
Definition Player.h:678
@ PLAYER_SLOT_END
Definition Player.h:680
RestType
Definition Player.h:821
@ REST_TYPE_NO
Definition Player.h:822
@ REST_TYPE_IN_CITY
Definition Player.h:824
@ REST_TYPE_IN_TAVERN
Definition Player.h:823
QuestFailedReason
Definition QuestDef.h:34
#define sScriptMgr
Definition ScriptMgr.h:764
ChatMsg
AuraStateType
#define SF_SHARED_GUARD
Definition SharedMutex.h:17
@ UNIT_END
@ PLAYER_FIELD_PLAYER_FLAGS
@ PLAYER_END
Definition Bag.h:16
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
Class for manage Strand of Ancient battleground.
bool DebugStartBoats(Player *player)
bool DebugStopBoats(Player *player)
std::string GetBoatDebugStatus()
Unit * getSelectedUnit()
Definition Chat.cpp:841
Player * getSelectedPlayer()
Definition Chat.cpp:829
WorldSession * GetSession()
Definition Chat.h:43
Creature * getSelectedCreature()
Definition Chat.cpp:865
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
Definition Chat.cpp:221
static size_t BuildChatPacket(WorldPacket &data, ChatMsg chatType, Language language, ObjectGuid senderGUID, ObjectGuid receiverGUID, std::string const &message, uint8 chatTag, std::string const &senderName="", std::string const &receiverName="", uint32 achievementId=0, bool gmMessage=false, std::string const &channelName="", std::string const &addonPrefix="")
Definition Chat.cpp:580
void SetSentErrorMessage(bool val)
Definition Chat.h:114
WorldObject * getSelectedObject()
Definition Chat.cpp:852
virtual void SendSysMessage(const char *str)
Definition Chat.cpp:153
CommandScript(const char *name)
uint32 GetDBTableGUIDLow() const
Definition Creature.h:445
bool hasLootRecipient() const
Definition Creature.h:549
Player * GetLootRecipient() const
Definition Creature.cpp:879
bool Create(uint32 guidlow, Map *map, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData *data=NULL)
Definition Creature.cpp:740
GOState GetGoState() const
Definition GameObject.h:717
Definition Group.h:147
MemberSlotList const & GetMemberSlots() const
Definition Group.h:224
std::list< MemberSlot > MemberSlotList
Definition Group.h:159
void SendUpdate()
Definition Group.cpp:1594
void ConvertToRaid()
Definition Group.cpp:229
uint32 GetMembersCount() const
Definition Group.h:227
void SetMemberRole(uint64 guid, uint32 role)
Definition Group.cpp:2822
void ConvertToGroup()
Definition Group.cpp:253
bool IsLeader(uint64 guid) const
Definition Group.cpp:2608
bool isRaidGroup() const
Definition Group.cpp:2548
static SF_SHARED_MUTEX * GetLock()
UNORDERED_MAP< uint64, T * > MapType
HostileReference * getFirst()
HostileReference * next()
float getThreat() const
Definition Item.h:202
uint8 GetSlot() const
Definition Item.h:265
Bag * GetContainer()
Definition Item.h:266
Bag * ToBag()
Definition Item.h:240
ItemTemplate const * GetTemplate() const
Definition Item.cpp:528
ItemUpdateState GetState() const
Definition Item.h:305
uint16 GetQueuePos() const
Definition Item.h:310
uint64 GetOwnerGUID() const
Definition Item.h:213
uint8 GetBagSlot() const
Definition Item.cpp:734
bool IsInUpdateQueue() const
Definition Item.h:309
Definition Map.h:238
bool AddToMap(T *)
Definition Map.cpp:504
uint64 GetGUID() const
Definition Object.h:119
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:325
uint32 GetGUIDLow() const
Definition Object.h:120
TypeID GetTypeId() const
Definition Object.h:131
float GetFloatValue(uint16 index) const
Definition Object.cpp:337
Creature * ToCreature()
Definition Object.h:207
void SetFloatValue(uint16 index, float value)
Definition Object.cpp:1141
bool HasFlag(uint16 index, uint32 flag) const
Definition Object.cpp:1309
void SetUInt32Value(uint16 index, uint32 value)
Definition Object.cpp:1038
uint16 GetValuesCount() const
Definition Object.h:191
float GetInnPosZ() const
Definition Player.h:1461
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=NULL, uint32 itemid=0)
uint32 GetTeam() const
Definition Player.h:2527
void SendCinematicStart(uint32 CinematicSequenceId)
Definition Player.cpp:6960
float GetInnAreaBoxOrientation() const
Definition Player.h:1481
void SendCanTakeQuestResponse(QuestFailedReason msg) const
void SendSellResponse(SellResult msg, ObjectGuid VendorGUID, ObjectGuid ItemGUID)
Definition Player.cpp:10749
void SendUpdateWorldState(uint32 Field, uint32 Value)
Definition Player.cpp:9734
Item * GetItemByGuid(uint64 guid) const
Item * GetItemByPos(uint16 pos) const
float GetInnPosX() const
Definition Player.h:1453
void DestroyItem(uint8 bag, uint8 slot, bool update)
Battleground * GetBattleground() const
Definition Player.cpp:19212
Group * GetGroup()
Definition Player.h:2972
float GetInnAreaRadius() const
Definition Player.h:1465
void SendMovieStart(uint32 MovieId)
Definition Player.cpp:6989
void SendPushToPartyResponse(Player *player, uint8 msg)
std::vector< Item * > & GetItemUpdateQueue()
Definition Player.h:1527
float GetInnAreaBoxY() const
Definition Player.h:1473
float GetInnAreaBoxZ() const
Definition Player.h:1477
float GetInnAreaBoxX() const
Definition Player.h:1469
bool IsInCurrentInnArea(float padding=0.0f) const
Definition Player.cpp:1810
void SendBuyFailed(BuyResult msg, ObjectGuid VendorGUID, uint32 item)
Definition Player.cpp:10736
float GetRestBonus() const
Definition Player.h:1434
bool isDebugAreaTriggers
Definition Player.h:3142
float GetInnPosY() const
Definition Player.h:1457
RestType GetRestType() const
Definition Player.h:1440
uint32 GetInnPosMapId() const
Definition Player.h:1449
FROM * GetSource() const
Definition Reference.h:83
std::list< HostileReference * > StorageType
ThreatContainer::StorageType const & getThreatList() const
Unit * GetOwner() const
void EnableMovement(bool enabled)
Definition Unit.h:1367
void EnterVehicle(Unit *base, int8 seatId=-1)
Definition Unit.cpp:8234
bool IsVehicle() const
Definition Unit.h:1523
uint32 GetUnitMovementFlags() const
Definition Unit.h:2632
bool SetPhased(uint32 id, bool update, bool apply) OVERRIDE
Definition Unit.cpp:7516
void WriteMovementInfo(WorldPacket &data, Movement::ExtraMovementStatusElement *extras=NULL)
Definition Unit.cpp:8407
bool IsPet() const
Definition Unit.h:1511
void SetUnitMovementFlags(uint32 f)
Definition Unit.h:2636
void SetExtraUnitMovementFlags(uint16 f)
Definition Unit.h:2657
uint64 GetTarget() const
Definition Unit.h:2830
void ModifyAuraState(AuraStateType flag, bool apply)
uint16 GetExtraUnitMovementFlags() const
Definition Unit.h:2653
HostileRefManager & getHostileRefManager()
Definition Unit.h:2466
ThreatManager & getThreatManager()
Definition Unit.h:2455
void HandleEmoteCommand(uint32 anim_id)
bool IsTotem() const
Definition Unit.h:1519
uint32 GetMapId() const
Definition Object.h:546
Map * GetMap() const
Definition Object.h:740
bool IsWithinLOSInMap(WorldObject const *obj) const
Definition Object.cpp:1656
std::set< uint32 > const & GetPhases() const
Definition Object.h:647
std::string const & GetName() const
Definition Object.h:664
void VisitNearbyObject(float const &radius, NOTIFIER &notifier) const
Definition Object.h:782
void DestroyForNearbyPlayers()
Definition Object.cpp:3453
Transport * GetTransport() const
Definition Object.h:797
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float angle=0) const
Definition Object.cpp:3070
void PlayDistanceSound(uint32 sound_id, Player *target)
Definition Object.cpp:3417
uint32 GetAreaId() const
Definition Object.cpp:1602
uint32 GetZoneId() const
Definition Object.cpp:1597
virtual void SendMessageToSet(WorldPacket *data, bool self)
Definition Object.cpp:2485
float GetObjectSize() const
Definition Object.cpp:3100
void PlayDirectSound(uint32 sound_id, Player *target=NULL)
Definition Object.cpp:3442
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition Object.cpp:2703
Player session in the World.
Player * GetPlayer() const
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void SendSetPhaseShift(std::set< uint32 > const &phaseIds, std::set< uint32 > const &terrainswaps, std::set< uint32 > const &worldAreas)
static Skyfire::Rest::InnAreaBounds BuildInnAreaBounds(TavernRestArea const &restArea)
static bool HandleDebugTransportCommand(ChatHandler *handler, char const *args)
static bool HandleDebugLoSCommand(ChatHandler *handler, char const *)
static bool HandleDebugSendChatMsgCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:531
static bool HandleDebugSendChannelNotifyCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:513
static bool HandleDebugLfgGroupCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:244
static bool HandleDebugGetItemValueCommand(ChatHandler *handler, char const *args)
static bool HandleDebugPlayCinematicCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:333
static bool HandleDebugSetVehicleIdCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:896
static bool HandleWPGPSCommand(ChatHandler *handler, char const *)
std::vector< ChatCommand > GetCommands() const OVERRIDE
Definition cs_debug.cpp:37
static bool HandleDebugAreaTriggersCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:496
static bool HandleDebugHostileRefListCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:875
static bool HandleDebugLfgRequirementsCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:185
static bool HandleDebugEnterVehicleCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:915
static bool HandleDebugSendSpellFailCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:419
static bool HandleBoatStopCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:158
static bool HandleDebugSendSellErrorCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:462
static Skyfire::Rest::InnAreaBounds BuildInnAreaBounds(Player const *player)
static bool HandleDebugPlayMovieCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:357
static bool HandleDebugPlaySoundCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:382
static bool HandleDebugGetLootRecipientCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:551
static bool HandleDebugSetAuraStateCommand(ChatHandler *handler, char const *args)
static bool HandleDebugSendLargePacketCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:999
static bool HandleDebugAnimCommand(ChatHandler *handler, char const *args)
static bool HandleDebugThreatListCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:853
static BattlegroundSA * GetSOTABattlegroundForBoatCommand(ChatHandler *handler)
Definition cs_debug.cpp:110
static void RefreshLfgLockInfoForOnlinePlayers()
Definition cs_debug.cpp:176
static bool HandleDebugGetItemStateCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:570
static bool HandleDebugRestCommand(ChatHandler *handler, char const *)
static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:563
static char const * GetRestTypeName(RestType restType)
static bool HandleDebugSetItemValueCommand(ChatHandler *handler, char const *args)
static bool HandleDebugMoveflagsCommand(ChatHandler *handler, char const *args)
static bool HandleDebugSendEquipErrorCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:452
static bool HandleDebugUpdateWorldStateCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:482
static bool HandleDebugSet32BitCommand(ChatHandler *handler, char const *args)
static bool HandleDebugSetValueCommand(ChatHandler *handler, char const *args)
static bool HandleDebugMod32ValueCommand(ChatHandler *handler, char const *args)
static bool HandleDebugSendBuyErrorCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:472
static bool HandleDebugSendSetPhaseShiftCommand(ChatHandler *handler, char const *args)
static bool HandleDebugLfgFlexCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:216
static bool HandleDebugItemExpireCommand(ChatHandler *handler, char const *args)
static bool HandleDebugBattlegroundCommand(ChatHandler *, char const *)
Definition cs_debug.cpp:841
static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:544
static bool HandleBoatStartCommand(ChatHandler *handler, char const *)
Definition cs_debug.cpp:139
static bool HandleDebugGetValueCommand(ChatHandler *handler, char const *args)
static bool HandleDebugArenaCommand(ChatHandler *, char const *)
Definition cs_debug.cpp:847
static bool HandleDebugUpdateCommand(ChatHandler *handler, char const *args)
static bool HandleDebugSpawnVehicleCommand(ChatHandler *handler, char const *args)
Definition cs_debug.cpp:950
void AddSC_debug_commandscript()
@ SMSG_CHANNEL_NOTIFY
Definition Opcodes.h:602
@ SMSG_CAST_FAILED
Definition Opcodes.h:595
@ SMSG_PLAYER_MOVE
Definition Opcodes.h:878
std::string FormatInnAreaBounds(InnAreaBounds const &bounds)
bool HasInnAreaBounds(InnAreaBounds const &bounds)
@ PLAYER_ROLE_DAMAGE
Definition LFG.h:27
@ RBAC_PERM_COMMAND_DEBUG_SETVID
Definition RBAC.h:223
@ RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS
Definition RBAC.h:202
@ RBAC_PERM_COMMAND_DEBUG_BG
Definition RBAC.h:192
@ RBAC_PERM_COMMAND_DEBUG_SETAURASTATE
Definition RBAC.h:219
@ RBAC_PERM_COMMAND_DEBUG_SEND_CHATMESSAGE
Definition RBAC.h:210
@ RBAC_PERM_COMMAND_DEBUG_SETBIT
Definition RBAC.h:220
@ RBAC_PERM_COMMAND_DEBUG_UPDATE
Definition RBAC.h:226
@ RBAC_PERM_COMMAND_DEBUG_SEND_CHANNELNOTIFY
Definition RBAC.h:209
@ RBAC_PERM_COMMAND_DEBUG_LOS
Definition RBAC.h:200
@ RBAC_PERM_COMMAND_DEBUG_GETITEMVALUE
Definition RBAC.h:195
@ RBAC_PERM_COMMAND_DEBUG_AREATRIGGERS
Definition RBAC.h:190
@ RBAC_PERM_COMMAND_DEBUG_MOD32VALUE
Definition RBAC.h:201
@ RBAC_PERM_COMMAND_DEBUG_LFG_REQUIREMENTS
Definition RBAC.h:709
@ RBAC_PERM_COMMAND_DEBUG_SEND_QPARTYMSG
Definition RBAC.h:215
@ RBAC_PERM_COMMAND_DEBUG_SEND_LARGEPACKET
Definition RBAC.h:212
@ RBAC_PERM_COMMAND_DEBUG_PLAY_MOVIE
Definition RBAC.h:205
@ RBAC_PERM_COMMAND_DEBUG_GETITEMSTATE
Definition RBAC.h:194
@ RBAC_PERM_COMMAND_DEBUG_SETVALUE
Definition RBAC.h:222
@ RBAC_PERM_COMMAND_DEBUG_LFG_FLEX
Definition RBAC.h:710
@ RBAC_PERM_COMMAND_DEBUG_TRANSPORT
Definition RBAC.h:288
@ RBAC_PERM_COMMAND_DEBUG_ITEMEXPIRE
Definition RBAC.h:198
@ RBAC_PERM_COMMAND_WPGPS
Definition RBAC.h:228
@ RBAC_PERM_COMMAND_DEBUG_PLAY_SOUND
Definition RBAC.h:206
@ RBAC_PERM_COMMAND_DEBUG_SPAWNVEHICLE
Definition RBAC.h:224
@ RBAC_PERM_COMMAND_DEBUG_REST
Definition RBAC.h:696
@ RBAC_PERM_COMMAND_DEBUG_SEND_SETPHASESHIFT
Definition RBAC.h:217
@ RBAC_PERM_COMMAND_DEBUG_ARENA
Definition RBAC.h:191
@ RBAC_PERM_COMMAND_DEBUG_UWS
Definition RBAC.h:227
@ RBAC_PERM_COMMAND_DEBUG_SEND_QINVALIDMSG
Definition RBAC.h:214
@ RBAC_PERM_COMMAND_DEBUG_SEND
Definition RBAC.h:207
@ RBAC_PERM_COMMAND_DEBUG_THREAT
Definition RBAC.h:225
@ RBAC_PERM_COMMAND_DEBUG_SEND_EQUIPERROR
Definition RBAC.h:211
@ RBAC_PERM_COMMAND_DEBUG_SEND_SPELLFAIL
Definition RBAC.h:218
@ RBAC_PERM_COMMAND_DEBUG_HOSTIL
Definition RBAC.h:197
@ RBAC_PERM_COMMAND_DEBUG_GETVALUE
Definition RBAC.h:196
@ RBAC_PERM_COMMAND_DEBUG_ENTERVEHICLE
Definition RBAC.h:193
@ RBAC_PERM_COMMAND_DEBUG_PLAY_CINEMATIC
Definition RBAC.h:204
@ RBAC_PERM_COMMAND_DEBUG_LOOTRECIPIENT
Definition RBAC.h:199
@ RBAC_PERM_COMMAND_DEBUG_ANIM
Definition RBAC.h:189
@ RBAC_PERM_COMMAND_DEBUG_SEND_BUYERROR
Definition RBAC.h:208
@ RBAC_PERM_COMMAND_DEBUG_SETITEMVALUE
Definition RBAC.h:221
@ RBAC_PERM_COMMAND_DEBUG
Definition RBAC.h:188
@ RBAC_PERM_COMMAND_DEBUG_SEND_SELLERROR
Definition RBAC.h:216
@ RBAC_PERM_COMMAND_DEBUG_PLAY
Definition RBAC.h:203
float GetPositionZ() const
Definition Object.h:330
float GetOrientation() const
Definition Object.h:331
float GetPositionX() const
Definition Object.h:328
float GetPositionY() const
Definition Object.h:329
float BoxOrientation
Definition ObjectMgr.h:148
uint32 TriggerId
Definition ObjectMgr.h:139