OregonCore  revision fb2a440-git
Your Favourite TBC server
Debugcmds.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "Common.h"
19 #include "Database/DatabaseEnv.h"
20 #include "WorldPacket.h"
21 #include "WorldSession.h"
22 #include "World.h"
23 #include "Player.h"
24 #include "Opcodes.h"
25 #include "Chat.h"
26 #include "Log.h"
27 #include "Unit.h"
28 #include "ObjectAccessor.h"
29 #include "GossipDef.h"
30 #include "Language.h"
31 #include "MapManager.h"
32 #include "BattlegroundMgr.h"
33 #include <fstream>
34 #include "ObjectMgr.h"
35 #include "InstanceData.h"
36 #include "M2Stores.h"
37 
38 bool ChatHandler::HandleDebugInArcCommand(const char* /*args*/)
39 {
40  Object* obj = getSelectedUnit();
41 
42  if (!obj)
43  {
45  return true;
46  }
47 
49 
50  return true;
51 }
52 
54 {
55  if (!args)
56  return false;
57 
58  char* px = strtok((char*)args, " ");
59  if (!px)
60  return false;
61 
62  uint8 failnum = (uint8)atoi(px);
63 
65  data << uint32(133);
66  data << uint8(failnum);
67  m_session->SendPacket(&data);
68 
69  return true;
70 }
71 
72 bool ChatHandler::HandleSetPoiCommand(const char* args)
73 {
74  Player* pPlayer = m_session->GetPlayer();
75  Unit* target = getSelectedUnit();
76  if (!target)
77  {
79  return true;
80  }
81 
82  if (!args)
83  return false;
84 
85  char* icon_text = strtok((char*)args, " ");
86  char* flags_text = strtok(NULL, " ");
87  if (!icon_text || !flags_text)
88  return false;
89 
90  uint32 icon = atol(icon_text);
91  uint32 flags = atol(flags_text);
92 
93  sLog.outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon, flags);
94  pPlayer->PlayerTalkClass->SendPointOfInterest(target->GetPositionX(), target->GetPositionY(), Poi_Icon(icon), flags, 30, "Test POI");
95  return true;
96 }
97 
99 {
100  if (!args)
101  return false;
102 
103  uint8 msg = atoi(args);
104  m_session->GetPlayer()->SendEquipError(msg, 0, 0);
105  return true;
106 }
107 
109 {
110  if (!args)
111  return false;
112 
113  uint8 msg = atoi(args);
114  m_session->GetPlayer()->SendSellError(msg, 0, 0, 0);
115  return true;
116 }
117 
119 {
120  if (!args)
121  return false;
122 
123  uint8 msg = atoi(args);
124  m_session->GetPlayer()->SendBuyError(msg, 0, 0, 0);
125  return true;
126 }
127 
128 bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
129 {
130  Unit* unit = getSelectedUnit();
131  Player* player = NULL;
132  if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
133  player = m_session->GetPlayer();
134  else
135  player = unit->ToPlayer();
136  if (!unit) unit = player;
137 
138  std::ifstream ifs("opcode.txt");
139  if (ifs.bad())
140  return false;
141 
142  uint32 opcode;
143  ifs >> opcode;
144 
145  WorldPacket data(opcode, 0);
146 
147  while (!ifs.eof())
148  {
149  std::string type;
150  ifs >> type;
151 
152  if (type == "")
153  break;
154 
155  if (type == "uint8")
156  {
157  uint16 val1;
158  ifs >> val1;
159  data << uint8(val1);
160  }
161  else if (type == "uint16")
162  {
163  uint16 val2;
164  ifs >> val2;
165  data << val2;
166  }
167  else if (type == "uint32")
168  {
169  uint32 val3;
170  ifs >> val3;
171  data << val3;
172  }
173  else if (type == "uint64")
174  {
175  uint64 val4;
176  ifs >> val4;
177  data << val4;
178  }
179  else if (type == "float")
180  {
181  float val5;
182  ifs >> val5;
183  data << val5;
184  }
185  else if (type == "string")
186  {
187  std::string val6;
188  ifs >> val6;
189  data << val6;
190  }
191  else if (type == "pguid")
192  data << unit->GetPackGUID();
193  else if (type == "myguid")
194  data << player->GetPackGUID();
195  else if (type == "pos")
196  {
197  data << unit->GetPositionX();
198  data << unit->GetPositionY();
199  data << unit->GetPositionZ();
200  }
201  else if (type == "mypos")
202  {
203  data << player->GetPositionX();
204  data << player->GetPositionY();
205  data << player->GetPositionZ();
206  }
207  else
208  {
209  sLog.outDebug("Sending opcode: unknown type '%s'", type.c_str());
210  break;
211  }
212  }
213  ifs.close();
214  sLog.outDebug("Sending opcode %u", data.GetOpcode());
215  if (sLog.IsOutDebug())
216  data.hexlike();
217  unit->ToPlayer()->GetSession()->SendPacket(&data);
219  return true;
220 }
221 
223 {
224  char* w = strtok((char*)args, " ");
225  char* s = strtok(NULL, " ");
226 
227  if (!w || !s)
228  return false;
229 
230  uint32 world = (uint32)atoi(w);
231  uint32 state = (uint32)atoi(s);
232  m_session->GetPlayer()->SendUpdateWorldState(world, state);
233  return true;
234 }
235 
237 {
238  // USAGE: .debug play cinematic #cinematicid
239  // #cinematicid - ID decimal number from CinemaicSequences.dbc (1st column)
240  if (!*args)
241  {
243  SetSentErrorMessage(true);
244  return false;
245  }
246 
247  uint32 dwId = atoi((char*)args);
248 
249  if (!sCinematicSequencesStore.LookupEntry(dwId))
250  {
252  SetSentErrorMessage(true);
253  return false;
254  }
255 
256  // Dump camera locations
257  if (CinematicSequencesEntry const* cineSeq = sCinematicSequencesStore.LookupEntry(dwId))
258  {
259  std::unordered_map<uint32, FlyByCameraCollection>::const_iterator itr = sFlyByCameraStore.find(cineSeq->cinematicCamera);
260  if (itr != sFlyByCameraStore.end())
261  {
262  PSendSysMessage("Waypoints for sequence %u, camera %u", dwId, cineSeq->cinematicCamera);
263  uint32 count = 1;
264  for (FlyByCamera cam : itr->second)
265  {
266  PSendSysMessage("%02u - %7ums [%f, %f, %f] Facing %f (%f degrees)", count, cam.timeStamp, cam.locations.x, cam.locations.y, cam.locations.z, cam.locations.w, cam.locations.w * (180 / M_PI));
267  count++;
268  }
269  PSendSysMessage("%u waypoints dumped", itr->second.size());
270  }
271  }
272 
274  return true;
275 }
276 
277 //Play sound
279 {
280  // USAGE: .debug playsound #soundid
281  // #soundid - ID decimal number from SoundEntries.dbc (1st column)
282  if (!*args)
283  {
285  SetSentErrorMessage(true);
286  return false;
287  }
288 
289  uint32 dwSoundId = atoi((char*)args);
290 
291  if (!sSoundEntriesStore.LookupEntry(dwSoundId))
292  {
294  SetSentErrorMessage(true);
295  return false;
296  }
297 
298  Unit* unit = getSelectedUnit();
299  if (!unit)
300  {
302  SetSentErrorMessage(true);
303  return false;
304  }
305 
306  if (m_session->GetPlayer()->GetSelection())
307  unit->PlayDistanceSound(dwSoundId, m_session->GetPlayer());
308  else
309  unit->PlayDirectSound(dwSoundId, m_session->GetPlayer());
310 
312  return true;
313 }
314 
315 //Send notification in channel
317 {
318  if (!args)
319  return false;
320 
321  const char* name = "test";
322  uint8 code = atoi(args);
323 
324  WorldPacket data(SMSG_CHANNEL_NOTIFY, (1 + 10));
325  data << code; // notify type
326  data << name; // channel name
327  data << uint32(0);
328  data << uint32(0);
329  m_session->SendPacket(&data);
330  return true;
331 }
332 
333 //Send notification in chat
335 {
336  if (!args)
337  return false;
338 
339  const char* msg = "testtest";
340  uint8 type = atoi(args);
341  WorldPacket data;
342  ChatHandler::FillMessageData(&data, m_session, type, 0, "chan", m_session->GetPlayer()->GetGUID(), msg, m_session->GetPlayer());
343  m_session->SendPacket(&data);
344  return true;
345 }
346 
348 {
349  uint32 msg = atol((char*)args);
351  return true;
352 }
353 
354 bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
355 {
356  Creature* target = getSelectedCreature();
357  if (!target)
358  return false;
359 
360  PSendSysMessage("loot recipient: %s", target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName() : "offline") : "no loot recipient");
361  return true;
362 }
363 
365 {
366  uint32 msg = atol((char*)args);
368  return true;
369 }
370 
371 bool ChatHandler::HandleGetItemState(const char* args)
372 {
373  if (!args)
374  return false;
375 
376  std::string state_str = args;
377 
379  bool list_queue = false, check_all = false;
380  if (state_str == "unchanged") state = ITEM_UNCHANGED;
381  else if (state_str == "changed") state = ITEM_CHANGED;
382  else if (state_str == "new") state = ITEM_NEW;
383  else if (state_str == "removed") state = ITEM_REMOVED;
384  else if (state_str == "queue") list_queue = true;
385  else if (state_str == "check_all") check_all = true;
386  else return false;
387 
388  Player* player = getSelectedPlayer();
389  if (!player) player = m_session->GetPlayer();
390 
391  if (!list_queue && !check_all)
392  {
393  state_str = "The player has the following " + state_str + " items: ";
394  SendSysMessage(state_str.c_str());
395  for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; i++)
396  {
397  if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
398  continue;
399 
400  Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
401  if (!item) continue;
402  if (!item->IsBag())
403  {
404  if (item->GetState() == state)
405  PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()));
406  }
407  else
408  {
409  Bag* bag = (Bag*)item;
410  for (uint8 j = 0; j < bag->GetBagSize(); ++j)
411  {
412  Item* item = bag->GetItemByPos(j);
413  if (item && item->GetState() == state)
414  PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()));
415  }
416  }
417  }
418  }
419 
420  if (list_queue)
421  {
422  std::vector<Item* >& updateQueue = player->GetItemUpdateQueue();
423  for (size_t i = 0; i < updateQueue.size(); i++)
424  {
425  Item* item = updateQueue[i];
426  if (!item) continue;
427 
428  Bag* container = item->GetContainer();
429  uint8 bag_slot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0);
430 
431  std::string st;
432  switch (item->GetState())
433  {
434  case ITEM_UNCHANGED:
435  st = "unchanged";
436  break;
437  case ITEM_CHANGED:
438  st = "changed";
439  break;
440  case ITEM_NEW:
441  st = "new";
442  break;
443  case ITEM_REMOVED:
444  st = "removed";
445  break;
446  }
447 
448  PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bag_slot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
449  }
450  if (updateQueue.empty())
451  PSendSysMessage("updatequeue empty");
452  }
453 
454  if (check_all)
455  {
456  bool error = false;
457  std::vector<Item* >& updateQueue = player->GetItemUpdateQueue();
458  for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; i++)
459  {
460  if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
461  continue;
462 
463  Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
464  if (!item) continue;
465 
466  if (item->GetSlot() != i)
467  {
468  PSendSysMessage("item at slot %d, guid %d has an incorrect slot value: %d", i, item->GetGUIDLow(), item->GetSlot());
469  error = true;
470  continue;
471  }
472 
473  if (item->GetOwnerGUID() != player->GetGUID())
474  {
475  PSendSysMessage("for the item at slot %d and itemguid %d, owner's guid (%d) and player's guid (%d) don't match!", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
476  error = true;
477  continue;
478  }
479 
480  if (Bag* container = item->GetContainer())
481  {
482  PSendSysMessage("item at slot: %d guid: %d has a container (slot: %d, guid: %d) but shouldnt!", item->GetSlot(), item->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
483  error = true;
484  continue;
485  }
486 
487  if (item->IsInUpdateQueue())
488  {
489  uint16 qp = item->GetQueuePos();
490  if (qp > updateQueue.size())
491  {
492  PSendSysMessage("item at slot: %d guid: %d has a queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUIDLow(), qp);
493  error = true;
494  continue;
495  }
496 
497  if (updateQueue[qp] == NULL)
498  {
499  PSendSysMessage("item at slot: %d guid: %d has a queuepos (%d) that points to NULL in the queue!", item->GetSlot(), item->GetGUIDLow(), qp);
500  error = true;
501  continue;
502  }
503 
504  if (updateQueue[qp] != item)
505  {
506  PSendSysMessage("item at slot: %d guid: %d has 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());
507  error = true;
508  continue;
509  }
510  }
511  else if (item->GetState() != ITEM_UNCHANGED)
512  {
513  PSendSysMessage("item at slot: %d guid: %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUIDLow(), item->GetState());
514  error = true;
515  continue;
516  }
517 
518  if (item->IsBag())
519  {
520  Bag* bag = (Bag*)item;
521  for (uint8 j = 0; j < bag->GetBagSize(); ++j)
522  {
523  Item* item = bag->GetItemByPos(j);
524  if (!item) continue;
525 
526  if (item->GetSlot() != j)
527  {
528  PSendSysMessage("the item in bag %d slot %d, guid %d has an incorrect slot value: %d", bag->GetSlot(), j, item->GetGUIDLow(), item->GetSlot());
529  error = true;
530  continue;
531  }
532 
533  if (item->GetOwnerGUID() != player->GetGUID())
534  {
535  PSendSysMessage("for the item in bag %d at slot %d and itemguid %d, owner's guid (%d) and player's guid (%d) don't match!", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
536  error = true;
537  continue;
538  }
539 
540  Bag* container = item->GetContainer();
541  if (!container)
542  {
543  PSendSysMessage("the item in bag %d at slot %d with guid %d has no container!", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow());
544  error = true;
545  continue;
546  }
547 
548  if (container != bag)
549  {
550  PSendSysMessage("the item in bag %d at slot %d with guid %d has a different container(slot %d guid %d)!", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
551  error = true;
552  continue;
553  }
554 
555  if (item->IsInUpdateQueue())
556  {
557  uint16 qp = item->GetQueuePos();
558  if (qp > updateQueue.size())
559  {
560  PSendSysMessage("item in bag: %d at slot: %d guid: %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), qp);
561  error = true;
562  continue;
563  }
564 
565  if (updateQueue[qp] == NULL)
566  {
567  PSendSysMessage("item in bag: %d at slot: %d guid: %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), qp);
568  error = true;
569  continue;
570  }
571 
572  if (updateQueue[qp] != item)
573  {
574  PSendSysMessage("item in bag: %d at slot: %d guid: %d has has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
575  error = true;
576  continue;
577  }
578  }
579  else if (item->GetState() != ITEM_UNCHANGED)
580  {
581  PSendSysMessage("item in bag: %d at slot: %d guid: %d is not in queue but should be (state: %d)!", bag->GetSlot(), item->GetSlot(), item->GetGUIDLow(), item->GetState());
582  error = true;
583  continue;
584  }
585  }
586  }
587  }
588 
589  for (size_t i = 0; i < updateQueue.size(); i++)
590  {
591  Item* item = updateQueue[i];
592  if (!item) continue;
593 
594  if (item->GetOwnerGUID() != player->GetGUID())
595  {
596  PSendSysMessage("queue(%lu): for the an item (guid %d), the owner's guid (%d) and player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
597  error = true;
598  continue;
599  }
600 
601  if (item->GetQueuePos() != i)
602  {
603  PSendSysMessage("queue(%lu): for the an item (guid %d), the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
604  error = true;
605  continue;
606  }
607 
608  if (item->GetState() == ITEM_REMOVED) continue;
609  Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
610 
611  if (test == NULL)
612  {
613  PSendSysMessage("queue(%lu): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have an item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
614  error = true;
615  continue;
616  }
617 
618  if (test != item)
619  {
620  PSendSysMessage("queue(%lu): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the item with guid %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
621  error = true;
622  continue;
623  }
624  }
625  if (!error)
626  SendSysMessage("All OK!");
627  }
628 
629  return true;
630 }
631 
633 {
634  sBattlegroundMgr.ToggleTesting();
635  return true;
636 }
637 
638 bool ChatHandler::HandleDebugArenaCommand(const char* /*args*/)
639 {
640  sBattlegroundMgr.ToggleArenaTesting();
641  return true;
642 }
643 
644 bool ChatHandler::HandleDebugThreatList(const char* /*args*/)
645 {
646  Creature* target = getSelectedCreature();
647  if (!target || target->IsTotem() || target->IsPet())
648  return false;
649 
651  ThreatContainer::StorageType::iterator itr;
652  uint32 cnt = 0;
653  PSendSysMessage("Threat list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
654  for (itr = tlist.begin(); itr != tlist.end(); ++itr)
655  {
656  Unit* unit = (*itr)->getTarget();
657  if (!unit)
658  continue;
659  ++cnt;
660  PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), (*itr)->getThreat());
661  }
662  SendSysMessage("End of threat list.");
663  return true;
664 }
665 
666 bool ChatHandler::HandleDebugHostilRefList(const char* /*args*/)
667 {
668  Unit* target = getSelectedUnit();
669  if (!target)
670  target = m_session->GetPlayer();
672  uint32 cnt = 0;
673  PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
674  while (ref)
675  {
676  if (Unit* unit = ref->GetSource()->getOwner())
677  {
678  ++cnt;
679  PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
680  }
681  ref = ref->next();
682  }
683  SendSysMessage("End of hostil reference list.");
684  return true;
685 }
686 
688 {
689  if (!args || !m_session->GetPlayer())
690  return false;
691 
692  InstanceData* pInstance = m_session->GetPlayer()->GetInstanceData();
693  if (!pInstance)
694  {
695  PSendSysMessage("You are not in scripted instance.");
696  SetSentErrorMessage(true);
697  return false;
698  }
699 
700  char* id = strtok((char*)args, " ");
701  char* data = strtok(NULL, " ");
702 
703  if (!id || !data)
704  return false;
705 
706  uint32 _id = uint32(atoi(id));
707  uint32 _data = uint32(atoi(data));
708 
709  pInstance->SetData(_id, _data);
710  return true;
711 }
712 
714 {
715  if (!args || !m_session->GetPlayer())
716  return false;
717 
718  InstanceData* pInstance = m_session->GetPlayer()->GetInstanceData();
719  if (!pInstance)
720  {
721  PSendSysMessage("You are not in scripted instance.");
722  SetSentErrorMessage(true);
723  return false;
724  }
725 
726  char* id = strtok((char*)args, " ");
727 
728  if (!id)
729  return false;
730 
731  uint32 _id = uint32(atoi(id));
732 
733  PSendSysMessage("Result: %u", pInstance->GetData(_id));
734  return true;
735 }
736 
738 {
739  /* Casts ALL spells. Useful for testing/founding out if/what spell causes server to crash */
740 
741  Unit* player = m_session->GetPlayer();
742 
743  for (uint32 i = 31000; i <= 53085; ++i)
744  {
745  if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(i))
746  {
747  sLog.outDebugInLine("Testing spell %u ... ", i);
748  Creature* trigger = player->SummonTrigger(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 600, NULL);
749  trigger->CastSpell(trigger, spellInfo, true);
750  trigger->DisappearAndDie();
751  sLog.outDebug("OK!");
752  }
753  }
754 
755  PSendSysMessage("ALL OK!");
756  return true;
757 }
758 
760 {
761  if (!m_session)
762  return false;
763 
764  int operation = atoi(args);
765  int result = atoi(std::max<const char*>(strchr(args, ' ')+1, ""));
766 
767  m_session->SendPartyResult(PartyOperation(operation), "", PartyResult(result));
768  return true;
769 }
770 
772 {
773  if (!m_session || !m_session->GetPlayer())
774  return false;
775 
778  data << uint32(atoi(args));
779  m_session->SendPacket(&data);
780 
781  return true;
782 }
783 
Definition: Object.h:130
uint16 GetOpcode() const
Definition: WorldPacket.h:44
bool HandleDebugInArcCommand(const char *args)
Definition: Debugcmds.cpp:38
void SetSentErrorMessage(bool val)
Definition: Chat.h:593
G3D::Vector4 locations
Definition: M2Stores.h:27
#define GUID_LOPART(x)
Definition: ObjectGuid.h:110
Creature * getSelectedCreature()
Definition: Chat.cpp:1640
void PlayDirectSound(uint32 sound_id, Player *target=NULL)
Definition: Object.cpp:2555
void SendUpdateWorldState(uint32 Field, uint32 Value)
Definition: Player.cpp:7657
PlayerMenu * PlayerTalkClass
Definition: Player.h:2182
Unit * getSelectedUnit()
Definition: Chat.cpp:1627
bool HandleBuyErrorCommand(const char *args)
Definition: Debugcmds.cpp:118
Bag * GetContainer()
Definition: Item.h:270
bool HandlePartyResultCommand(const char *args)
Definition: Debugcmds.cpp:759
std::unordered_map< uint32, FlyByCameraCollection > sFlyByCameraStore
Definition: M2Stores.cpp:29
Item * GetItemByPos(uint8 slot) const
Definition: Bag.cpp:233
bool HandleDebugThreatList(const char *args)
Definition: Debugcmds.cpp:644
bool HandleDebugAnimationCommand(const char *args)
Definition: Debugcmds.cpp:771
float getThreat() const
Definition: ThreatManager.h:57
Poi_Icon
Definition: GossipDef.h:71
ItemUpdateState GetState() const
Definition: Item.h:343
#define sLog
Log class singleton.
Definition: Log.h:187
bool HandleDebugHostilRefList(const char *args)
Definition: Debugcmds.cpp:666
ThreatContainer::StorageType const & getThreatList() const
bool HandleEquipErrorCommand(const char *args)
Definition: Debugcmds.cpp:98
virtual void SendSysMessage(const char *str)
Definition: Chat.cpp:790
Player * GetPlayer() const
Definition: WorldSession.h:104
uint16 GetQueuePos() const
Definition: Item.h:354
uint32 GetGUIDLow() const
Definition: Object.h:166
bool IsBag() const
Definition: Item.h:229
WorldSession * m_session
Definition: Chat.h:596
void SendPacket(WorldPacket const *packet)
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
bool HandleDebugPlayCinematicCommand(const char *args)
Definition: Debugcmds.cpp:236
Player * ToPlayer()
Definition: Object.h:392
bool HandleSellErrorCommand(const char *args)
Definition: Debugcmds.cpp:108
bool HandleSendQuestPartyMsgCommand(const char *args)
Definition: Debugcmds.cpp:347
uint8 GetTypeId() const
Definition: Object.h:210
Definition: Bag.h:27
ACE_UINT8 uint8
Definition: Define.h:73
float GetOrientation() const
Definition: Position.h:100
HostileRefManager & getHostileRefManager()
Definition: Unit.h:1733
void SendPartyResult(PartyOperation operation, const std::string &member, PartyResult res)
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
Definition: Chat.cpp:858
bool HandleGetLootRecipient(const char *args)
Definition: Debugcmds.cpp:354
void SendCinematicStart(uint32 CinematicSequenceId)
Definition: Player.cpp:5729
float GetPositionY() const
Definition: Position.h:98
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:61
Definition: Item.h:196
void CastSpell(Unit *Victim, uint32 spellId, bool triggered, Item *castItem=NULL, Aura *triggeredByAura=NULL, uint64 originalCaster=0)
Definition: Unit.cpp:1223
HostileReference * next()
bool HandleGetItemState(const char *args)
Definition: Debugcmds.cpp:371
float GetPositionZ() const
Definition: Position.h:99
bool HandleSetInstanceDataCommand(const char *args)
Definition: Debugcmds.cpp:687
void SendEquipError(uint8 msg, Item *pItem, Item *pItem2)
Definition: Player.cpp:11515
const uint64 & GetSelection() const
Definition: Player.h:1553
PackedGuid const & GetPackGUID() const
Definition: Object.h:178
bool HandleDebugPlaySoundCommand(const char *args)
Definition: Debugcmds.cpp:278
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
uint32 GetBagSize() const
Definition: Bag.h:49
bool HandleSetPoiCommand(const char *args)
Definition: Debugcmds.cpp:72
bool HandleSendQuestInvalidMsgCommand(const char *args)
Definition: Debugcmds.cpp:364
void hexlike() const
Definition: ByteBuffer.h:451
bool HandleSpellCrashTestCommand(const char *args)
Definition: Debugcmds.cpp:737
uint8 GetSlot() const
Definition: Item.h:266
bool HandleGetInstanceDataCommand(const char *args)
Definition: Debugcmds.cpp:713
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
bool IsPet() const
Definition: Unit.h:1048
void SendBuyError(uint8 msg, Creature *pCreature, uint32 item, uint32 param)
Definition: Player.cpp:11541
const char * GetName() const
Definition: Object.h:704
Player * getSelectedPlayer()
Definition: Chat.cpp:1596
void SendCanTakeQuestResponse(uint32 msg) const
Definition: Player.cpp:14192
uint32 timeStamp
Definition: M2Stores.h:26
ACE_UINT64 uint64
Definition: Define.h:70
Player * GetLootRecipient() const
Definition: Creature.cpp:998
void SendPushToPartyResponse(Player *pPlayer, uint32 msg)
Definition: Player.cpp:14227
bool HandleDebugArenaCommand(const char *args)
Definition: Debugcmds.cpp:638
bool HandleSendChannelNotifyCommand(const char *args)
Definition: Debugcmds.cpp:316
HostileReference * getFirst()
ItemUpdateState
Definition: Item.h:184
bool HandleDebugSpellFailCommand(const char *args)
Definition: Debugcmds.cpp:53
Unit * getOwner() const
bool HandleUpdateWorldStateCommand(const char *args)
Definition: Debugcmds.cpp:222
std::list< HostileReference * > StorageType
bool HandleSendOpcodeCommand(const char *args)
Definition: Debugcmds.cpp:128
FROM * GetSource() const
Definition: Reference.h:92
bool IsTotem() const
Definition: Unit.h:1050
ThreatManager & getThreatManager()
Definition: Unit.h:1721
Creature * SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI *(*GetAI)(Creature *)=NULL)
Definition: Object.cpp:2253
PartyResult
Definition: WorldSession.h:49
#define sBattlegroundMgr
bool hasLootRecipient() const
Definition: Creature.h:595
PartyOperation
Definition: WorldSession.h:43
void PlayDistanceSound(uint32 sound_id, Player *target=NULL)
Definition: Object.cpp:2544
bool HandleDebugBattlegroundCommand(const char *args)
Definition: Debugcmds.cpp:632
WorldSession * GetSession() const
Definition: Player.h:1944
std::vector< Item * > & GetItemUpdateQueue()
Definition: Player.h:1107
Definition: Item.h:188
ACE_UINT16 uint16
Definition: Define.h:72
bool IsInUpdateQueue() const
Definition: Item.h:350
ACE_UINT32 uint32
Definition: Define.h:71
float GetPositionX() const
Definition: Position.h:97
void SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags, uint32 Data, const char *locName)
Definition: GossipDef.cpp:193
Definition: Unit.h:908
Item * GetItemByPos(uint16 pos) const
Definition: Player.cpp:8556
uint8 GetBagSlot() const
Definition: Item.cpp:728
bool HandleSendChatMsgCommand(const char *args)
Definition: Debugcmds.cpp:334
void DisappearAndDie()
Definition: Creature.cpp:212
virtual uint32 GetData(uint32)
All-purpose data storage 32 bit.
Definition: ZoneScript.h:57
Definition: Player.h:922
void SendSellError(uint8 msg, Creature *pCreature, uint64 guid, uint32 param)
Definition: Player.cpp:11553
uint64 const & GetOwnerGUID() const
Definition: Item.h:208
static void FillMessageData(WorldPacket *data, WorldSession *session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker)
Definition: Chat.cpp:1518
#define atol(a)
Definition: Common.h:162
const uint64 & GetGUID() const
Definition: Object.h:162
InstanceData * GetInstanceData()
Definition: Object.cpp:1189