mirror of
https://github.com/araxiaonline/azerothshard-core.git
synced 2026-06-13 02:42:24 -04:00
[AZTH-MS] OnPlayerSetPhase for .dev command
This commit is contained in:
@@ -1132,6 +1132,21 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnPlayerSetPhase(AuraEffect* auraEff, AuraApplication const* aurApp, uint8 /*mode*/, bool /*apply*/, uint32& newPhase) override
|
||||
{
|
||||
if (!auraEff)
|
||||
return;
|
||||
|
||||
Player* player = aurApp->GetTarget()->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
uint32 auraPhase = aurApp->GetTarget()->GetPhaseByAuras();
|
||||
|
||||
if (newPhase == PHASEMASK_ANYWHERE && !player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
|
||||
newPhase = newPhase == PHASEMASK_NORMAL ? PHASEMASK_NORMAL : auraPhase;
|
||||
}
|
||||
};
|
||||
|
||||
class Unit_SC : public UnitScript
|
||||
|
||||
Reference in New Issue
Block a user