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:
Gultask
2024-08-05 21:41:00 -03:00
committed by GitHub
parent c28a2bd8e3
commit a23da06358
2 changed files with 21 additions and 1 deletions

View File

@@ -77,7 +77,8 @@ public:
static ChatCommandTable morphCommandTable =
{
{ "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 =
@@ -868,6 +869,21 @@ public:
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
static bool HandleModifyPhaseCommand(ChatHandler* handler, uint32 phaseMask)
{