[Quest API] Add Spell methods to Perl. (#1631)

* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
This commit is contained in:
Kinglykrab
2021-11-03 17:47:15 -04:00
committed by GitHub
parent 6e26e8953c
commit 17aaab1f9d
61 changed files with 4342 additions and 2117 deletions
+4 -4
View File
@@ -4342,8 +4342,8 @@ struct AARankPrereq_Struct
struct AARankEffect_Struct
{
int32 effect_id;
int32 base1;
int32 base2;
int32 base_value;
int32 limit_value;
int32 slot;
};
@@ -4351,8 +4351,8 @@ struct AARankEffect_Struct
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
};
+2 -2
View File
@@ -4361,8 +4361,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
/*16*/
};
+2 -2
View File
@@ -4305,8 +4305,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
/*16*/
};
+2 -2
View File
@@ -1874,8 +1874,8 @@ namespace SoD
for(auto i = 0; i < eq->total_abilities; ++i) {
eq->abilities[i].skill_id = inapp->ReadUInt32();
eq->abilities[i].base1 = inapp->ReadUInt32();
eq->abilities[i].base2 = inapp->ReadUInt32();
eq->abilities[i].base_value = inapp->ReadUInt32();
eq->abilities[i].limit_value = inapp->ReadUInt32();
eq->abilities[i].slot = inapp->ReadUInt32();
}
+2 -2
View File
@@ -3748,8 +3748,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
/*16*/
};
+2 -2
View File
@@ -1545,8 +1545,8 @@ namespace SoF
for(auto i = 0; i < eq->total_abilities; ++i) {
eq->abilities[i].skill_id = inapp->ReadUInt32();
eq->abilities[i].base1 = inapp->ReadUInt32();
eq->abilities[i].base2 = inapp->ReadUInt32();
eq->abilities[i].base_value = inapp->ReadUInt32();
eq->abilities[i].limit_value = inapp->ReadUInt32();
eq->abilities[i].slot = inapp->ReadUInt32();
}
+2 -2
View File
@@ -3673,8 +3673,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
/*16*/
};
+2 -2
View File
@@ -1338,8 +1338,8 @@ namespace Titanium
for(auto i = 0; i < eq->total_abilities; ++i) {
eq->abilities[i].skill_id = inapp->ReadUInt32();
eq->abilities[i].base1 = inapp->ReadUInt32();
eq->abilities[i].base2 = inapp->ReadUInt32();
eq->abilities[i].base_value = inapp->ReadUInt32();
eq->abilities[i].limit_value = inapp->ReadUInt32();
eq->abilities[i].slot = inapp->ReadUInt32();
}
+2 -2
View File
@@ -3180,8 +3180,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
};
+2 -2
View File
@@ -2139,8 +2139,8 @@ namespace UF
for(auto i = 0; i < eq->total_abilities; ++i) {
eq->abilities[i].skill_id = inapp->ReadUInt32();
eq->abilities[i].base1 = inapp->ReadUInt32();
eq->abilities[i].base2 = inapp->ReadUInt32();
eq->abilities[i].base_value = inapp->ReadUInt32();
eq->abilities[i].limit_value = inapp->ReadUInt32();
eq->abilities[i].slot = inapp->ReadUInt32();
}
+2 -2
View File
@@ -3803,8 +3803,8 @@ struct UseAA_Struct {
struct AA_Ability {
/*00*/ uint32 skill_id;
/*04*/ uint32 base1;
/*08*/ uint32 base2;
/*04*/ uint32 base_value;
/*08*/ uint32 limit_value;
/*12*/ uint32 slot;
/*16*/
};
+57 -57
View File
@@ -1682,7 +1682,7 @@ void SharedDatabase::LoadDamageShieldTypes(SPDat_Spell_Struct* sp, int32 iMaxSpe
for(auto row = results.begin(); row != results.end(); ++row) {
int spellID = atoi(row[0]);
if((spellID > 0) && (spellID <= iMaxSpellID))
sp[spellID].DamageShieldType = atoi(row[1]);
sp[spellID].damage_shield_type = atoi(row[1]);
}
}
@@ -1762,48 +1762,48 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
strn0cpy(sp[tempid].spell_fades, row[8], sizeof(sp[tempid].spell_fades));
sp[tempid].range=static_cast<float>(atof(row[9]));
sp[tempid].aoerange=static_cast<float>(atof(row[10]));
sp[tempid].pushback=static_cast<float>(atof(row[11]));
sp[tempid].pushup=static_cast<float>(atof(row[12]));
sp[tempid].aoe_range=static_cast<float>(atof(row[10]));
sp[tempid].push_back=static_cast<float>(atof(row[11]));
sp[tempid].push_up=static_cast<float>(atof(row[12]));
sp[tempid].cast_time=atoi(row[13]);
sp[tempid].recovery_time=atoi(row[14]);
sp[tempid].recast_time=atoi(row[15]);
sp[tempid].buffdurationformula=atoi(row[16]);
sp[tempid].buffduration=atoi(row[17]);
sp[tempid].AEDuration=atoi(row[18]);
sp[tempid].buff_duration_formula=atoi(row[16]);
sp[tempid].buff_duration=atoi(row[17]);
sp[tempid].aoe_duration=atoi(row[18]);
sp[tempid].mana=atoi(row[19]);
int y=0;
for(y=0; y< EFFECT_COUNT;y++)
sp[tempid].base[y]=atoi(row[20+y]); // effect_base_value
sp[tempid].base_value[y]=atoi(row[20+y]); // effect_base_value
for(y=0; y < EFFECT_COUNT; y++)
sp[tempid].base2[y]=atoi(row[32+y]); // effect_limit_value
sp[tempid].limit_value[y]=atoi(row[32+y]); // effect_limit_value
for(y=0; y< EFFECT_COUNT;y++)
sp[tempid].max[y]=atoi(row[44+y]);
sp[tempid].max_value[y]=atoi(row[44+y]);
for(y=0; y< 4;y++)
sp[tempid].components[y]=atoi(row[58+y]);
sp[tempid].component[y]=atoi(row[58+y]);
for(y=0; y< 4;y++)
sp[tempid].component_counts[y]=atoi(row[62+y]);
sp[tempid].component_count[y]=atoi(row[62+y]);
for(y=0; y< 4;y++)
sp[tempid].NoexpendReagent[y]=atoi(row[66+y]);
sp[tempid].no_expend_reagent[y]=atoi(row[66+y]);
for(y=0; y< EFFECT_COUNT;y++)
sp[tempid].formula[y]=atoi(row[70+y]);
sp[tempid].goodEffect=atoi(row[83]);
sp[tempid].Activated=atoi(row[84]);
sp[tempid].resisttype=atoi(row[85]);
sp[tempid].good_effect=atoi(row[83]);
sp[tempid].activated=atoi(row[84]);
sp[tempid].resist_type=atoi(row[85]);
for(y=0; y< EFFECT_COUNT;y++)
sp[tempid].effectid[y]=atoi(row[86+y]);
sp[tempid].effect_id[y]=atoi(row[86+y]);
sp[tempid].targettype = (SpellTargetType) atoi(row[98]);
sp[tempid].basediff=atoi(row[99]);
sp[tempid].target_type = (SpellTargetType) atoi(row[98]);
sp[tempid].base_difficulty=atoi(row[99]);
int tmp_skill = atoi(row[100]);;
@@ -1812,15 +1812,15 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
else
sp[tempid].skill = (EQ::skills::SkillType) tmp_skill;
sp[tempid].zonetype=atoi(row[101]);
sp[tempid].EnvironmentType=atoi(row[102]);
sp[tempid].TimeOfDay=atoi(row[103]);
sp[tempid].zone_type=atoi(row[101]);
sp[tempid].environment_type=atoi(row[102]);
sp[tempid].time_of_day=atoi(row[103]);
for(y=0; y < PLAYER_CLASS_COUNT;y++)
sp[tempid].classes[y]=atoi(row[104+y]);
sp[tempid].CastingAnim=atoi(row[120]);
sp[tempid].SpellAffectIndex=atoi(row[123]);
sp[tempid].casting_animation=atoi(row[120]);
sp[tempid].spell_affect_index=atoi(row[123]);
sp[tempid].disallow_sit=atoi(row[124]);
sp[tempid].deity_agnostic=atoi(row[125]);
@@ -1829,32 +1829,32 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].new_icon=atoi(row[144]);
sp[tempid].uninterruptable=atoi(row[146]) != 0;
sp[tempid].ResistDiff=atoi(row[147]);
sp[tempid].dot_stacking_exempt = atoi(row[148]) != 0;
sp[tempid].RecourseLink = atoi(row[150]);
sp[tempid].resist_difficulty=atoi(row[147]);
sp[tempid].unstackable_dot = atoi(row[148]) != 0;
sp[tempid].recourse_link = atoi(row[150]);
sp[tempid].no_partial_resist = atoi(row[151]) != 0;
sp[tempid].short_buff_box = atoi(row[154]);
sp[tempid].descnum = atoi(row[155]);
sp[tempid].typedescnum = atoi(row[156]);
sp[tempid].effectdescnum = atoi(row[157]);
sp[tempid].description_id = atoi(row[155]);
sp[tempid].type_description_id = atoi(row[156]);
sp[tempid].effect_description_id = atoi(row[157]);
sp[tempid].npc_no_los = atoi(row[159]) != 0;
sp[tempid].feedbackable = atoi(row[160]) != 0;
sp[tempid].reflectable = atoi(row[161]) != 0;
sp[tempid].bonushate=atoi(row[162]);
sp[tempid].bonus_hate=atoi(row[162]);
sp[tempid].ldon_trap = atoi(row[165]) != 0;
sp[tempid].EndurCost=atoi(row[166]);
sp[tempid].EndurTimerIndex=atoi(row[167]);
sp[tempid].IsDisciplineBuff = atoi(row[168]) != 0;
sp[tempid].HateAdded=atoi(row[173]);
sp[tempid].EndurUpkeep=atoi(row[174]);
sp[tempid].numhitstype = atoi(row[175]);
sp[tempid].numhits = atoi(row[176]);
sp[tempid].pvpresistbase=atoi(row[177]);
sp[tempid].pvpresistcalc=atoi(row[178]);
sp[tempid].pvpresistcap=atoi(row[179]);
sp[tempid].endurance_cost=atoi(row[166]);
sp[tempid].timer_id=atoi(row[167]);
sp[tempid].is_discipline = atoi(row[168]) != 0;
sp[tempid].hate_added=atoi(row[173]);
sp[tempid].endurance_upkeep=atoi(row[174]);
sp[tempid].hit_number_type = atoi(row[175]);
sp[tempid].hit_number = atoi(row[176]);
sp[tempid].pvp_resist_base=atoi(row[177]);
sp[tempid].pvp_resist_per_level=atoi(row[178]);
sp[tempid].pvp_resist_cap=atoi(row[179]);
sp[tempid].spell_category=atoi(row[180]);
sp[tempid].pvp_duration = atoi(row[181]);
sp[tempid].pvp_duration_cap = atoi(row[182]);
@@ -1862,11 +1862,11 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].cast_not_standing = atoi(row[184]) != 0;
sp[tempid].can_mgb=atoi(row[185]);
sp[tempid].dispel_flag = atoi(row[186]);
sp[tempid].MinResist = atoi(row[189]);
sp[tempid].MaxResist = atoi(row[190]);
sp[tempid].min_resist = atoi(row[189]);
sp[tempid].max_resist = atoi(row[190]);
sp[tempid].viral_targets = atoi(row[191]);
sp[tempid].viral_timer = atoi(row[192]);
sp[tempid].NimbusEffect = atoi(row[193]);
sp[tempid].nimbus_effect = atoi(row[193]);
sp[tempid].directional_start = static_cast<float>(atoi(row[194]));
sp[tempid].directional_end = static_cast<float>(atoi(row[195]));
sp[tempid].sneak = atoi(row[196]) != 0;
@@ -1874,29 +1874,29 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
sp[tempid].no_detrimental_spell_aggro = atoi(row[198]) != 0;
sp[tempid].suspendable = atoi(row[200]) != 0;
sp[tempid].viral_range = atoi(row[201]);
sp[tempid].songcap = atoi(row[202]);
sp[tempid].song_cap = atoi(row[202]);
sp[tempid].no_block = atoi(row[205]);
sp[tempid].spellgroup=atoi(row[207]);
sp[tempid].spell_group=atoi(row[207]);
sp[tempid].rank = atoi(row[208]);
sp[tempid].no_resist=atoi(row[209]);
sp[tempid].CastRestriction = atoi(row[211]);
sp[tempid].AllowRest = atoi(row[212]) != 0;
sp[tempid].InCombat = atoi(row[213]) != 0;
sp[tempid].OutofCombat = atoi(row[214]) != 0;
sp[tempid].cast_restriction = atoi(row[211]);
sp[tempid].allow_rest = atoi(row[212]) != 0;
sp[tempid].can_cast_in_combat = atoi(row[213]) != 0;
sp[tempid].can_cast_out_of_combat = atoi(row[214]) != 0;
sp[tempid].override_crit_chance = atoi(row[217]);
sp[tempid].aemaxtargets = atoi(row[218]);
sp[tempid].aoe_max_targets = atoi(row[218]);
sp[tempid].no_heal_damage_item_mod = atoi(row[219]);
sp[tempid].caster_requirement_id = atoi(row[220]);
sp[tempid].spell_class = atoi(row[221]);
sp[tempid].spell_subclass = atoi(row[222]);
sp[tempid].persistdeath = atoi(row[224]) != 0;
sp[tempid].min_dist = atof(row[227]);
sp[tempid].min_dist_mod = atof(row[228]);
sp[tempid].max_dist = atof(row[229]);
sp[tempid].max_dist_mod = atof(row[230]);
sp[tempid].persist_death = atoi(row[224]) != 0;
sp[tempid].min_distance = atof(row[227]);
sp[tempid].min_distance_mod = atof(row[228]);
sp[tempid].max_distance = atof(row[229]);
sp[tempid].max_distance_mod = atof(row[230]);
sp[tempid].min_range = static_cast<float>(atoi(row[231]));
sp[tempid].no_remove = atoi(row[232]) != 0;
sp[tempid].DamageShieldType = 0;
sp[tempid].damage_shield_type = 0;
}
LoadDamageShieldTypes(sp, max_spells);
+162 -162
View File
@@ -87,7 +87,7 @@
bool IsTargetableAESpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && spells[spell_id].targettype == ST_AETarget) {
if (IsValidSpell(spell_id) && spells[spell_id].target_type == ST_AETarget) {
return true;
}
@@ -103,8 +103,8 @@ bool IsLifetapSpell(uint16 spell_id)
{
// Ancient Lifebane: 2115
if (IsValidSpell(spell_id) &&
(spells[spell_id].targettype == ST_Tap ||
spells[spell_id].targettype == ST_TargetAETap ||
(spells[spell_id].target_type == ST_Tap ||
spells[spell_id].target_type == ST_TargetAETap ||
spell_id == 2115))
return true;
@@ -124,7 +124,7 @@ bool IsStunSpell(uint16 spell_id)
bool IsSummonSpell(uint16 spellid)
{
for (int o = 0; o < EFFECT_COUNT; o++) {
uint32 tid = spells[spellid].effectid[o];
uint32 tid = spells[spellid].effect_id[o];
if (tid == SE_SummonPet || tid == SE_SummonItem || tid == SE_SummonPC)
return true;
}
@@ -140,10 +140,10 @@ bool IsEvacSpell(uint16 spellid)
bool IsDamageSpell(uint16 spellid)
{
for (int o = 0; o < EFFECT_COUNT; o++) {
uint32 tid = spells[spellid].effectid[o];
uint32 tid = spells[spellid].effect_id[o];
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) &&
spells[spellid].targettype != ST_Tap && spells[spellid].buffduration < 1 &&
spells[spellid].base[o] < 0)
spells[spellid].target_type != ST_Tap && spells[spellid].buff_duration < 1 &&
spells[spellid].base_value[o] < 0)
return true;
}
@@ -163,8 +163,8 @@ bool IsCureSpell(uint16 spell_id)
bool CureEffect = false;
for(int i = 0; i < EFFECT_COUNT; i++){
if (sp.effectid[i] == SE_DiseaseCounter || sp.effectid[i] == SE_PoisonCounter
|| sp.effectid[i] == SE_CurseCounter || sp.effectid[i] == SE_CorruptionCounter)
if (sp.effect_id[i] == SE_DiseaseCounter || sp.effect_id[i] == SE_PoisonCounter
|| sp.effect_id[i] == SE_CurseCounter || sp.effect_id[i] == SE_CorruptionCounter)
CureEffect = true;
}
@@ -179,8 +179,8 @@ bool IsSlowSpell(uint16 spell_id)
const SPDat_Spell_Struct &sp = spells[spell_id];
for(int i = 0; i < EFFECT_COUNT; i++)
if ((sp.effectid[i] == SE_AttackSpeed && sp.base[i] < 100) ||
(sp.effectid[i] == SE_AttackSpeed4))
if ((sp.effect_id[i] == SE_AttackSpeed && sp.base_value[i] < 100) ||
(sp.effect_id[i] == SE_AttackSpeed4))
return true;
return false;
@@ -191,8 +191,8 @@ bool IsHasteSpell(uint16 spell_id)
const SPDat_Spell_Struct &sp = spells[spell_id];
for(int i = 0; i < EFFECT_COUNT; i++)
if(sp.effectid[i] == SE_AttackSpeed)
return (sp.base[i] < 100);
if(sp.effect_id[i] == SE_AttackSpeed)
return (sp.base_value[i] < 100);
return false;
}
@@ -210,7 +210,7 @@ bool IsPercentalHealSpell(uint16 spell_id)
bool IsGroupOnlySpell(uint16 spell_id)
{
return IsValidSpell(spell_id) && spells[spell_id].goodEffect == 2;
return IsValidSpell(spell_id) && spells[spell_id].good_effect == 2;
}
bool IsBeneficialSpell(uint16 spell_id)
@@ -219,10 +219,10 @@ bool IsBeneficialSpell(uint16 spell_id)
return false;
// You'd think just checking goodEffect flag would be enough?
if (spells[spell_id].goodEffect == 1) {
if (spells[spell_id].good_effect == 1) {
// If the target type is ST_Self or ST_Pet and is a SE_CancleMagic spell
// it is not Beneficial
SpellTargetType tt = spells[spell_id].targettype;
SpellTargetType tt = spells[spell_id].target_type;
if (tt != ST_Self && tt != ST_Pet &&
IsEffectInSpell(spell_id, SE_CancelMagic))
return false;
@@ -231,14 +231,14 @@ bool IsBeneficialSpell(uint16 spell_id)
// We need to check more things!
if (tt == ST_Target || tt == ST_AETarget || tt == ST_Animal ||
tt == ST_Undead || tt == ST_Pet) {
uint16 sai = spells[spell_id].SpellAffectIndex;
uint16 sai = spells[spell_id].spell_affect_index;
// If the resisttype is magic and SpellAffectIndex is Calm/memblur/dispell sight
// it's not beneficial
if (spells[spell_id].resisttype == RESIST_MAGIC) {
if (spells[spell_id].resist_type == RESIST_MAGIC) {
// checking these SAI cause issues with the rng defensive proc line
// So I guess instead of fixing it for real, just a quick hack :P
if (spells[spell_id].effectid[0] != SE_DefensiveProc &&
if (spells[spell_id].effect_id[0] != SE_DefensiveProc &&
(sai == SAI_Calm || sai == SAI_Dispell_Sight || sai == SAI_Memory_Blur ||
sai == SAI_Calm_Song))
return false;
@@ -252,7 +252,7 @@ bool IsBeneficialSpell(uint16 spell_id)
}
// And finally, if goodEffect is not 0 or if it's a group spell it's beneficial
return spells[spell_id].goodEffect != 0 || IsGroupSpell(spell_id);
return spells[spell_id].good_effect != 0 || IsGroupSpell(spell_id);
}
bool IsDetrimentalSpell(uint16 spell_id)
@@ -364,8 +364,8 @@ bool IsImprovedDamageSpell(uint16 spell_id)
bool IsAEDurationSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) &&
(spells[spell_id].targettype == ST_AETarget || spells[spell_id].targettype == ST_UndeadAE) &&
spells[spell_id].AEDuration != 0)
(spells[spell_id].target_type == ST_AETarget || spells[spell_id].target_type == ST_UndeadAE) &&
spells[spell_id].aoe_duration != 0)
return true;
return false;
@@ -383,7 +383,7 @@ bool IsPureNukeSpell(uint16 spell_id)
effect_count++;
if (effect_count == 1 && IsEffectInSpell(spell_id, SE_CurrentHP) &&
spells[spell_id].buffduration == 0 && IsDamageSpell(spell_id))
spells[spell_id].buff_duration == 0 && IsDamageSpell(spell_id))
return true;
return false;
@@ -392,7 +392,7 @@ bool IsPureNukeSpell(uint16 spell_id)
bool IsAENukeSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) &&
spells[spell_id].aoerange > 0)
spells[spell_id].aoe_range > 0)
return true;
return false;
@@ -401,7 +401,7 @@ bool IsAENukeSpell(uint16 spell_id)
bool IsPBAENukeSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) &&
spells[spell_id].aoerange > 0 && spells[spell_id].targettype == ST_AECaster)
spells[spell_id].aoe_range > 0 && spells[spell_id].target_type == ST_AECaster)
return true;
return false;
@@ -410,7 +410,7 @@ bool IsPBAENukeSpell(uint16 spell_id)
bool IsAERainNukeSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) &&
spells[spell_id].aoerange > 0 && spells[spell_id].AEDuration > 1000)
spells[spell_id].aoe_range > 0 && spells[spell_id].aoe_duration > 1000)
return true;
return false;
@@ -424,12 +424,12 @@ bool IsPartialCapableSpell(uint16 spell_id)
// spell uses 600 (partial) scale if first effect is damage, else it uses 200 scale.
// this includes DoTs. no_partial_resist excludes spells like necro snares
for (int o = 0; o < EFFECT_COUNT; o++) {
auto tid = spells[spell_id].effectid[o];
auto tid = spells[spell_id].effect_id[o];
if (IsBlankSpellEffect(spell_id, o))
continue;
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) && spells[spell_id].base[o] < 0)
if ((tid == SE_CurrentHPOnce || tid == SE_CurrentHP) && spells[spell_id].base_value[o] < 0)
return true;
return false;
@@ -452,9 +452,9 @@ bool IsResistableSpell(uint16 spell_id)
bool IsGroupSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) &&
(spells[spell_id].targettype == ST_AEBard ||
spells[spell_id].targettype == ST_Group ||
spells[spell_id].targettype == ST_GroupTeleport))
(spells[spell_id].target_type == ST_AEBard ||
spells[spell_id].target_type == ST_Group ||
spells[spell_id].target_type == ST_GroupTeleport))
return true;
return false;
@@ -464,7 +464,7 @@ bool IsGroupSpell(uint16 spell_id)
bool IsTGBCompatibleSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) &&
(!IsDetrimentalSpell(spell_id) && spells[spell_id].buffduration != 0 &&
(!IsDetrimentalSpell(spell_id) && spells[spell_id].buff_duration != 0 &&
!IsBardSong(spell_id) && !IsEffectInSpell(spell_id, SE_Illusion)))
return true;
@@ -473,7 +473,7 @@ bool IsTGBCompatibleSpell(uint16 spell_id)
bool IsBardSong(uint16 spell_id)
{
if (IsValidSpell(spell_id) && spells[spell_id].classes[BARD - 1] < 255 && !spells[spell_id].IsDisciplineBuff)
if (IsValidSpell(spell_id) && spells[spell_id].classes[BARD - 1] < 255 && !spells[spell_id].is_discipline)
return true;
return false;
@@ -487,7 +487,7 @@ bool IsEffectInSpell(uint16 spellid, int effect)
return false;
for (j = 0; j < EFFECT_COUNT; j++)
if (spells[spellid].effectid[j] == effect)
if (spells[spellid].effect_id[j] == effect)
return true;
return false;
@@ -498,15 +498,15 @@ bool IsEffectInSpell(uint16 spellid, int effect)
// the blanks
bool IsBlankSpellEffect(uint16 spellid, int effect_index)
{
int effect, base, formula;
int effect, base_value, formula;
effect = spells[spellid].effectid[effect_index];
base = spells[spellid].base[effect_index];
effect = spells[spellid].effect_id[effect_index];
base_value = spells[spellid].base_value[effect_index];
formula = spells[spellid].formula[effect_index];
// SE_CHA is "spacer"
// SE_Stacking* are also considered blank where this is used
if (effect == SE_Blank || (effect == SE_CHA && base == 0 && formula == 100) ||
if (effect == SE_Blank || (effect == SE_CHA && base_value == 0 && formula == 100) ||
effect == SE_StackingCommand_Block || effect == SE_StackingCommand_Overwrite)
return true;
@@ -561,7 +561,7 @@ int GetSpellEffectIndex(uint16 spell_id, int effect)
return -1;
for (i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == effect)
if (spells[spell_id].effect_id[i] == effect)
return i;
return -1;
@@ -591,7 +591,7 @@ bool BeneficialSpell(uint16 spell_id)
/*|| spells[spell_id].stacking == 27*/ )
return true;
switch (spells[spell_id].goodEffect) {
switch (spells[spell_id].good_effect) {
case 1:
case 3:
return true;
@@ -602,7 +602,7 @@ bool BeneficialSpell(uint16 spell_id)
bool GroupOnlySpell(uint16 spell_id)
{
switch (spells[spell_id].goodEffect) {
switch (spells[spell_id].good_effect) {
case 2:
case 3:
return true;
@@ -623,9 +623,9 @@ int32 CalculatePoisonCounters(uint16 spell_id)
int32 Counters = 0;
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_PoisonCounter &&
spells[spell_id].base[i] > 0)
Counters += spells[spell_id].base[i];
if (spells[spell_id].effect_id[i] == SE_PoisonCounter &&
spells[spell_id].base_value[i] > 0)
Counters += spells[spell_id].base_value[i];
return Counters;
}
@@ -637,9 +637,9 @@ int32 CalculateDiseaseCounters(uint16 spell_id)
int32 Counters = 0;
for (int i = 0; i < EFFECT_COUNT; i++)
if(spells[spell_id].effectid[i] == SE_DiseaseCounter &&
spells[spell_id].base[i] > 0)
Counters += spells[spell_id].base[i];
if(spells[spell_id].effect_id[i] == SE_DiseaseCounter &&
spells[spell_id].base_value[i] > 0)
Counters += spells[spell_id].base_value[i];
return Counters;
}
@@ -651,9 +651,9 @@ int32 CalculateCurseCounters(uint16 spell_id)
int32 Counters = 0;
for (int i = 0; i < EFFECT_COUNT; i++)
if(spells[spell_id].effectid[i] == SE_CurseCounter &&
spells[spell_id].base[i] > 0)
Counters += spells[spell_id].base[i];
if(spells[spell_id].effect_id[i] == SE_CurseCounter &&
spells[spell_id].base_value[i] > 0)
Counters += spells[spell_id].base_value[i];
return Counters;
}
@@ -665,9 +665,9 @@ int32 CalculateCorruptionCounters(uint16 spell_id)
int32 Counters = 0;
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_CorruptionCounter &&
spells[spell_id].base[i] > 0)
Counters += spells[spell_id].base[i];
if (spells[spell_id].effect_id[i] == SE_CorruptionCounter &&
spells[spell_id].base_value[i] > 0)
Counters += spells[spell_id].base_value[i];
return Counters;
}
@@ -695,7 +695,7 @@ bool IsDisciplineBuff(uint16 spell_id)
if (!IsValidSpell(spell_id))
return false;
if (spells[spell_id].IsDisciplineBuff && spells[spell_id].targettype == ST_Self)
if (spells[spell_id].is_discipline && spells[spell_id].target_type == ST_Self)
return true;
return false;
@@ -707,7 +707,7 @@ bool IsDiscipline(uint16 spell_id)
return false;
if (spells[spell_id].mana == 0 &&
(spells[spell_id].EndurCost || spells[spell_id].EndurUpkeep))
(spells[spell_id].endurance_cost || spells[spell_id].endurance_upkeep))
return true;
return false;
@@ -719,7 +719,7 @@ bool IsCombatSkill(uint16 spell_id)
return false;
//Check if Discipline
if ((spells[spell_id].mana == 0 && (spells[spell_id].EndurCost || spells[spell_id].EndurUpkeep)))
if ((spells[spell_id].mana == 0 && (spells[spell_id].endurance_cost || spells[spell_id].endurance_upkeep)))
return true;
return false;
@@ -738,7 +738,7 @@ bool IsRuneSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id))
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_Rune)
if (spells[spell_id].effect_id[i] == SE_Rune)
return true;
return false;
@@ -748,7 +748,7 @@ bool IsMagicRuneSpell(uint16 spell_id)
{
if(IsValidSpell(spell_id))
for(int i = 0; i < EFFECT_COUNT; i++)
if(spells[spell_id].effectid[i] == SE_AbsorbMagicAtt)
if(spells[spell_id].effect_id[i] == SE_AbsorbMagicAtt)
return true;
return false;
@@ -758,8 +758,8 @@ bool IsManaTapSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id))
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_CurrentMana &&
spells[spell_id].targettype == ST_Tap)
if (spells[spell_id].effect_id[i] == SE_CurrentMana &&
spells[spell_id].target_type == ST_Tap)
return true;
return false;
@@ -788,8 +788,8 @@ bool IsPartialDeathSaveSpell(uint16 spell_id)
return false;
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_DeathSave &&
spells[spell_id].base[i] == 1)
if (spells[spell_id].effect_id[i] == SE_DeathSave &&
spells[spell_id].base_value[i] == 1)
return true;
return false;
@@ -802,8 +802,8 @@ bool IsFullDeathSaveSpell(uint16 spell_id)
return false;
for (int i = 0; i < EFFECT_COUNT; i++)
if (spells[spell_id].effectid[i] == SE_DeathSave &&
spells[spell_id].base[i] == 2)
if (spells[spell_id].effect_id[i] == SE_DeathSave &&
spells[spell_id].base_value[i] == 2)
return true;
return false;
@@ -852,7 +852,7 @@ bool IsGateSpell(uint16 spell_id)
bool IsPlayerIllusionSpell(uint16 spell_id)
{
if (IsEffectInSpell(spell_id, SE_Illusion) &&
spells[spell_id].targettype == ST_Self)
spells[spell_id].target_type == ST_Self)
return true;
return false;
@@ -861,7 +861,7 @@ bool IsPlayerIllusionSpell(uint16 spell_id)
int GetSpellEffectDescNum(uint16 spell_id)
{
if (IsValidSpell(spell_id))
return spells[spell_id].effectdescnum;
return spells[spell_id].effect_description_id;
return -1;
}
@@ -872,12 +872,12 @@ DmgShieldType GetDamageShieldType(uint16 spell_id, int32 DSType)
// else, make a guess, based on the resist type. Default return value is DS_THORNS
if (IsValidSpell(spell_id)) {
LogSpells("DamageShieldType for spell [{}] ([{}]) is [{}]", spell_id,
spells[spell_id].name, spells[spell_id].DamageShieldType);
spells[spell_id].name, spells[spell_id].damage_shield_type);
if (spells[spell_id].DamageShieldType)
return (DmgShieldType) spells[spell_id].DamageShieldType;
if (spells[spell_id].damage_shield_type)
return (DmgShieldType) spells[spell_id].damage_shield_type;
switch (spells[spell_id].resisttype) {
switch (spells[spell_id].resist_type) {
case RESIST_COLD:
return DS_TORMENT;
case RESIST_FIRE:
@@ -907,12 +907,12 @@ bool IsLDoNObjectSpell(uint16 spell_id)
int32 GetSpellResistType(uint16 spell_id)
{
return spells[spell_id].resisttype;
return spells[spell_id].resist_type;
}
int32 GetSpellTargetType(uint16 spell_id)
{
return (int32)spells[spell_id].targettype;
return (int32)spells[spell_id].target_type;
}
bool IsHealOverTimeSpell(uint16 spell_id)
@@ -937,7 +937,7 @@ bool IsFastHealSpell(uint16 spell_id)
const int MaxFastHealCastingTime = 2000;
if (spells[spell_id].cast_time <= MaxFastHealCastingTime &&
spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
spells[spell_id].effect_id[0] == 0 && spells[spell_id].base_value[0] > 0 &&
!IsGroupSpell(spell_id))
return true;
@@ -949,7 +949,7 @@ bool IsVeryFastHealSpell(uint16 spell_id)
const int MaxFastHealCastingTime = 1000;
if (spells[spell_id].cast_time <= MaxFastHealCastingTime &&
spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
spells[spell_id].effect_id[0] == 0 && spells[spell_id].base_value[0] > 0 &&
!IsGroupSpell(spell_id))
return true;
@@ -958,8 +958,8 @@ bool IsVeryFastHealSpell(uint16 spell_id)
bool IsRegularSingleTargetHealSpell(uint16 spell_id)
{
if(spells[spell_id].effectid[0] == 0 && spells[spell_id].base[0] > 0 &&
spells[spell_id].targettype == ST_Target && spells[spell_id].buffduration == 0 &&
if(spells[spell_id].effect_id[0] == 0 && spells[spell_id].base_value[0] > 0 &&
spells[spell_id].target_type == ST_Target && spells[spell_id].buff_duration == 0 &&
!IsCompleteHealSpell(spell_id) &&
!IsHealOverTimeSpell(spell_id) && !IsGroupSpell(spell_id))
return true;
@@ -985,7 +985,7 @@ bool IsGroupCompleteHealSpell(uint16 spell_id)
bool IsGroupHealOverTimeSpell(uint16 spell_id)
{
if( IsGroupSpell(spell_id) && IsHealOverTimeSpell(spell_id) && spells[spell_id].buffduration < 10)
if( IsGroupSpell(spell_id) && IsHealOverTimeSpell(spell_id) && spells[spell_id].buff_duration < 10)
return true;
return false;
@@ -1016,8 +1016,8 @@ bool IsResistDebuffSpell(uint16 spell_id)
bool IsSelfConversionSpell(uint16 spell_id)
{
if (GetSpellTargetType(spell_id) == ST_Self && IsEffectInSpell(spell_id, SE_CurrentMana) &&
IsEffectInSpell(spell_id, SE_CurrentHP) && spells[spell_id].base[GetSpellEffectIndex(spell_id, SE_CurrentMana)] > 0 &&
spells[spell_id].base[GetSpellEffectIndex(spell_id, SE_CurrentHP)] < 0)
IsEffectInSpell(spell_id, SE_CurrentHP) && spells[spell_id].base_value[GetSpellEffectIndex(spell_id, SE_CurrentMana)] > 0 &&
spells[spell_id].base_value[GetSpellEffectIndex(spell_id, SE_CurrentHP)] < 0)
return true;
else
return false;
@@ -1026,7 +1026,7 @@ bool IsSelfConversionSpell(uint16 spell_id)
// returns true for both detrimental and beneficial buffs
bool IsBuffSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && (spells[spell_id].buffduration || spells[spell_id].buffdurationformula))
if (IsValidSpell(spell_id) && (spells[spell_id].buff_duration || spells[spell_id].buff_duration_formula))
return true;
return false;
@@ -1034,7 +1034,7 @@ bool IsBuffSpell(uint16 spell_id)
bool IsPersistDeathSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) && spells[spell_id].persistdeath)
if (IsValidSpell(spell_id) && spells[spell_id].persist_death)
return true;
return false;
@@ -1051,8 +1051,8 @@ bool IsSuspendableSpell(uint16 spell_id)
uint32 GetMorphTrigger(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_CastOnFadeEffect)
return spells[spell_id].base[i];
if (spells[spell_id].effect_id[i] == SE_CastOnFadeEffect)
return spells[spell_id].base_value[i];
return 0;
}
@@ -1060,9 +1060,9 @@ uint32 GetMorphTrigger(uint32 spell_id)
bool IsCastonFadeDurationSpell(uint16 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i) {
if (spells[spell_id].effectid[i] == SE_CastOnFadeEffect
|| spells[spell_id].effectid[i] == SE_CastOnFadeEffectNPC
|| spells[spell_id].effectid[i] == SE_CastOnFadeEffectAlways){
if (spells[spell_id].effect_id[i] == SE_CastOnFadeEffect
|| spells[spell_id].effect_id[i] == SE_CastOnFadeEffectNPC
|| spells[spell_id].effect_id[i] == SE_CastOnFadeEffectAlways){
return true;
}
@@ -1073,7 +1073,7 @@ bool IsCastonFadeDurationSpell(uint16 spell_id)
bool IsPowerDistModSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id) &&
(spells[spell_id].max_dist_mod || spells[spell_id].min_dist_mod) && spells[spell_id].max_dist > spells[spell_id].min_dist)
(spells[spell_id].max_distance_mod || spells[spell_id].min_distance_mod) && spells[spell_id].max_distance > spells[spell_id].min_distance)
return true;
return false;
@@ -1082,8 +1082,8 @@ bool IsPowerDistModSpell(uint16 spell_id)
uint32 GetPartialMeleeRuneReduction(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_MitigateMeleeDamage)
return spells[spell_id].base[i];
if (spells[spell_id].effect_id[i] == SE_MitigateMeleeDamage)
return spells[spell_id].base_value[i];
return 0;
}
@@ -1091,8 +1091,8 @@ uint32 GetPartialMeleeRuneReduction(uint32 spell_id)
uint32 GetPartialMagicRuneReduction(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_MitigateSpellDamage)
return spells[spell_id].base[i];
if (spells[spell_id].effect_id[i] == SE_MitigateSpellDamage)
return spells[spell_id].base_value[i];
return 0;
}
@@ -1100,8 +1100,8 @@ uint32 GetPartialMagicRuneReduction(uint32 spell_id)
uint32 GetPartialMeleeRuneAmount(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_MitigateMeleeDamage)
return spells[spell_id].max[i];
if (spells[spell_id].effect_id[i] == SE_MitigateMeleeDamage)
return spells[spell_id].max_value[i];
return 0;
}
@@ -1109,8 +1109,8 @@ uint32 GetPartialMeleeRuneAmount(uint32 spell_id)
uint32 GetPartialMagicRuneAmount(uint32 spell_id)
{
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_MitigateSpellDamage)
return spells[spell_id].max[i];
if (spells[spell_id].effect_id[i] == SE_MitigateSpellDamage)
return spells[spell_id].max_value[i];
return 0;
}
@@ -1119,7 +1119,7 @@ uint32 GetPartialMagicRuneAmount(uint32 spell_id)
bool DetrimentalSpellAllowsRest(uint16 spell_id)
{
if (IsValidSpell(spell_id))
return spells[spell_id].AllowRest;
return spells[spell_id].allow_rest;
return false;
}
@@ -1138,7 +1138,7 @@ bool IsStackableDot(uint16 spell_id)
if (!IsValidSpell(spell_id))
return false;
const auto &spell = spells[spell_id];
if (spell.dot_stacking_exempt || spell.goodEffect || !spell.buffdurationformula)
if (spell.unstackable_dot || spell.good_effect || !spell.buff_duration_formula)
return false;
return IsEffectInSpell(spell_id, SE_CurrentHP) || IsEffectInSpell(spell_id, SE_GravityEffect);
}
@@ -1307,7 +1307,7 @@ bool IsFocusLimit(int spa)
uint32 GetNimbusEffect(uint16 spell_id)
{
if (IsValidSpell(spell_id))
return (int32)spells[spell_id].NimbusEffect;
return (int32)spells[spell_id].nimbus_effect;
return 0;
}
@@ -1321,9 +1321,9 @@ int32 GetFuriousBash(uint16 spell_id)
int32 mod = 0;
for (int i = 0; i < EFFECT_COUNT; ++i)
if (spells[spell_id].effectid[i] == SE_SpellHateMod)
mod = spells[spell_id].base[i];
else if (spells[spell_id].effectid[i] == SE_LimitEffect && spells[spell_id].base[i] == 999)
if (spells[spell_id].effect_id[i] == SE_SpellHateMod)
mod = spells[spell_id].base_value[i];
else if (spells[spell_id].effect_id[i] == SE_LimitEffect && spells[spell_id].base_value[i] == 999)
found_effect_limit = true;
if (found_effect_limit)
@@ -1344,8 +1344,8 @@ bool IsSpellUsableThisZoneType(uint16 spell_id, uint8 zone_type)
{
//check if spell can be cast in any zone (-1 or 255), then if spell zonetype matches zone's zonetype
// || spells[spell_id].zonetype == 255 comparing signed 8 bit int to 255 is always false
if (IsValidSpell(spell_id) && (spells[spell_id].zonetype == -1 ||
spells[spell_id].zonetype == zone_type))
if (IsValidSpell(spell_id) && (spells[spell_id].zone_type == -1 ||
spells[spell_id].zone_type == zone_type))
return true;
return false;
@@ -1358,11 +1358,11 @@ const char* GetSpellName(uint16 spell_id)
bool SpellRequiresTarget(int spell_id)
{
if (spells[spell_id].targettype == ST_AEClientV1 ||
spells[spell_id].targettype == ST_Self ||
spells[spell_id].targettype == ST_AECaster ||
spells[spell_id].targettype == ST_Ring ||
spells[spell_id].targettype == ST_Beam) {
if (spells[spell_id].target_type == ST_AEClientV1 ||
spells[spell_id].target_type == ST_Self ||
spells[spell_id].target_type == ST_AECaster ||
spells[spell_id].target_type == ST_Ring ||
spells[spell_id].target_type == ST_Beam) {
return false;
}
return true;
@@ -1377,7 +1377,7 @@ bool IsInstrumentModAppliedToSpellEffect(int32 spell_id, int effect)
//Only modify instant endurance or mana effects (Ie. Mana drain, Crescendo line)
case SE_CurrentEndurance:
case SE_CurrentMana: {
if (spells[spell_id].buffduration == 0) {
if (spells[spell_id].buff_duration == 0) {
return true;
}
//Mana regen is not modified.
@@ -1483,94 +1483,94 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot)
}
if (slot < 12) {
if (id == "base") { return spells[spell_id].base[slot]; }
else if (id == "base2") { return spells[spell_id].base2[slot]; }
else if (id == "max") { return spells[spell_id].max[slot]; }
if (id == "base") { return spells[spell_id].base_value[slot]; }
else if (id == "base2") { return spells[spell_id].limit_value[slot]; }
else if (id == "max") { return spells[spell_id].max_value[slot]; }
else if (id == "formula") { return spells[spell_id].formula[slot]; }
else if (id == "effectid") { return spells[spell_id].effectid[slot]; }
else if (id == "effectid") { return spells[spell_id].effect_id[slot]; }
}
if (slot < 4) {
if (id == "components") { return spells[spell_id].components[slot]; }
else if (id == "component_counts") { return spells[spell_id].component_counts[slot]; }
else if (id == "noexpendreagent") { return spells[spell_id].NoexpendReagent[slot]; }
if (id == "components") { return spells[spell_id].component[slot]; }
else if (id == "component_counts") { return spells[spell_id].component_count[slot]; }
else if (id == "noexpendreagent") { return spells[spell_id].no_expend_reagent[slot]; }
}
if (id == "range") { return static_cast<int32>(spells[spell_id].range); }
else if (id == "aoerange") { return static_cast<int32>(spells[spell_id].aoerange); }
else if (id == "pushback") { return static_cast<int32>(spells[spell_id].pushback); }
else if (id == "pushup") { return static_cast<int32>(spells[spell_id].pushup); }
else if (id == "aoe_range") { return static_cast<int32>(spells[spell_id].aoe_range); }
else if (id == "push_back") { return static_cast<int32>(spells[spell_id].push_back); }
else if (id == "push_up") { return static_cast<int32>(spells[spell_id].push_up); }
else if (id == "cast_time") { return spells[spell_id].cast_time; }
else if (id == "recovery_time") { return spells[spell_id].recovery_time; }
else if (id == "recast_time") { return spells[spell_id].recast_time; }
else if (id == "buffdurationformula") { return spells[spell_id].buffdurationformula; }
else if (id == "buffduration") { return spells[spell_id].buffduration; }
else if (id == "aeduration") { return spells[spell_id].AEDuration; }
else if (id == "buff_duration_formula") { return spells[spell_id].buff_duration_formula; }
else if (id == "buff_duration") { return spells[spell_id].buff_duration; }
else if (id == "aeduration") { return spells[spell_id].aoe_duration; }
else if (id == "mana") { return spells[spell_id].mana; }
//else if (id == "LightType") {stat = spells[spell_id].LightType; } - Not implemented
else if (id == "goodeffect") { return spells[spell_id].goodEffect; }
else if (id == "activated") { return spells[spell_id].Activated; }
else if (id == "resisttype") { return spells[spell_id].resisttype; }
else if (id == "targettype") { return spells[spell_id].targettype; }
else if (id == "basediff") { return spells[spell_id].basediff; }
else if (id == "goodeffect") { return spells[spell_id].good_effect; }
else if (id == "activated") { return spells[spell_id].activated; }
else if (id == "resisttype") { return spells[spell_id].resist_type; }
else if (id == "targettype") { return spells[spell_id].target_type; }
else if (id == "basediff") { return spells[spell_id].base_difficulty; }
else if (id == "skill") { return spells[spell_id].skill; }
else if (id == "zonetype") { return spells[spell_id].zonetype; }
else if (id == "environmenttype") { return spells[spell_id].EnvironmentType; }
else if (id == "timeofday") { return spells[spell_id].TimeOfDay; }
else if (id == "castinganim") { return spells[spell_id].CastingAnim; }
else if (id == "spellaffectindex") { return spells[spell_id].SpellAffectIndex; }
else if (id == "zonetype") { return spells[spell_id].zone_type; }
else if (id == "environmenttype") { return spells[spell_id].environment_type; }
else if (id == "timeofday") { return spells[spell_id].time_of_day; }
else if (id == "castinganim") { return spells[spell_id].casting_animation; }
else if (id == "spellaffectindex") { return spells[spell_id].spell_affect_index; }
else if (id == "disallow_sit") { return spells[spell_id].disallow_sit; }
//else if (id == "spellanim") {stat = spells[spell_id].spellanim; } - Not implemented
else if (id == "uninterruptable") { return spells[spell_id].uninterruptable; }
else if (id == "resistdiff") { return spells[spell_id].ResistDiff; }
else if (id == "dot_stacking_exempt") { return spells[spell_id].dot_stacking_exempt; }
else if (id == "recourselink") { return spells[spell_id].RecourseLink; }
else if (id == "resistdiff") { return spells[spell_id].resist_difficulty; }
else if (id == "dot_stacking_exempt") { return spells[spell_id].unstackable_dot; }
else if (id == "recourselink") { return spells[spell_id].recourse_link; }
else if (id == "no_partial_resist") { return spells[spell_id].no_partial_resist; }
else if (id == "short_buff_box") { return spells[spell_id].short_buff_box; }
else if (id == "descnum") { return spells[spell_id].descnum; }
else if (id == "effectdescnum") { return spells[spell_id].effectdescnum; }
else if (id == "descnum") { return spells[spell_id].description_id; }
else if (id == "effectdescnum") { return spells[spell_id].effect_description_id; }
else if (id == "npc_no_los") { return spells[spell_id].npc_no_los; }
else if (id == "feedbackable") { return spells[spell_id].feedbackable; }
else if (id == "reflectable") { return spells[spell_id].reflectable; }
else if (id == "bonushate") { return spells[spell_id].bonushate; }
else if (id == "endurcost") { return spells[spell_id].EndurCost; }
else if (id == "endurtimerindex") { return spells[spell_id].EndurTimerIndex; }
else if (id == "isdisciplinebuff") { return spells[spell_id].IsDisciplineBuff; }
else if (id == "hateadded") { return spells[spell_id].HateAdded; }
else if (id == "endurupkeep") { return spells[spell_id].EndurUpkeep; }
else if (id == "numhitstype") { return spells[spell_id].numhitstype; }
else if (id == "numhits") { return spells[spell_id].numhits; }
else if (id == "pvpresistbase") { return spells[spell_id].pvpresistbase; }
else if (id == "pvpresistcalc") { return spells[spell_id].pvpresistcalc; }
else if (id == "pvpresistcap") { return spells[spell_id].pvpresistcap; }
else if (id == "bonushate") { return spells[spell_id].bonus_hate; }
else if (id == "endurcost") { return spells[spell_id].endurance_cost; }
else if (id == "endurtimerindex") { return spells[spell_id].timer_id; }
else if (id == "isdisciplinebuff") { return spells[spell_id].is_discipline; }
else if (id == "hateadded") { return spells[spell_id].hate_added; }
else if (id == "endurupkeep") { return spells[spell_id].endurance_upkeep; }
else if (id == "numhitstype") { return spells[spell_id].hit_number_type; }
else if (id == "numhits") { return spells[spell_id].hit_number; }
else if (id == "pvpresistbase") { return spells[spell_id].pvp_resist_base; }
else if (id == "pvpresistcalc") { return spells[spell_id].pvp_resist_per_level; }
else if (id == "pvpresistcap") { return spells[spell_id].pvp_resist_cap; }
else if (id == "spell_category") { return spells[spell_id].spell_category; }
else if (id == "can_mgb") { return spells[spell_id].can_mgb; }
else if (id == "dispel_flag") { return spells[spell_id].dispel_flag; }
else if (id == "minresist") { return spells[spell_id].MinResist; }
else if (id == "maxresist") { return spells[spell_id].MaxResist; }
else if (id == "minresist") { return spells[spell_id].min_resist; }
else if (id == "maxresist") { return spells[spell_id].max_resist; }
else if (id == "viral_targets") { return spells[spell_id].viral_targets; }
else if (id == "viral_timer") { return spells[spell_id].viral_timer; }
else if (id == "nimbuseffect") { return spells[spell_id].NimbusEffect; }
else if (id == "nimbuseffect") { return spells[spell_id].nimbus_effect; }
else if (id == "directional_start") { return static_cast<int32>(spells[spell_id].directional_start); }
else if (id == "directional_end") { return static_cast<int32>(spells[spell_id].directional_end); }
else if (id == "not_focusable") { return spells[spell_id].not_focusable; }
else if (id == "suspendable") { return spells[spell_id].suspendable; }
else if (id == "viral_range") { return spells[spell_id].viral_range; }
else if (id == "spellgroup") { return spells[spell_id].spellgroup; }
else if (id == "spellgroup") { return spells[spell_id].spell_group; }
else if (id == "rank") { return spells[spell_id].rank; }
else if (id == "no_resist") { return spells[spell_id].no_resist; }
else if (id == "castrestriction") { return spells[spell_id].CastRestriction; }
else if (id == "allowrest") { return spells[spell_id].AllowRest; }
else if (id == "incombat") { return spells[spell_id].InCombat; }
else if (id == "outofcombat") { return spells[spell_id].OutofCombat; }
else if (id == "aemaxtargets") { return spells[spell_id].aemaxtargets; }
else if (id == "castrestriction") { return spells[spell_id].cast_restriction; }
else if (id == "allowrest") { return spells[spell_id].allow_rest; }
else if (id == "incombat") { return spells[spell_id].can_cast_in_combat; }
else if (id == "outofcombat") { return spells[spell_id].can_cast_out_of_combat; }
else if (id == "aemaxtargets") { return spells[spell_id].aoe_max_targets; }
else if (id == "no_heal_damage_item_mod") { return spells[spell_id].no_heal_damage_item_mod; }
else if (id == "persistdeath") { return spells[spell_id].persistdeath; }
else if (id == "min_dist") { return static_cast<int32>(spells[spell_id].min_dist); }
else if (id == "min_dist_mod") { return static_cast<int32>(spells[spell_id].min_dist_mod); }
else if (id == "max_dist") { return static_cast<int32>(spells[spell_id].max_dist); }
else if (id == "persistdeath") { return spells[spell_id].persist_death; }
else if (id == "min_dist") { return static_cast<int32>(spells[spell_id].min_distance); }
else if (id == "min_dist_mod") { return static_cast<int32>(spells[spell_id].min_distance_mod); }
else if (id == "max_dist") { return static_cast<int32>(spells[spell_id].max_distance); }
else if (id == "min_range") { return static_cast<int32>(spells[spell_id].min_range); }
else if (id == "damageshieldtype") { return spells[spell_id].DamageShieldType; }
else if (id == "damageshieldtype") { return spells[spell_id].damage_shield_type; }
return 0;
}
+60 -60
View File
@@ -561,7 +561,7 @@ const uint32 SPELL_TYPES_INNATE = (SpellType_Nuke | SpellType_Lifetap | SpellTyp
// These should not be used to determine spell category..
// They are a graphical affects (effects?) index only
// TODO: import sai list
enum SpellAffectIndex {
enum spell_affect_index {
SAI_Summon_Mount_Unclass = -1,
SAI_Direct_Damage = 0,
SAI_Heal_Cure = 1,
@@ -1252,44 +1252,44 @@ struct SPDat_Spell_Struct
/* 007 */ char cast_on_other[64]; // Message when spell is cast on someone else -- CASTEDOTHERTXT
/* 008 */ char spell_fades[64]; // Spell fades -- SPELLGONE
/* 009 */ float range; // -- RANGE
/* 010 */ float aoerange; // -- IMPACTRANGE
/* 011 */ float pushback; // -- OUTFORCE
/* 012 */ float pushup; // -- UPFORCE
/* 010 */ float aoe_range; // -- IMPACTRANGE
/* 011 */ float push_back; // -- OUTFORCE
/* 012 */ float push_up; // -- UPFORCE
/* 013 */ uint32 cast_time; // Cast time -- CASTINGTIME
/* 014 */ uint32 recovery_time; // Recovery time -- RECOVERYDELAY
/* 015 */ uint32 recast_time; // Recast same spell time -- SPELLDELAY
/* 016 */ uint32 buffdurationformula; // -- DURATIONBASE
/* 017 */ uint32 buffduration; // -- DURATIONCAP
/* 018 */ uint32 AEDuration; // sentinel, rain of something -- IMPACTDURATION
/* 016 */ uint32 buff_duration_formula; // -- DURATIONBASE
/* 017 */ uint32 buff_duration; // -- DURATIONCAP
/* 018 */ uint32 aoe_duration; // sentinel, rain of something -- IMPACTDURATION
/* 019 */ uint16 mana; // Mana Used -- MANACOST
/* 020 */ int base[EFFECT_COUNT]; //various purposes -- BASEAFFECT1 .. BASEAFFECT12
/* 032 */ int base2[EFFECT_COUNT]; //various purposes -- BASE_EFFECT2_1 ... BASE_EFFECT2_12
/* 044 */ int32 max[EFFECT_COUNT]; // -- AFFECT1CAP ... AFFECT12CAP
/* 020 */ int base_value[EFFECT_COUNT]; //various purposes -- BASEAFFECT1 .. BASEAFFECT12
/* 032 */ int limit_value[EFFECT_COUNT]; //various purposes -- BASE_EFFECT2_1 ... BASE_EFFECT2_12
/* 044 */ int32 max_value[EFFECT_COUNT]; // -- AFFECT1CAP ... AFFECT12CAP
/* 056 */ //uint16 icon; // Spell icon -- IMAGENUMBER
/* 057 */ //uint16 memicon; // Icon on membarthing -- MEMIMAGENUMBER
/* 058 */ int32 components[4]; // reagents -- EXPENDREAGENT1 ... EXPENDREAGENT4
/* 062 */ int component_counts[4]; // amount of regents used -- EXPENDQTY1 ... EXPENDQTY4
/* 066 */ int NoexpendReagent[4]; // focus items (Need but not used; Flame Lick has a Fire Beetle Eye focus.)
/* 058 */ int32 component[4]; // reagents -- EXPENDREAGENT1 ... EXPENDREAGENT4
/* 062 */ int component_count[4]; // amount of regents used -- EXPENDQTY1 ... EXPENDQTY4
/* 066 */ int no_expend_reagent[4]; // focus items (Need but not used; Flame Lick has a Fire Beetle Eye focus.)
// If it is a number between 1-4 it means components[number] is a focus and not to expend it
// If it is a valid itemid it means this item is a focus as well
// -- NOEXPENDREAGENT1 ... NOEXPENDREAGENT4
/* 070 */ uint16 formula[EFFECT_COUNT]; // Spell's value formula -- LEVELAFFECT1MOD ... LEVELAFFECT12MOD
/* 082 */ //int LightType; // probaly another effecttype flag -- LIGHTTYPE
/* 083 */ int8 goodEffect; //0=detrimental, 1=Beneficial, 2=Beneficial, Group Only -- BENEFICIAL
/* 084 */ int Activated; // probably another effecttype flag -- ACTIVATED
/* 085 */ int resisttype; // -- RESISTTYPE
/* 086 */ int effectid[EFFECT_COUNT]; // Spell's effects -- SPELLAFFECT1 ... SPELLAFFECT12
/* 098 */ SpellTargetType targettype; // Spell's Target -- TYPENUMBER
/* 099 */ int basediff; // base difficulty fizzle adjustment -- BASEDIFFICULTY
/* 083 */ int8 good_effect; //0=detrimental, 1=Beneficial, 2=Beneficial, Group Only -- BENEFICIAL
/* 084 */ int activated; // probably another effecttype flag -- ACTIVATED
/* 085 */ int resist_type; // -- RESISTTYPE
/* 086 */ int effect_id[EFFECT_COUNT]; // Spell's effects -- SPELLAFFECT1 ... SPELLAFFECT12
/* 098 */ SpellTargetType target_type; // Spell's Target -- TYPENUMBER
/* 099 */ int base_difficulty; // base difficulty fizzle adjustment -- BASEDIFFICULTY
/* 100 */ EQ::skills::SkillType skill; // -- CASTINGSKILL
/* 101 */ int8 zonetype; // 01=Outdoors, 02=dungeons, ff=Any -- ZONETYPE
/* 102 */ int8 EnvironmentType; // -- ENVIRONMENTTYPE
/* 103 */ int8 TimeOfDay; // -- TIMEOFDAY
/* 101 */ int8 zone_type; // 01=Outdoors, 02=dungeons, ff=Any -- ZONETYPE
/* 102 */ int8 environment_type; // -- ENVIRONMENTTYPE
/* 103 */ int8 time_of_day; // -- TIMEOFDAY
/* 104 */ uint8 classes[PLAYER_CLASS_COUNT]; // Classes, and their min levels -- WARRIORMIN ... BERSERKERMIN
/* 120 */ uint8 CastingAnim; // -- CASTINGANIM
/* 120 */ uint8 casting_animation; // -- CASTINGANIM
/* 121 */ //uint8 TargetAnim; // -- TARGETANIM
/* 122 */ //uint32 TravelType; // -- TRAVELTYPE
/* 123 */ uint16 SpellAffectIndex; // -- SPELLAFFECTINDEX
/* 123 */ uint16 spell_affect_index; // -- SPELLAFFECTINDEX
/* 124 */ int8 disallow_sit; // 124: high-end Yaulp spells (V, VI, VII, VIII [Rk 1, 2, & 3], & Gallenite's Bark of Fury -- CANCELONSIT
/* 125 */ int8 deity_agnostic;// 125: Words of the Skeptic -- DEITY_AGNOSTIC
/* 126 */ int8 deities[16]; // Deity check. 201 - 216 per http://www.eqemulator.net/wiki/wikka.php?wakka=DeityList
@@ -1301,36 +1301,36 @@ struct SPDat_Spell_Struct
/* 144 */ int16 new_icon; // Spell icon used by the client in uifiles/default/spells??.tga, both for spell gems & buff window. Looks to depreciate icon & memicon -- NEW_ICON
/* 145 */ //int16 spellanim; // Doesn't look like it's the same as #doanim, so not sure what this is, particles I think -- SPELL_EFFECT_INDEX
/* 146 */ bool uninterruptable; // Looks like anything != 0 is uninterruptable. Values are mostly -1, 0, & 1 (Fetid Breath = 90?) -- NO_INTERRUPT
/* 147 */ int16 ResistDiff; // -- RESIST_MOD
/* 148 */ bool dot_stacking_exempt; // -- NOT_STACKABLE_DOT
/* 147 */ int16 resist_difficulty; // -- RESIST_MOD
/* 148 */ bool unstackable_dot; // -- NOT_STACKABLE_DOT
/* 149 */ //int deletable; // -- DELETE_OK
/* 150 */ uint16 RecourseLink; // -- REFLECT_SPELLINDEX
/* 150 */ uint16 recourse_link; // -- REFLECT_SPELLINDEX
/* 151 */ bool no_partial_resist; // 151: -1, 0, or 1 -- NO_PARTIAL_SAVE
/* 152 */ //bool small_targets_only; // -- SMALL_TARGETS_ONLY
/* 153 */ //bool uses_persistent_particles; // -- USES_PERSISTENT_PARTICLES
/* 154 */ int8 short_buff_box; // != 0, goes to short buff box. -- BARD_BUFF_BOX
/* 155 */ int descnum; // eqstr of description of spell -- DESCRIPTION_INDEX
/* 156 */ int typedescnum; // eqstr of type description -- PRIMARY_CATEGORY
/* 157 */ int effectdescnum; // eqstr of effect description -- SECONDARY_CATEGORY_1
/* 155 */ int description_id; // eqstr of description of spell -- DESCRIPTION_INDEX
/* 156 */ int type_description_id; // eqstr of type description -- PRIMARY_CATEGORY
/* 157 */ int effect_description_id; // eqstr of effect description -- SECONDARY_CATEGORY_1
/* 158 */ //int secondary_category_2; //Category Desc ID 3 -- SECONDARY_CATEGORY_2
/* 159 */ bool npc_no_los; // -- NO_NPC_LOS
/* 160 */ bool feedbackable; // -- FEEDBACKABLE
/* 161 */ bool reflectable; // -- REFLECTABLE
/* 162 */ int bonushate; // -- HATE_MOD
/* 162 */ int bonus_hate; // -- HATE_MOD
/* 163 */ //int resist_per_level; // -- RESIST_PER_LEVEL
/* 164 */ //int resist_cap; // for most spells this appears to mimic ResistDiff -- RESIST_CAP
/* 165 */ bool ldon_trap; //Flag found on all LDON trap / chest related spells. -- AFFECT_INANIMATE
/* 166 */ int EndurCost; // -- STAMINA_COST
/* 167 */ int8 EndurTimerIndex; // bad name, used for all spells -- TIMER_INDEX
/* 168 */ bool IsDisciplineBuff; //Will goto the combat window when cast -- IS_SKILL
/* 166 */ int endurance_cost; // -- STAMINA_COST
/* 167 */ int8 timer_id; // bad name, used for all spells -- TIMER_INDEX
/* 168 */ bool is_discipline; //Will goto the combat window when cast -- IS_SKILL
/* 169 - 172*/ //These are zero for ALL spells, also removed from live -- ATTACK_OPENING, DEFENSE_OPENING, SKILL_OPENING, NPC_ERROR_OPENING
/* 173 */ int HateAdded; // -- SPELL_HATE_GIVEN
/* 174 */ int EndurUpkeep; // -- ENDUR_UPKEEP
/* 175 */ int numhitstype; // defines which type of behavior will tick down the numhit counter. -- LIMITED_USE_TYPE
/* 176 */ int numhits; // -- LIMITED_USE_COUNT
/* 177 */ int pvpresistbase; // -- PVP_RESIST_MOD
/* 178 */ int pvpresistcalc; // -- PVP_RESIST_PER_LEVEL
/* 179 */ int pvpresistcap; // -- PVP_RESIST_CAP
/* 173 */ int hate_added; // -- SPELL_HATE_GIVEN
/* 174 */ int endurance_upkeep; // -- ENDUR_UPKEEP
/* 175 */ int hit_number_type; // defines which type of behavior will tick down the numhit counter. -- LIMITED_USE_TYPE
/* 176 */ int hit_number; // -- LIMITED_USE_COUNT
/* 177 */ int pvp_resist_base; // -- PVP_RESIST_MOD
/* 178 */ int pvp_resist_per_level; // -- PVP_RESIST_PER_LEVEL
/* 179 */ int pvp_resist_cap; // -- PVP_RESIST_CAP
/* 180 */ int spell_category; // -- GLOBAL_GROUP
/* 181 */ int pvp_duration; // buffdurationformula for PvP -- PVP_DURATION
/* 182 */ int pvp_duration_cap; // buffduration for PvP -- PVP_DURATION_CAP
@@ -1340,11 +1340,11 @@ struct SPDat_Spell_Struct
/* 186 */ int dispel_flag; // -- NO_DISPELL
/* 187 */ //int npc_category; // -- NPC_MEM_CATEGORY
/* 188 */ //int npc_usefulness; // -- NPC_USEFULNESS
/* 189 */ int MinResist; // -- MIN_RESIST
/* 190 */ int MaxResist; // -- MAX_RESIST
/* 191 */ int viral_targets; // -- MIN_SPREAD_TIME
/* 192 */ int viral_timer; // -- MAX_SPREAD_TIME
/* 193 */ int NimbusEffect; // -- DURATION_PARTICLE_EFFECT
/* 189 */ int min_resist; // -- MIN_RESIST
/* 190 */ int max_resist; // -- MAX_RESIST
/* 191 */ uint8 viral_targets; // -- MIN_SPREAD_TIME
/* 192 */ uint8 viral_timer; // -- MAX_SPREAD_TIME
/* 193 */ int nimbus_effect; // -- DURATION_PARTICLE_EFFECT
/* 194 */ float directional_start; //Cone Start Angle: -- CONE_START_ANGLE
/* 195 */ float directional_end; // Cone End Angle: -- CONE_END_ANGLE
/* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect) -- SNEAK_ATTACK
@@ -1353,35 +1353,35 @@ struct SPDat_Spell_Struct
/* 199 */ //bool show_wear_off_message; // -- SHOW_WEAR_OFF_MESSAGE
/* 200 */ bool suspendable; // buff is suspended in suspended buff zones -- IS_COUNTDOWN_HELD
/* 201 */ int viral_range; // -- SPREAD_RADIUS
/* 202 */ int songcap; // individual song cap -- BASE_EFFECTS_FOCUS_CAP
/* 202 */ int song_cap; // individual song cap -- BASE_EFFECTS_FOCUS_CAP
/* 203 */ //bool stacks_with_self; // -- STACKS_WITH_SELF
/* 204 */ //int not_shown_to_player; // client skips this -- NOT_SHOWN_TO_PLAYER
/* 205 */ bool no_block; // -- NO_BUFF_BLOCK
/* 206 */ //int8 anim_variation; // -- ANIM_VARIATION
/* 207 */ int spellgroup; // -- SPELL_GROUP
/* 207 */ int spell_group; // -- SPELL_GROUP
/* 208 */ int rank; //increments AA effects with same name -- SPELL_GROUP_RANK
/* 209 */ int no_resist; //makes spells unresistable, which makes charms unbreakable as well. -- NO_RESIST
/* 210 */ // bool allow_spellscribe; // -- ALLOW_SPELLSCRIBE
/* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat -- SPELL_REQ_ASSOCIATION_ID
/* 212 */ bool AllowRest; // -- BYPASS_REGEN_CHECK
/* 213 */ bool InCombat; //Allow spell if target is in combat -- CAN_CAST_IN_COMBAT
/* 214 */ bool OutofCombat; //Allow spell if target is out of combat -- CAN_CAST_OUT_OF_COMBAT
/* 211 */ int cast_restriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat -- SPELL_REQ_ASSOCIATION_ID
/* 212 */ bool allow_rest; // -- BYPASS_REGEN_CHECK
/* 213 */ bool can_cast_in_combat; //Allow spell if target is in combat -- CAN_CAST_IN_COMBAT
/* 214 */ bool can_cast_out_of_combat; //Allow spell if target is out of combat -- CAN_CAST_OUT_OF_COMBAT
/* 215 */ //bool show_dot_message; // -- SHOW_DOT_MESSAGE
/* 216 */ //bool invalid; // -- INVALID
/* 217 */ int override_crit_chance; //Places a cap on the max chance to critical -- OVERRIDE_CRIT_CHANCE
/* 218 */ int aemaxtargets; //Is used for various AE effects -- MAX_TARGETS
/* 218 */ int aoe_max_targets; //Is used for various AE effects -- MAX_TARGETS
/* 219 */ int no_heal_damage_item_mod; // -- NO_HEAL_DAMAGE_ITEM_MOD
/* 220 */ int caster_requirement_id; // -- CASTER_REQUIREMENT_ID
/* 221 */ int spell_class; // -- SPELL_CLASS
/* 222 */ int spell_subclass; // -- SPELL_SUBCLASS
/* 223 */ //int ai_valid_targets; // -- AI_VALID_TARGETS
/* 224 */ bool persistdeath; // buff doesn't get stripped on death -- NO_STRIP_ON_DEATH
/* 224 */ bool persist_death; // buff doesn't get stripped on death -- NO_STRIP_ON_DEATH
/* 225 */ //float base_effects_focus_slope; // -- BASE_EFFECTS_FOCUS_SLOPE
/* 226 */ //float base_effects_focus_offset; // -- BASE_EFFECTS_FOCUS_OFFSET
/* 227 */ float min_dist; //spell power modified by distance from caster (Min Distance) -- DISTANCE_MOD_CLOSE_DIST
/* 228 */ float min_dist_mod; //spell power modified by distance from caster (Modifier at Min Distance) -- DISTANCE_MOD_CLOSE_MULT
/* 229 */ float max_dist; //spell power modified by distance from caster (Max Distance) -- DISTANCE_MOD_FAR_DIST
/* 230 */ float max_dist_mod; //spell power modified by distance from caster (Modifier at Max Distance) -- DISTANCE_MOD_FAR_MULT
/* 227 */ float min_distance; //spell power modified by distance from caster (Min Distance) -- DISTANCE_MOD_CLOSE_DIST
/* 228 */ float min_distance_mod; //spell power modified by distance from caster (Modifier at Min Distance) -- DISTANCE_MOD_CLOSE_MULT
/* 229 */ float max_distance; //spell power modified by distance from caster (Max Distance) -- DISTANCE_MOD_FAR_DIST
/* 230 */ float max_distance_mod; //spell power modified by distance from caster (Modifier at Max Distance) -- DISTANCE_MOD_FAR_MULT
/* The client also does this
* v26 = *(float *)&v4->DistanceModFarDist - *(float *)&v4->DistanceModCloseDist;
* if ( v26 > -0.00000011920929 && v26 < 0.00000011920929 )
@@ -1395,7 +1395,7 @@ struct SPDat_Spell_Struct
/* 234 */ //bool only_during_fast_regen; // -- ONLY_DURING_FAST_REGEN
/* 235 */ //bool is_beta_only; // -- IS_BETA_ONLY
/* 236 */ //int spell_subgroup; // -- SPELL_SUBGROUP
uint8 DamageShieldType; // This field does not exist in spells_us.txt
uint8 damage_shield_type; // This field does not exist in spells_us.txt
};
extern const SPDat_Spell_Struct* spells;
@@ -1508,7 +1508,7 @@ bool IsBardOnlyStackEffect(int effect);
bool IsCastWhileInvis(uint16 spell_id);
bool IsEffectIgnoredInStacking(int spa);
bool IsFocusLimit(int spa);
bool SpellRequiresTarget(int targettype);
bool SpellRequiresTarget(int target_type);
bool IsVirusSpell(int32 spell_id);
int GetViralMinSpreadTime(int32 spell_id);
int GetViralMaxSpreadTime(int32 spell_id);