feat: add RemoveArenaSpellCooldowns and RemoveArenaAuras

This commit is contained in:
Axel Cocat
2021-07-24 18:53:39 +02:00
parent 8b77940be7
commit 31b9b46ec6
3 changed files with 21 additions and 1 deletions

View File

@@ -389,6 +389,7 @@ ElunaRegister<Unit> UnitMethods[] =
{ "AddAura", &LuaUnit::AddAura },
{ "RemoveAura", &LuaUnit::RemoveAura },
{ "RemoveAllAuras", &LuaUnit::RemoveAllAuras },
{ "RemoveArenaAuras", &LuaUnit::RemoveArenaAuras },
{ "ClearInCombat", &LuaUnit::ClearInCombat },
{ "DeMorph", &LuaUnit::DeMorph },
{ "SendUnitWhisper", &LuaUnit::SendUnitWhisper },
@@ -663,6 +664,7 @@ ElunaRegister<Player> PlayerMethods[] =
{ "ModifyMoney", &LuaPlayer::ModifyMoney },
{ "LearnSpell", &LuaPlayer::LearnSpell },
{ "LearnTalent", &LuaPlayer::LearnTalent },
{ "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns },
{ "RemoveItem", &LuaPlayer::RemoveItem },
{ "RemoveLifetimeKills", &LuaPlayer::RemoveLifetimeKills },
{ "ResurrectPlayer", &LuaPlayer::ResurrectPlayer },

View File

@@ -3733,6 +3733,15 @@ namespace LuaPlayer
return 0;
}
/**
* Remove cooldowns on spells that have less than 10 minutes of cooldown from the [Player], similarly to when you enter an arena.
*/
int RemoveArenaSpellCooldowns(lua_State* /*L*/, Player* player)
{
player->RemoveArenaSpellCooldowns();
return 0;
}
/**
* Resurrects the [Player].
*

View File

@@ -2656,7 +2656,16 @@ namespace LuaUnit
unit->RemoveAllAuras();
return 0;
}
/**
* Removes all positive visible [Aura]'s from the [Unit].
*/
int RemoveArenaAuras(lua_State* /*L*/, Unit* unit)
{
unit->RemoveArenaAuras();
return 0;
}
/**
* Adds the given unit state for the [Unit].
*