Core/Commands: Fix some commands still using phasemask

This commit is contained in:
Aokromes committed 2017-11-08 01:41:09 +01:00
1 parent 0b2e8431aa
commit 9dc4705ba5
6 files changed
+50 -20

No files matched your search

+10 -3
View File
@@ -1044,13 +1044,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();