Fateswhisper

resurrect_in_pvp_zone

Jul 30th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2. #include "Player.h"
  3.  
  4. class resurrect_in_pvp_zone : public PlayerScript
  5. {
  6. public:
  7.         resurrect_in_pvp_zone() : PlayerScript("resurrect_in_pvp_zone") {}
  8.  
  9.         void OnPVPKill(Player * Killer, Player* Killed)
  10.         {
  11.             if (Killer->GetAreaId() == 2401)
  12.             {
  13.                 if (Killed->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
  14.                     Killed->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
  15.  
  16.                 Killed->KillPlayer();
  17.                 Killed->ResurrectPlayer(40.0f, true);
  18.  
  19.                 if (Aura * aur = Killed->GetAura(15007))
  20.                     aur->SetDuration(1*MINUTE*IN_MILLISECONDS);
  21.  
  22.                 Killed->CastSpell(Killed, 13874, true);
  23.                 if (Aura * aur = Killed->GetAura(13874))
  24.                     aur->SetDuration(1*MINUTE*IN_MILLISECONDS);
  25.  
  26.                 Killed->TeleportTo(0, -1818.4f, -4148.6f, 26.6f, 4.27675f);
  27.             }
  28.         }
  29. };
  30.  
  31. void AddSC_resurrect_in_pvp_zone()
  32. {
  33.     new resurrect_in_pvp_zone();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment