mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(Core/Commands): Debug Spell Visuals Command (#12216)
* feat(Core/Commands): Debug Spell Visuals Command * feat(DB/Commands): Debug Visual Help * Add missing eol at eof
This commit is contained in:
@@ -58,7 +58,8 @@ public:
|
||||
{ "cinematic", HandleDebugPlayCinematicCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "movie", HandleDebugPlayMovieCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "sound", HandleDebugPlaySoundCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "music", HandleDebugPlayMusicCommand, SEC_ADMINISTRATOR, Console::No }
|
||||
{ "music", HandleDebugPlayMusicCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "visual", HandleDebugVisualCommand, SEC_ADMINISTRATOR, Console::No }
|
||||
};
|
||||
static ChatCommandTable debugSendCommandTable =
|
||||
{
|
||||
@@ -203,6 +204,28 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDebugVisualCommand(ChatHandler* handler, uint32 visualId)
|
||||
{
|
||||
if (!visualId)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* player = handler->GetPlayer();
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
|
||||
if (!target)
|
||||
{
|
||||
player->SendPlaySpellVisual(visualId);
|
||||
return true;
|
||||
}
|
||||
|
||||
player->SendPlaySpellImpact(target->GetGUID(), visualId);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDebugSendSpellFailCommand(ChatHandler* handler, SpellCastResult result, Optional<uint32> failArg1, Optional<uint32> failArg2)
|
||||
{
|
||||
WorldPacket data(SMSG_CAST_FAILED, 5);
|
||||
|
||||
Reference in New Issue
Block a user