Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SpellCombatMetadata.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
7#include "DBCEnums.h"
8#include "SharedDefines.h"
9
10namespace Skyfire
11{
12namespace Spells
13{
14 namespace
15 {
16 struct GenericSchoolDamageRuleInfo
17 {
18 uint32 SpellId;
20 };
21
22 uint32 const SPELL_CONSUMPTION = 28865;
23 uint32 const SPELL_THUNDERCRASH = 25599;
24 uint32 const SPELL_ARCANE_CHARGE = 45072;
25 uint32 const SPELL_GARGOYLE_STRIKE = 51963;
26 uint32 const SPELL_VICTORY_RUSH = 34428;
27 uint32 const SPELL_SHOCKWAVE = 46968;
28 uint32 const SPELL_MANA_BURN = 8129;
29 uint32 const SPELL_VESSEL_OF_THE_NAARU = 45064;
30 uint32 const SPELL_VESSEL_OF_THE_NAARU_STACK_AURA = 45062;
31 uint32 const SPELL_RUNIC_HEALING_INJECTOR = 67489;
32 uint32 const SPELL_PRIMAL_WISDOM = 63375;
33 uint32 const SPELL_RUNIC_MANA_INJECTOR = 67490;
34 uint32 const SPELL_JAB = 100780;
35 uint32 const SPELL_STANCE_OF_THE_FIERCE_TIGER = 103985;
36 uint32 const SPELL_MAD_ALCHEMISTS_POTION = 45051;
37 uint32 const SPELL_BLOOD_TAP = 45529;
38 uint32 const SPELL_EMPOWER_RUNE_WEAPON = 47568;
39
40 uint32 const DAMAGE_CONSUMPTION_NORMAL = 2750;
41 uint32 const DAMAGE_CONSUMPTION_HEROIC = 4250;
42 uint32 const DAMAGE_THUNDERCRASH_MINIMUM = 200;
43 uint32 const ENGINEERING_HEALING_BONUS_PCT = 25;
44 uint32 const JAB_BASE_CHI = 1;
45
46 GenericSchoolDamageRuleInfo const GenericSchoolDamageRules[] =
47 {
50 { SPELL_ARCANE_CHARGE, GENERIC_SCHOOL_DAMAGE_ARCANE_CHARGE },
52 };
53
54 EnergizeLevelScalingRule const EnergizeLevelScalingRules[] =
55 {
56 { 9512, 40, 2 }, // Restore Energy
57 { 24571, 60, 10 }, // Blood Fury
58 { 24532, 60, 4 } // Burst of Energy
59 };
60 }
61
63 {
64 for (GenericSchoolDamageRuleInfo const& rule : GenericSchoolDamageRules)
65 if (rule.SpellId == spellId)
66 return rule.Rule;
67
69 }
70
72 {
73 return difficulty == DIFFICULTY_NONE ? DAMAGE_CONSUMPTION_NORMAL : DAMAGE_CONSUMPTION_HEROIC;
74 }
75
77 {
78 return DAMAGE_THUNDERCRASH_MINIMUM;
79 }
80
82 {
83 return creatureType == CREATURE_TYPE_DEMON || creatureType == CREATURE_TYPE_UNDEAD;
84 }
85
87 {
88 return (int32(level) - 60) * 4 + 60;
89 }
90
92 {
93 return spellId == SPELL_VICTORY_RUSH;
94 }
95
97 {
98 return spellId == SPELL_SHOCKWAVE;
99 }
100
102 {
103 return spellId == SPELL_MANA_BURN;
104 }
105
107 {
108 return spellId == SPELL_VESSEL_OF_THE_NAARU;
109 }
110
112 {
113 return SPELL_VESSEL_OF_THE_NAARU_STACK_AURA;
114 }
115
117 {
118 return spellId == SPELL_RUNIC_HEALING_INJECTOR;
119 }
120
122 {
123 return ENGINEERING_HEALING_BONUS_PCT;
124 }
125
127 {
128 for (EnergizeLevelScalingRule const& rule : EnergizeLevelScalingRules)
129 if (rule.SpellId == spellId)
130 return &rule;
131
132 return nullptr;
133 }
134
136 {
137 return spellId == SPELL_PRIMAL_WISDOM;
138 }
139
141 {
142 return spellId == SPELL_RUNIC_MANA_INJECTOR;
143 }
144
146 {
147 return spellId == SPELL_JAB;
148 }
149
151 {
152 return JAB_BASE_CHI;
153 }
154
156 {
157 return SPELL_STANCE_OF_THE_FIERCE_TIGER;
158 }
159
161 {
162 return spellId == SPELL_MAD_ALCHEMISTS_POTION;
163 }
164
166 {
167 return spellId == SPELL_BLOOD_TAP;
168 }
169
171 {
172 return spellId == SPELL_EMPOWER_RUNE_WEAPON;
173 }
174}
175}
@ DIFFICULTY_NONE
Definition DBCEnums.h:331
std::int32_t int32
Definition Define.h:73
std::uint32_t uint32
Definition Define.h:77
@ CREATURE_TYPE_UNDEAD
@ CREATURE_TYPE_DEMON
@ SPELL_CONSUMPTION
@ SPELL_THUNDERCRASH
@ SPELL_SHOCKWAVE
@ SPELL_GARGOYLE_STRIKE
@ SPELL_MANA_BURN
bool IsEmpowerRuneWeaponSpell(uint32 spellId)
bool IsMadAlchemistsPotionSpell(uint32 spellId)
GenericSchoolDamageRule GetGenericSchoolDamageRule(uint32 spellId)
bool IsVesselOfTheNaaruHealSpell(uint32 spellId)
uint32 GetStanceOfTheFierceTigerAuraSpellId()
uint32 GetConsumptionDamage(uint32 difficulty)
bool IsPrimalWisdomEnergizeSpell(uint32 spellId)
int32 GetGargoyleStrikeDamageForLevel(uint32 level)
uint32 GetThundercrashMinimumDamage()
bool IsVictoryRushDamageSpell(uint32 spellId)
uint32 GetEngineeringHealingBonusPct()
bool IsManaBurnSpell(uint32 spellId)
bool IsArcaneChargeAllowedCreatureType(uint32 creatureType)
uint32 GetVesselOfTheNaaruStackAuraSpellId()
bool IsRunicManaInjectorSpell(uint32 spellId)
bool IsBloodTapRuneSpell(uint32 spellId)
bool IsJabEnergizeSpell(uint32 spellId)
bool IsShockwaveDamageSpell(uint32 spellId)
EnergizeLevelScalingRule const * GetEnergizeLevelScalingRule(uint32 spellId)
bool IsRunicHealingInjectorSpell(uint32 spellId)