Pox
Enthusiast
So i am learning c++. I am i doing it correct?
and yes there is probably 100 other duel reset scripts.
and yes there is probably 100 other duel reset scripts.
Code:
#include "ScriptPCH.h"
class DuelReset : public PlayerScript
{
public
DuelReset() : PlayerScript("DuelReset"){}
void OnDuelEnd(Player* Winner, Player* Loser, DuelCompleteType)
{
Winner->RemoveAllSpellCooldown();
Loser->RemoveAllSpellCooldown();
Winner->SetHealth(Winner->GetMaxPower());
if (Winner->getPowerType() == POWER_MANA)
winner->SetPower(POWER_MANA, pWinner->GetMaxPower(POWER_MANA));
Loser->SetHealth(Loser->GetMaxPower()):
if (Loser->getPowerType() == POWER_MANA)
loser->SetPower(POWER_MANA, loser->GetMaxPower(POWER_MANA));
};
void AddSC_DuelReset()
{
new DuelReset();
}