converted spell id's to integers and made the internal representation 322-bit

This commit is contained in:
dannuic
2026-04-26 23:53:57 -06:00
parent 05cb1921e8
commit 5de441fa20
134 changed files with 1644 additions and 1645 deletions
+152 -153
View File
@@ -21,9 +21,8 @@
#include "common/item_data.h"
#include "common/skills.h"
#define SPELL_UNKNOWN 0xFFFF
#define POISON_PROC 0xFFFE
#define SPELLBOOK_UNKNOWN 0xFFFFFFFF //player profile spells are 32 bit
#define SPELL_UNKNOWN -1
#define POISON_PROC -2
//some spell IDs which will prolly change, but are needed
#define SPELL_COMPLETE_HEAL 13
@@ -914,10 +913,10 @@ bool BotSpellTypeRequiresTarget(uint16 spell_type);
bool BotSpellTypeRequiresAEChecks(uint16 spell_type);
bool IsCommandedBotSpellType(uint16 spell_type);
bool IsPullingBotSpellType(uint16 spell_type);
uint16 GetCorrectBotSpellType(uint16 spell_type, uint16 spell_id);
uint16 GetCorrectBotSpellType(uint16 spell_type, int32 spell_id);
uint16 GetPetBotSpellType(uint16 spell_type);
bool IsBotBuffSpellType(uint16 spell_type);
bool BotRequiresLoSToCast(uint16 spell_type, uint16 spell_id);
bool BotRequiresLoSToCast(uint16 spell_type, int32 spell_id);
// These should not be used to determine spell category..
// They are a graphical affects (effects?) index only
@@ -1762,157 +1761,157 @@ struct SPDat_Spell_Struct
extern const SPDat_Spell_Struct* spells;
extern int32 SPDAT_RECORDS;
bool IsTargetableAESpell(uint16 spell_id);
bool IsSacrificeSpell(uint16 spell_id);
bool IsLifetapSpell(uint16 spell_id);
bool IsMesmerizeSpell(uint16 spell_id);
bool SpellBreaksMez(uint16 spell_id);
bool IsStunSpell(uint16 spell_id);
bool IsSlowSpell(uint16 spell_id);
bool IsHasteSpell(uint16 spell_id);
bool IsHarmonySpell(uint16 spell_id);
bool IsPercentalHealSpell(uint16 spell_id);
bool IsGroupOnlySpell(uint16 spell_id);
bool IsBeneficialSpell(uint16 spell_id);
bool IsDetrimentalSpell(uint16 spell_id);
bool IsInvisibleSpell(uint16 spell_id);
bool IsInvulnerabilitySpell(uint16 spell_id);
bool IsCompleteHealDurationSpell(uint16 spell_id);
bool IsPoisonCounterSpell(uint16 spell_id);
bool IsDiseaseCounterSpell(uint16 spell_id);
bool IsSummonItemSpell(uint16 spell_id);
bool IsSummonSkeletonSpell(uint16 spell_id);
bool IsSummonPetSpell(uint16 spell_id);
bool IsSummonPCSpell(uint16 spell_id);
bool IsPetSpell(uint16 spell_id);
bool IsCharmSpell(uint16 spell_id);
bool IsResurrectionSicknessSpell(uint16 spell_id);
bool IsBlindSpell(uint16 spell_id);
bool IsHealthSpell(uint16 spell_id);
bool IsCastTimeReductionSpell(uint16 spell_id);
bool IsIncreaseDurationSpell(uint16 spell_id);
bool IsManaCostReductionSpell(uint16 spell_id);
bool IsIncreaseRangeSpell(uint16 spell_id);
bool IsImprovedHealingSpell(uint16 spell_id);
bool IsImprovedDamageSpell(uint16 spell_id);
bool IsAEDurationSpell(uint16 spell_id);
bool IsPureNukeSpell(uint16 spell_id);
bool IsAENukeSpell(uint16 spell_id);
bool IsPBAENukeSpell(uint16 spell_id);
bool IsAERainNukeSpell(uint16 spell_id);
bool IsAnyNukeOrStunSpell(uint16 spell_id);
bool IsAnyAESpell(uint16 spell_id);
bool IsAESpell(uint16 spell_id);
bool IsPBAESpell(uint16 spell_id);
bool IsAERainSpell(uint16 spell_id);
bool IsPartialResistableSpell(uint16 spell_id);
bool IsResistableSpell(uint16 spell_id);
bool IsGroupSpell(uint16 spell_id);
bool IsTGBCompatibleSpell(uint16 spell_id);
bool IsBardSong(uint16 spell_id);
bool IsEffectInSpell(uint16 spell_id, int effect_id);
uint16 GetSpellTriggerSpellID(uint16 spell_id, int effect_id);
bool IsBlankSpellEffect(uint16 spell_id, int effect_index);
bool IsValidSpell(uint32 spell_id);
bool IsSummonSpell(uint16 spell_id);
bool IsDamageSpell(uint16 spell_id);
bool IsAnyDamageSpell(uint16 spell_id);
bool IsDamageOverTimeSpell(uint16 spell_i);
bool IsFearSpell(uint16 spell_id);
bool IsCureSpell(uint16 spell_id);
bool IsHarmTouchSpell(uint16 spell_id);
int GetSpellEffectIndex(uint16 spell_id, int effect_id);
uint8 GetSpellMinimumLevel(uint16 spell_id);
uint8 GetSpellLevel(uint16 spell_id, uint8 class_id);
bool IsTargetableAESpell(int32 spell_id);
bool IsSacrificeSpell(int32 spell_id);
bool IsLifetapSpell(int32 spell_id);
bool IsMesmerizeSpell(int32 spell_id);
bool SpellBreaksMez(int32 spell_id);
bool IsStunSpell(int32 spell_id);
bool IsSlowSpell(int32 spell_id);
bool IsHasteSpell(int32 spell_id);
bool IsHarmonySpell(int32 spell_id);
bool IsPercentalHealSpell(int32 spell_id);
bool IsGroupOnlySpell(int32 spell_id);
bool IsBeneficialSpell(int32 spell_id);
bool IsDetrimentalSpell(int32 spell_id);
bool IsInvisibleSpell(int32 spell_id);
bool IsInvulnerabilitySpell(int32 spell_id);
bool IsCompleteHealDurationSpell(int32 spell_id);
bool IsPoisonCounterSpell(int32 spell_id);
bool IsDiseaseCounterSpell(int32 spell_id);
bool IsSummonItemSpell(int32 spell_id);
bool IsSummonSkeletonSpell(int32 spell_id);
bool IsSummonPetSpell(int32 spell_id);
bool IsSummonPCSpell(int32 spell_id);
bool IsPetSpell(int32 spell_id);
bool IsCharmSpell(int32 spell_id);
bool IsResurrectionSicknessSpell(int32 spell_id);
bool IsBlindSpell(int32 spell_id);
bool IsHealthSpell(int32 spell_id);
bool IsCastTimeReductionSpell(int32 spell_id);
bool IsIncreaseDurationSpell(int32 spell_id);
bool IsManaCostReductionSpell(int32 spell_id);
bool IsIncreaseRangeSpell(int32 spell_id);
bool IsImprovedHealingSpell(int32 spell_id);
bool IsImprovedDamageSpell(int32 spell_id);
bool IsAEDurationSpell(int32 spell_id);
bool IsPureNukeSpell(int32 spell_id);
bool IsAENukeSpell(int32 spell_id);
bool IsPBAENukeSpell(int32 spell_id);
bool IsAERainNukeSpell(int32 spell_id);
bool IsAnyNukeOrStunSpell(int32 spell_id);
bool IsAnyAESpell(int32 spell_id);
bool IsAESpell(int32 spell_id);
bool IsPBAESpell(int32 spell_id);
bool IsAERainSpell(int32 spell_id);
bool IsPartialResistableSpell(int32 spell_id);
bool IsResistableSpell(int32 spell_id);
bool IsGroupSpell(int32 spell_id);
bool IsTGBCompatibleSpell(int32 spell_id);
bool IsBardSong(int32 spell_id);
bool IsEffectInSpell(int32 spell_id, int effect_id);
int32 GetSpellTriggerSpellID(int32 spell_id, int effect_id);
bool IsBlankSpellEffect(int32 spell_id, int effect_index);
bool IsValidSpell(int32 spell_id);
bool IsSummonSpell(int32 spell_id);
bool IsDamageSpell(int32 spell_id);
bool IsAnyDamageSpell(int32 spell_id);
bool IsDamageOverTimeSpell(int32 spell_id);
bool IsFearSpell(int32 spell_id);
bool IsCureSpell(int32 spell_id);
bool IsHarmTouchSpell(int32 spell_id);
int GetSpellEffectIndex(int32 spell_id, int effect_id);
uint8 GetSpellMinimumLevel(int32 spell_id);
uint8 GetSpellLevel(int32 spell_id, uint8 class_id);
int CalcBuffDuration_formula(int level, int formula, int duration);
int32 CalculatePoisonCounters(uint16 spell_id);
int32 CalculateDiseaseCounters(uint16 spell_id);
int32 CalculateCurseCounters(uint16 spell_id);
int32 CalculateCorruptionCounters(uint16 spell_id);
int32 CalculateCounters(uint16 spell_id);
bool IsDisciplineBuff(uint16 spell_id);
bool IsDiscipline(uint16 spell_id);
bool IsCombatSkill(uint16 spell_id);
bool IsResurrectionEffects(uint16 spell_id);
int8 GetSpellResurrectionSicknessCheck(uint16 spell_id_one, uint16 spell_id_two);
bool IsRuneSpell(uint16 spell_id);
bool IsMagicRuneSpell(uint16 spell_id);
bool IsManaTapSpell(uint16 spell_id);
bool IsAllianceSpell(uint16 spell_id);
bool IsDeathSaveSpell(uint16 spell_id);
bool IsFullDeathSaveSpell(uint16 spell_id);
bool IsPartialDeathSaveSpell(uint16 spell_id);
bool IsShadowStepSpell(uint16 spell_id);
bool IsSuccorSpell(uint16 spell_id);
bool IsTeleportSpell(uint16 spell_id);
bool IsTranslocateSpell(uint16 spell_id);
bool IsGateSpell(uint16 spell_id);
bool IsIllusionSpell(uint16 spell_id);
bool IsLDoNObjectSpell(uint16 spell_id);
int GetSpellResistType(uint16 spell_id);
int GetSpellTargetType(uint16 spell_id);
bool IsHealOverTimeSpell(uint16 spell_id);
bool IsCompleteHealSpell(uint16 spell_id);
bool IsFastHealSpell(uint16 spell_id);
bool IsVeryFastHealSpell(uint16 spell_id);
bool IsRegularSingleTargetHealSpell(uint16 spell_id);
bool IsRegularPetHealSpell(uint16 spell_id);
bool IsRegularGroupHealSpell(uint16 spell_id);
bool IsGroupCompleteHealSpell(uint16 spell_id);
bool IsGroupHealOverTimeSpell(uint16 spell_id);
bool IsAnyHealSpell(uint16 spell_id);
bool IsAnyBuffSpell(uint16 spell_id);
bool IsDispelSpell(uint16 spell_id);
bool IsEscapeSpell(uint16 spell_id);
bool IsDebuffSpell(uint16 spell_id);
bool IsHateReduxSpell(uint16 spell_id);
bool IsResistDebuffSpell(uint16 spell_id);
bool IsSelfConversionSpell(uint16 spell_id);
bool IsBuffSpell(uint16 spell_id);
bool IsPersistDeathSpell(uint16 spell_id);
bool IsSuspendableSpell(uint16 spell_id);
bool IsCastOnFadeDurationSpell(uint16 spell_id);
bool IsDistanceModifierSpell(uint16 spell_id);
int GetSpellPartialMeleeRuneReduction(uint16 spell_id);
int GetSpellPartialMagicRuneReduction(uint16 spell_id);
int GetSpellPartialMeleeRuneAmount(uint16 spell_id);
int GetSpellPartialMagicRuneAmount(uint16 spell_id);
bool IsNoDetrimentalSpellAggroSpell(uint16 spell_id);
bool IsStackableDOT(uint16 spell_id);
int32 CalculatePoisonCounters(int32 spell_id);
int32 CalculateDiseaseCounters(int32 spell_id);
int32 CalculateCurseCounters(int32 spell_id);
int32 CalculateCorruptionCounters(int32 spell_id);
int32 CalculateCounters(int32 spell_id);
bool IsDisciplineBuff(int32 spell_id);
bool IsDiscipline(int32 spell_id);
bool IsCombatSkill(int32 spell_id);
bool IsResurrectionEffects(int32 spell_id);
int8 GetSpellResurrectionSicknessCheck(int32 spell_id_one, int32 spell_id_two);
bool IsRuneSpell(int32 spell_id);
bool IsMagicRuneSpell(int32 spell_id);
bool IsManaTapSpell(int32 spell_id);
bool IsAllianceSpell(int32 spell_id);
bool IsDeathSaveSpell(int32 spell_id);
bool IsFullDeathSaveSpell(int32 spell_id);
bool IsPartialDeathSaveSpell(int32 spell_id);
bool IsShadowStepSpell(int32 spell_id);
bool IsSuccorSpell(int32 spell_id);
bool IsTeleportSpell(int32 spell_id);
bool IsTranslocateSpell(int32 spell_id);
bool IsGateSpell(int32 spell_id);
bool IsIllusionSpell(int32 spell_id);
bool IsLDoNObjectSpell(int32 spell_id);
int GetSpellResistType(int32 spell_id);
int GetSpellTargetType(int32 spell_id);
bool IsHealOverTimeSpell(int32 spell_id);
bool IsCompleteHealSpell(int32 spell_id);
bool IsFastHealSpell(int32 spell_id);
bool IsVeryFastHealSpell(int32 spell_id);
bool IsRegularSingleTargetHealSpell(int32 spell_id);
bool IsRegularPetHealSpell(int32 spell_id);
bool IsRegularGroupHealSpell(int32 spell_id);
bool IsGroupCompleteHealSpell(int32 spell_id);
bool IsGroupHealOverTimeSpell(int32 spell_id);
bool IsAnyHealSpell(int32 spell_id);
bool IsAnyBuffSpell(int32 spell_id);
bool IsDispelSpell(int32 spell_id);
bool IsEscapeSpell(int32 spell_id);
bool IsDebuffSpell(int32 spell_id);
bool IsHateReduxSpell(int32 spell_id);
bool IsResistDebuffSpell(int32 spell_id);
bool IsSelfConversionSpell(int32 spell_id);
bool IsBuffSpell(int32 spell_id);
bool IsPersistDeathSpell(int32 spell_id);
bool IsSuspendableSpell(int32 spell_id);
bool IsCastOnFadeDurationSpell(int32 spell_id);
bool IsDistanceModifierSpell(int32 spell_id);
int GetSpellPartialMeleeRuneReduction(int32 spell_id);
int GetSpellPartialMagicRuneReduction(int32 spell_id);
int GetSpellPartialMeleeRuneAmount(int32 spell_id);
int GetSpellPartialMagicRuneAmount(int32 spell_id);
bool IsNoDetrimentalSpellAggroSpell(int32 spell_id);
bool IsStackableDOT(int32 spell_id);
bool IsBardOnlyStackEffect(int effect_id);
bool IsCastWhileInvisibleSpell(uint16 spell_id);
bool IsCastWhileInvisibleSpell(int32 spell_id);
bool IsEffectIgnoredInStacking(int effect_id);
bool IsFocusLimit(int effect_id);
bool IsTargetRequiredForSpell(uint16 spell_id);
bool IsVirusSpell(uint16 spell_id);
int GetSpellViralMinimumSpreadTime(uint16 spell_id);
int GetSpellViralMaximumSpreadTime(uint16 spell_id);
int GetSpellViralSpreadRange(uint16 spell_id);
bool IsInstrumentModifierAppliedToSpellEffect(uint16 spell_id, int effect_id);
bool IsPulsingBardSong(uint16 spell_id);
int GetSpellProcLimitTimer(uint16 spell_id, int proc_type);
bool IsCastNotStandingSpell(uint16 spell_id);
int GetSpellEffectDescriptionNumber(uint16 spell_id);
DmgShieldType GetDamageShieldType(uint16 spell_id, int damage_shield_type = 0);
bool IsRestAllowedSpell(uint16 spell_id);
int GetSpellNimbusEffect(uint16 spell_id);
int GetSpellFuriousBash(uint16 spell_id);
bool IsShortDurationBuff(uint16 spell_id);
bool IsSpellUsableInThisZoneType(uint16 spell_id, uint8 zone_type);
const char *GetSpellName(uint16 spell_id);
int GetSpellStatValue(uint16 spell_id, const char* stat_identifier, uint8 slot = 0);
bool IsCastRestrictedSpell(uint16 spell_id);
bool IsAegolismSpell(uint16 spell_id);
bool AegolismStackingIsSymbolSpell(uint16 spell_id);
bool AegolismStackingIsArmorClassSpell(uint16 spell_id);
int8 SpellEffectsCount(uint16 spell_id);
bool IsLichSpell(uint16 spell_id);
bool IsInstantHealSpell(uint32 spell_id);
bool IsResurrectSpell(uint16 spell_id);
bool IsTargetRequiredForSpell(int32 spell_id);
bool IsVirusSpell(int32 spell_id);
int GetSpellViralMinimumSpreadTime(int32 spell_id);
int GetSpellViralMaximumSpreadTime(int32 spell_id);
int GetSpellViralSpreadRange(int32 spell_id);
bool IsInstrumentModifierAppliedToSpellEffect(int32 spell_id, int effect_id);
bool IsPulsingBardSong(int32 spell_id);
int GetSpellProcLimitTimer(int32 spell_id, int proc_type);
bool IsCastNotStandingSpell(int32 spell_id);
int GetSpellEffectDescriptionNumber(int32 spell_id);
DmgShieldType GetDamageShieldType(int32 spell_id, int damage_shield_type = 0);
bool IsRestAllowedSpell(int32 spell_id);
int GetSpellNimbusEffect(int32 spell_id);
int GetSpellFuriousBash(int32 spell_id);
bool IsShortDurationBuff(int32 spell_id);
bool IsSpellUsableInThisZoneType(int32 spell_id, uint8 zone_type);
const char *GetSpellName(int32 spell_id);
int GetSpellStatValue(int32 spell_id, const char* stat_identifier, uint8 slot = 0);
bool IsCastRestrictedSpell(int32 spell_id);
bool IsAegolismSpell(int32 spell_id);
bool AegolismStackingIsSymbolSpell(int32 spell_id);
bool AegolismStackingIsArmorClassSpell(int32 spell_id);
int8 SpellEffectsCount(int32 spell_id);
bool IsLichSpell(int32 spell_id);
bool IsInstantHealSpell(int32 spell_id);
bool IsResurrectSpell(int32 spell_id);
bool RequiresStackCheck(uint16 spell_type);
bool IsResistanceBuffSpell(uint16 spell_id);
bool IsResistanceOnlySpell(uint16 spell_id);
bool IsDamageShieldOnlySpell(uint16 spell_id);
bool IsDamageShieldAndResistSpell(uint16 spell_id);
bool IsHateSpell(uint16 spell_id);
bool IsResistanceBuffSpell(int32 spell_id);
bool IsResistanceOnlySpell(int32 spell_id);
bool IsDamageShieldOnlySpell(int32 spell_id);
bool IsDamageShieldAndResistSpell(int32 spell_id);
bool IsHateSpell(int32 spell_id);
bool IsDisciplineTome(const EQ::ItemData* item);