Scripts/Commands: When GM is invisible use a transparency visual aura (to make it obvious that invisibility is active)

Thanks to Kretol for the idea and Aokromes for the spell id
This commit is contained in:
Nay
2012-07-15 14:46:04 +01:00
parent 5485f92c5f
commit c32c83ed67

View File

@@ -196,11 +196,16 @@ public:
return true;
}
const uint32 VISUAL_AURA = 37800;
std::string param = (char*)args;
Player* player = handler->GetSession()->GetPlayer();
if (param == "on")
{
handler->GetSession()->GetPlayer()->SetGMVisible(true);
if (player->HasAura(VISUAL_AURA, 0))
player->RemoveAurasDueToSpell(VISUAL_AURA);
player->SetGMVisible(true);
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
return true;
}
@@ -208,7 +213,10 @@ public:
if (param == "off")
{
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
handler->GetSession()->GetPlayer()->SetGMVisible(false);
player->SetGMVisible(false);
player->AddAura(VISUAL_AURA, player);
return true;
}