#include "ScriptPCH.h" uint32 auras[] = { 48162, 48074, 48170, 43223, 36880, 467, 48469 }; class duel_reset : public PlayerScript { public: duel_reset() : PlayerScript("duel_reset"){ } void OnDuelEnd(Player* winner, Player* loser, DuelCompleteType type) { /*--WINNER STUFF BEGIN--*/ winner->SetHealth(winner->GetMaxHealth()); winner->RemoveAllArenaSpellCooldowns(); //Resets CDs under 10 minutes; Death-Knights spam Army of the Dead, and crash server. if(winner->GetPowerType() == POWER_MANA) winner->SetPower(POWER_MANA, winner->GetMaxPower(POWER_MANA)); if(winner->GetPowerType() == POWER_RAGE) winner->SetPower(POWER_RAGE, winner->GetMaxPower(POWER_RAGE)); if(winner->GetPowerType() == POWER_ENERGY) winner->SetPower(POWER_ENERGY, winner->GetMaxPower(POWER_ENERGY)); for(int i = 0; i < 7; i++) winner->AddAura(auras[i], winner); winner->GetSession()->SendNotification("You have been buffed and earned 1 gold for winning a duel! Keep going champion!"); winner->SetMoney(winner->GetMoney() + 10000); //1 gold winner->AddAura(6119, winner); //Mounts winner on black war bear /*--LOSER STUFF BEGIN--*/ loser->SetHealth(loser->GetMaxHealth()); loser->RemoveAllArenaSpellCooldowns(); //Gives casters full mana, warriors full rage, and rogues full energy, so they can easily get back into the fights, and dominate. if(loser->GetPowerType() == POWER_MANA) loser->SetPower(POWER_MANA, loser->GetMaxPower(POWER_MANA)); if(loser->GetPowerType() == POWER_RAGE) loser->SetPower(POWER_RAGE, loser->GetMaxPower(POWER_RAGE)); if(loser->GetPowerType() == POWER_ENERGY) loser->SetPower(POWER_ENERGY, loser->GetMaxPower(POWER_ENERGY)); loser->SetMoney(loser->GetMoney() + 5000); //50 silver loser->GetSession()->SendNotification("Don't be sad you lost! You still earned a hefty 50 silver for trying!"); } }; void AddSC_duel_reset() { new duel_reset(); }