mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
fix(Core/Unit): -Wdeprecated-enum-enum-conversion warning (#6868)
This commit is contained in:
@@ -221,7 +221,7 @@ public:
|
||||
ghoul->SetModifierValue(UNIT_MOD_HEALTH, TOTAL_VALUE, (ghoul->GetStat(STAT_STAMINA) - ghoul->GetCreateStat(STAT_STAMINA)) * 10.0f);
|
||||
|
||||
// Power Energy
|
||||
ghoul->SetModifierValue(UnitMods(UNIT_MOD_POWER_START + POWER_ENERGY), BASE_VALUE, ghoul->GetCreatePowers(POWER_ENERGY));
|
||||
ghoul->SetModifierValue(UnitMods(UNIT_MOD_POWER_START + static_cast<uint8>(POWER_ENERGY)), BASE_VALUE, ghoul->GetCreatePowers(POWER_ENERGY));
|
||||
ghoul->UpdateAllStats();
|
||||
ghoul->SetFullHealth();
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (aurEff->GetEffIndex() == EFFECT_0)
|
||||
amount = CalculatePct<int32, float>(GetUnitOwner()->ToPlayer()->GetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + SPELL_SCHOOL_FROST), GetSpellInfo()->Effects[EFFECT_0].CalcValue());
|
||||
amount = CalculatePct<int32, float>(GetUnitOwner()->ToPlayer()->GetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + static_cast<uint8>(SPELL_SCHOOL_FROST)), GetSpellInfo()->Effects[EFFECT_0].CalcValue());
|
||||
else
|
||||
amount = CalculatePct<int32, float>(GetUnitOwner()->ToPlayer()->GetFloatValue(PLAYER_CRIT_PERCENTAGE), GetSpellInfo()->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
@@ -942,7 +942,7 @@ public:
|
||||
{
|
||||
int32 damage = GetEffectValue() + LIFE_TAP_COEFFICIENT;
|
||||
int32 damage2Mana = GetEffectValue();
|
||||
int32 mana = int32(damage2Mana + (caster->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) * 0.5f));
|
||||
int32 mana = int32(damage2Mana + (caster->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + static_cast<uint8>(SPELL_SCHOOL_SHADOW)) * 0.5f));
|
||||
|
||||
// Shouldn't Appear in Combat Log
|
||||
target->ModifyHealth(-damage);
|
||||
|
||||
@@ -4,17 +4,13 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
enum eTrickOrTreatSpells
|
||||
{
|
||||
SPELL_TRICK = 24714,
|
||||
SPELL_TREAT = 24715,
|
||||
SPELL_TRICKED_OR_TREATED = 24755,
|
||||
HALLOWEEN_EVENTID = 12,
|
||||
GOSSIP_MENU = 9733,
|
||||
GOSSIP_MENU_EVENT = 342
|
||||
};
|
||||
constexpr auto SPELL_TRICK = 24714;
|
||||
constexpr auto SPELL_TREAT = 24715;
|
||||
constexpr auto SPELL_TRICKED_OR_TREATED = 24755;
|
||||
constexpr auto HALLOWEEN_EVENTID = 12;
|
||||
constexpr auto GOSSIP_MENU = 9733;
|
||||
constexpr auto GOSSIP_MENU_EVENT = 342;
|
||||
|
||||
class npc_innkeeper : public CreatureScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user