diff options
author | Nay <dnpd.dd@gmail.com> | 2012-07-15 14:46:04 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-07-15 14:46:04 +0100 |
commit | c32c83ed67420a90e95f433a9d71febaefd2ecfd (patch) | |
tree | 64047accdeaaa54b542c2d2233527a726dac44ce /src | |
parent | 5485f92c5fa0f372a1a4622d96a8b1b74285fd74 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Commands/cs_gm.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index d449b3617f7..3dfc6f9c7e8 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -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; } |