Created
April 2, 2013 07:16
-
-
Save Raydor/5290479 to your computer and use it in GitHub Desktop.
Este diff permite que cuando un gamemaster se ponga ".gm vis off" (es decir, modo invisible) se le aplique un aura al mismo que indicará más fácilmente que está en modo invisible.
Actualmente TrinityCore ya tiene ese sistema.
Más información en http://overwow.com/topic/36-hechizo-37800-con-gm-visible-off/
Tipo de Core: MythCore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -r ecc0320bdad3 src/server/scripts/Commands/cs_gm.cpp | |
| --- a/src/server/scripts/Commands/cs_gm.cpp Sat Mar 02 19:50:35 2013 +0100 | |
| +++ b/src/server/scripts/Commands/cs_gm.cpp Sun Mar 03 09:36:17 2013 +0100 | |
| @@ -178,10 +178,14 @@ | |
| return true; | |
| } | |
| + const uint32 VISUAL_AURA = 37800; | |
| std::string argstr = (char*)args; | |
| + Player* player = handler->GetSession()->GetPlayer(); | |
| if(argstr == "on") | |
| { | |
| + if (player->HasAura(VISUAL_AURA, 0)) | |
| + player->RemoveAurasDueToSpell(VISUAL_AURA); | |
| handler->GetSession()->GetPlayer()->SetGMVisible(true); | |
| handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE); | |
| return true; | |
| @@ -191,6 +195,7 @@ | |
| { | |
| handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE); | |
| handler->GetSession()->GetPlayer()->SetGMVisible(false); | |
| + player->AddAura(VISUAL_AURA, player); | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment