mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user