mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user