feat(Scripts/Commands): Morph Mount (#19558)
* init * Update cs_modify.cpp * Update data/sql/updates/pending_db_world/rev_1722817302187444800.sql Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> * Update cs_modify.cpp --------- Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `command` WHERE `name` = 'morph mount';
|
||||||
|
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||||
|
('morph mount', 1, 'Syntax: .morph mount #displayid - Change the selected target\'s mount\'s model ID to #displayid.');
|
||||||
@@ -77,7 +77,8 @@ public:
|
|||||||
static ChatCommandTable morphCommandTable =
|
static ChatCommandTable morphCommandTable =
|
||||||
{
|
{
|
||||||
{ "reset", HandleMorphResetCommand, SEC_MODERATOR, Console::No },
|
{ "reset", HandleMorphResetCommand, SEC_MODERATOR, Console::No },
|
||||||
{ "target", HandleMorphTargetCommand, SEC_MODERATOR, Console::No }
|
{ "target", HandleMorphTargetCommand, SEC_MODERATOR, Console::No },
|
||||||
|
{ "mount", HandleMorphMountCommand, SEC_MODERATOR, Console::No }
|
||||||
};
|
};
|
||||||
|
|
||||||
static ChatCommandTable commandTable =
|
static ChatCommandTable commandTable =
|
||||||
@@ -868,6 +869,21 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool HandleMorphMountCommand(ChatHandler* handler, uint32 displayID)
|
||||||
|
{
|
||||||
|
Player* target = handler->getSelectedPlayerOrSelf();
|
||||||
|
|
||||||
|
if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer())) // check online security
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).empty())
|
||||||
|
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//set temporary phase mask for player
|
//set temporary phase mask for player
|
||||||
static bool HandleModifyPhaseCommand(ChatHandler* handler, uint32 phaseMask)
|
static bool HandleModifyPhaseCommand(ChatHandler* handler, uint32 phaseMask)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user