58 char* px = strtok((
char*)args,
" ");
66 data <<
uint8(failnum);
85 char* icon_text = strtok((
char*)args,
" ");
86 char* flags_text = strtok(NULL,
" ");
87 if (!icon_text || !flags_text)
93 sLog.outDetail(
"Command : POI, NPC = %u, icon = %u flags = %u", target->
GetGUIDLow(), icon, flags);
103 uint8 msg = atoi(args);
113 uint8 msg = atoi(args);
123 uint8 msg = atoi(args);
136 if (!unit) unit = player;
138 std::ifstream ifs(
"opcode.txt");
161 else if (type ==
"uint16")
167 else if (type ==
"uint32")
173 else if (type ==
"uint64")
179 else if (type ==
"float")
185 else if (type ==
"string")
191 else if (type ==
"pguid")
193 else if (type ==
"myguid")
195 else if (type ==
"pos")
201 else if (type ==
"mypos")
209 sLog.outDebug(
"Sending opcode: unknown type '%s'", type.c_str());
215 if (
sLog.IsOutDebug())
224 char* w = strtok((
char*)args,
" ");
225 char* s = strtok(NULL,
" ");
247 uint32 dwId = atoi((
char*)args);
259 std::unordered_map<uint32, FlyByCameraCollection>::const_iterator itr =
sFlyByCameraStore.find(cineSeq->cinematicCamera);
262 PSendSysMessage(
"Waypoints for sequence %u, camera %u", dwId, cineSeq->cinematicCamera);
289 uint32 dwSoundId = atoi((
char*)args);
321 const char* name =
"test";
322 uint8 code = atoi(args);
339 const char* msg =
"testtest";
340 uint8 type = atoi(args);
376 std::string state_str = args;
379 bool list_queue =
false, check_all =
false;
382 else if (state_str ==
"new") state =
ITEM_NEW;
384 else if (state_str ==
"queue") list_queue =
true;
385 else if (state_str ==
"check_all") check_all =
true;
391 if (!list_queue && !check_all)
393 state_str =
"The player has the following " + state_str +
" items: ";
413 if (item && item->
GetState() == state)
423 for (
size_t i = 0; i < updateQueue.size(); i++)
425 Item* item = updateQueue[i];
450 if (updateQueue.empty())
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());
490 if (qp > updateQueue.size())
497 if (updateQueue[qp] == NULL)
504 if (updateQueue[qp] != item)
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());
548 if (container != bag)
558 if (qp > updateQueue.size())
565 if (updateQueue[qp] == NULL)
572 if (updateQueue[qp] != item)
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());
589 for (
size_t i = 0; i < updateQueue.size(); i++)
591 Item* item = updateQueue[i];
603 PSendSysMessage(
"queue(%lu): for the an item (guid %d), the queuepos doesn't match it's position in the queue!", i, item->
GetGUIDLow());
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());
651 ThreatContainer::StorageType::iterator itr;
654 for (itr = tlist.begin(); itr != tlist.end(); ++itr)
656 Unit* unit = (*itr)->getTarget();
700 char*
id = strtok((
char*)args,
" ");
701 char* data = strtok(NULL,
" ");
709 pInstance->
SetData(_id, _data);
726 char*
id = strtok((
char*)args,
" ");
743 for (
uint32 i = 31000; i <= 53085; ++i)
747 sLog.outDebugInLine(
"Testing spell %u ... ", i);
749 trigger->
CastSpell(trigger, spellInfo,
true);
751 sLog.outDebug(
"OK!");
764 int operation = atoi(args);
765 int result = atoi(std::max<const char*>(strchr(args,
' ')+1,
""));
778 data <<
uint32(atoi(args));
bool HandleDebugInArcCommand(const char *args)
void SetSentErrorMessage(bool val)
Creature * getSelectedCreature()
void PlayDirectSound(uint32 sound_id, Player *target=NULL)
void SendUpdateWorldState(uint32 Field, uint32 Value)
PlayerMenu * PlayerTalkClass
bool HandleBuyErrorCommand(const char *args)
bool HandlePartyResultCommand(const char *args)
std::unordered_map< uint32, FlyByCameraCollection > sFlyByCameraStore
Item * GetItemByPos(uint8 slot) const
bool HandleDebugThreatList(const char *args)
bool HandleDebugAnimationCommand(const char *args)
ItemUpdateState GetState() const
#define sLog
Log class singleton.
bool HandleDebugHostilRefList(const char *args)
ThreatContainer::StorageType const & getThreatList() const
bool HandleEquipErrorCommand(const char *args)
virtual void SendSysMessage(const char *str)
Player * GetPlayer() const
uint16 GetQueuePos() const
uint32 GetGUIDLow() const
void SendPacket(WorldPacket const *packet)
DBCStorage< SpellEntry > sSpellStore(SpellEntryfmt)
bool HandleDebugPlayCinematicCommand(const char *args)
bool HandleSellErrorCommand(const char *args)
bool HandleSendQuestPartyMsgCommand(const char *args)
float GetOrientation() const
HostileRefManager & getHostileRefManager()
void SendPartyResult(PartyOperation operation, const std::string &member, PartyResult res)
void PSendSysMessage(const char *format,...) ATTR_PRINTF(2
bool HandleGetLootRecipient(const char *args)
void SendCinematicStart(uint32 CinematicSequenceId)
float GetPositionY() const
virtual void SetData(uint32, uint32)
void CastSpell(Unit *Victim, uint32 spellId, bool triggered, Item *castItem=NULL, Aura *triggeredByAura=NULL, uint64 originalCaster=0)
HostileReference * next()
bool HandleGetItemState(const char *args)
float GetPositionZ() const
bool HandleSetInstanceDataCommand(const char *args)
void SendEquipError(uint8 msg, Item *pItem, Item *pItem2)
const uint64 & GetSelection() const
PackedGuid const & GetPackGUID() const
bool HandleDebugPlaySoundCommand(const char *args)
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
uint32 GetBagSize() const
bool HandleSetPoiCommand(const char *args)
bool HandleSendQuestInvalidMsgCommand(const char *args)
bool HandleSpellCrashTestCommand(const char *args)
bool HandleGetInstanceDataCommand(const char *args)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
void SendBuyError(uint8 msg, Creature *pCreature, uint32 item, uint32 param)
const char * GetName() const
Player * getSelectedPlayer()
void SendCanTakeQuestResponse(uint32 msg) const
Player * GetLootRecipient() const
void SendPushToPartyResponse(Player *pPlayer, uint32 msg)
bool HandleDebugArenaCommand(const char *args)
bool HandleSendChannelNotifyCommand(const char *args)
HostileReference * getFirst()
bool HandleDebugSpellFailCommand(const char *args)
bool HandleUpdateWorldStateCommand(const char *args)
std::list< HostileReference * > StorageType
bool HandleSendOpcodeCommand(const char *args)
ThreatManager & getThreatManager()
Creature * SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI *(*GetAI)(Creature *)=NULL)
bool hasLootRecipient() const
void PlayDistanceSound(uint32 sound_id, Player *target=NULL)
bool HandleDebugBattlegroundCommand(const char *args)
WorldSession * GetSession() const
std::vector< Item * > & GetItemUpdateQueue()
bool IsInUpdateQueue() const
float GetPositionX() const
Item * GetItemByPos(uint16 pos) const
bool HandleSendChatMsgCommand(const char *args)
virtual uint32 GetData(uint32)
All-purpose data storage 32 bit.
void SendSellError(uint8 msg, Creature *pCreature, uint64 guid, uint32 param)
uint64 const & GetOwnerGUID() const
static void FillMessageData(WorldPacket *data, WorldSession *session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker)
const uint64 & GetGUID() const
InstanceData * GetInstanceData()