mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 22:19:54 -04:00
@@ -1047,13 +1047,20 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 phase = (uint32)atoi((char*)args);
|
||||
uint32 phaseId = uint32(atoul(args));
|
||||
|
||||
if (!sPhaseStore.LookupEntry(phaseId))
|
||||
{
|
||||
handler->SendSysMessage(LANG_PHASE_NOTFOUND);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (!target)
|
||||
target = handler->GetSession()->GetPlayer();
|
||||
|
||||
target->SetInPhase(phase, true, !target->IsInPhase(phase));
|
||||
target->SetInPhase(phaseId, true, !target->IsInPhase(phaseId));
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->ToPlayer()->SendUpdatePhasing();
|
||||
|
||||
Reference in New Issue
Block a user