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:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `command` WHERE `name` = 'debug play visual';
|
||||||
|
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||||
|
('debug play visual', 3, 'Syntax: .debug play visual #visualid\r\nPlay spell visual with #visualid.\n#visualid refers to the ID from SpellVisualKit.dbc');
|
||||||
@@ -58,7 +58,8 @@ public:
|
|||||||
{ "cinematic", HandleDebugPlayCinematicCommand, SEC_ADMINISTRATOR, Console::No },
|
{ "cinematic", HandleDebugPlayCinematicCommand, SEC_ADMINISTRATOR, Console::No },
|
||||||
{ "movie", HandleDebugPlayMovieCommand, SEC_ADMINISTRATOR, Console::No },
|
{ "movie", HandleDebugPlayMovieCommand, SEC_ADMINISTRATOR, Console::No },
|
||||||
{ "sound", HandleDebugPlaySoundCommand, 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 =
|
static ChatCommandTable debugSendCommandTable =
|
||||||
{
|
{
|
||||||
@@ -203,6 +204,28 @@ public:
|
|||||||
return true;
|
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)
|
static bool HandleDebugSendSpellFailCommand(ChatHandler* handler, SpellCastResult result, Optional<uint32> failArg1, Optional<uint32> failArg2)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_CAST_FAILED, 5);
|
WorldPacket data(SMSG_CAST_FAILED, 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user