Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower

Port From (https://github.com/TrinityCore/TrinityCore/commit/c7306439e7004288fb85890d6a5f730cf1761d71)
This commit is contained in:
hondacrx
2020-06-18 12:39:39 -04:00
parent f0942a257e
commit d7954f4fc7
89 changed files with 1738 additions and 1893 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ namespace Framework.Constants
PassengerRemoved = 28, // Cooldownmin, Cooldownmax
Charmed = 29, // onRemove (0 - on apply, 1 - on remove)
CharmedTarget = 30, // None
SpellhitTarget = 31, // Spellid, School, Cooldownmin, Cooldownmax
SpellHitTarget = 31, // Spellid, School, Cooldownmin, Cooldownmax
Damaged = 32, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
DamagedTarget = 33, // Mindmg, Maxdmg, Cooldownmin, Cooldownmax
Movementinform = 34, // Movementtype(Any), Pointid
@@ -442,8 +442,8 @@ namespace Framework.Constants
ModMaxPower = 418, // NYI
ModBaseManaPct = 419,
ModBattlePetXpPct = 420,
ModAbsorbEffectsAmountPct = 421, // NYI
Unk422 = 422,
ModAbsorbEffectsDonePct = 421, // NYI
ModAbsorbEffectsTakenPct = 422, //NYI
Unk423 = 423,
Unk424 = 424,
Unk425 = 425,
@@ -32,6 +32,8 @@ namespace Framework.Constants
public const int EffectAll = 255;
public const float TrajectoryMissileSize = 3.0f;
public const int MaxPowersPerSpell = 4;
}
@@ -2323,7 +2325,7 @@ namespace Framework.Constants
UnitNearbyParty = 3,
UnitNearbyAlly = 4,
UnitPet = 5,
UnitEnemy = 6,
UnitTargetEnemy = 6,
UnitSrcAreaEntry = 7,
UnitDestAreaEntry = 8,
DestHome = 9,
@@ -2333,11 +2335,11 @@ namespace Framework.Constants
DestDb = 17,
DestCaster = 18,
UnitCasterAreaParty = 20,
UnitAlly = 21,
UnitTargetAlly = 21,
SrcCaster = 22,
GameobjectTarget = 23,
UnitConeEnemy24 = 24,
UnitAny = 25,
UnitTargetAny = 25,
GameobjectItemTarget = 26,
UnitMaster = 27,
DestDynobjEnemy = 28,
@@ -2347,9 +2349,9 @@ namespace Framework.Constants
DestCasterSummon = 32, // Front Left, Doesn'T Use Radius
UnitSrcAreaParty = 33,
UnitDestAreaParty = 34,
UnitParty = 35,
UnitTargetParty = 35,
DestCasterUnk36 = 36,
UnitLastAreaParty = 37,
UnitLastTargetAreaParty = 37,
UnitNearbyEntry = 38,
DestCasterFishing = 39,
GameobjectNearbyEntry = 40,
@@ -2365,7 +2367,7 @@ namespace Framework.Constants
DestCasterLeft = 50,
GameobjectSrcArea = 51,
GameobjectDestArea = 52,
DestEnemy = 53,
DestTargetEnemy = 53,
UnitConeEnemy54 = 54,
DestCasterFrontLeap = 55, // For A Leap Spell
UnitCasterAreaRaid = 56,
@@ -83,7 +83,7 @@ namespace Framework.Database
PrepareStatement(CharStatements.SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_INSTANCE, "SELECT id, permanent, map, difficulty, extendState, resettime, entranceId FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_AURAS, "SELECT casterGuid, itemGuid, spell, effectMask, recalculateMask, stackCount, maxDuration, remainTime, remainCharges, castItemId, castItemLevel FROM character_aura WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_AURAS, "SELECT casterGuid, itemGuid, spell, effectMask, recalculateMask, difficulty, stackCount, maxDuration, remainTime, remainCharges, castItemId, castItemLevel FROM character_aura WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_AURA_EFFECTS, "SELECT casterGuid, itemGuid, spell, effectMask, effectIndex, amount, baseAmount FROM character_aura_effect WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_SPELL, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?");
PrepareStatement(CharStatements.SEL_CHARACTER_QUESTSTATUS, "SELECT quest, status, timer FROM character_queststatus WHERE guid = ? AND status <> 0");
@@ -339,8 +339,8 @@ namespace Framework.Database
PrepareStatement(CharStatements.DEL_TRANSMOG_OUTFIT, "DELETE FROM character_transmog_outfits WHERE setguid=?");
// Auras
PrepareStatement(CharStatements.INS_AURA, "INSERT INTO character_aura (guid, casterGuid, itemGuid, spell, effectMask, recalculateMask, stackCount, maxDuration, remainTime, remainCharges, castItemId, castItemLevel) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.INS_AURA, "INSERT INTO character_aura (guid, casterGuid, itemGuid, spell, effectMask, recalculateMask, difficulty, stackCount, maxDuration, remainTime, remainCharges, castItemId, castItemLevel) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.INS_AURA_EFFECT, "INSERT INTO character_aura_effect (guid, casterGuid, itemGuid, spell, effectMask, effectIndex, amount, baseAmount) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
@@ -708,7 +708,7 @@ namespace Framework.Database
PrepareStatement(CharStatements.DEL_CHAR_PET_DECLINEDNAME_BY_OWNER, "DELETE FROM character_pet_declinedname WHERE owner = ?");
PrepareStatement(CharStatements.DEL_CHAR_PET_DECLINEDNAME, "DELETE FROM character_pet_declinedname WHERE id = ?");
PrepareStatement(CharStatements.INS_CHAR_PET_DECLINEDNAME, "INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES (?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.SEL_PET_AURA, "SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, maxDuration, remainTime, remainCharges FROM pet_aura WHERE guid = ?");
PrepareStatement(CharStatements.SEL_PET_AURA, "SELECT casterGuid, spell, effectMask, recalculateMask, difficulty, stackCount, maxDuration, remainTime, remainCharges FROM pet_aura WHERE guid = ?");
PrepareStatement(CharStatements.SEL_PET_AURA_EFFECT, "SELECT casterGuid, spell, effectMask, effectIndex, amount, baseAmount FROM pet_aura_effect WHERE guid = ?");
PrepareStatement(CharStatements.SEL_PET_SPELL, "SELECT spell, active FROM pet_spell WHERE guid = ?");
PrepareStatement(CharStatements.SEL_PET_SPELL_COOLDOWN, "SELECT spell, time, categoryId, categoryEnd FROM pet_spell_cooldown WHERE guid = ? AND time > UNIX_TIMESTAMP()");
@@ -723,8 +723,8 @@ namespace Framework.Database
PrepareStatement(CharStatements.INS_PET_SPELL_CHARGES, "INSERT INTO pet_spell_charges (guid, categoryId, rechargeStart, rechargeEnd) VALUES (?, ?, ?, ?)");
PrepareStatement(CharStatements.DEL_PET_SPELL_BY_SPELL, "DELETE FROM pet_spell WHERE guid = ? and spell = ?");
PrepareStatement(CharStatements.INS_PET_SPELL, "INSERT INTO pet_spell (guid, spell, active) VALUES (?, ?, ?)");
PrepareStatement(CharStatements.INS_PET_AURA, "INSERT INTO pet_aura (guid, casterGuid, spell, effectMask, recalculateMask, stackCount, maxDuration, remainTime, remainCharges) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.INS_PET_AURA, "INSERT INTO pet_aura (guid, casterGuid, spell, effectMask, recalculateMask, difficulty, stackCount, maxDuration, remainTime, remainCharges) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.INS_PET_AURA_EFFECT, "INSERT INTO pet_aura_effect (guid, casterGuid, spell, effectMask, effectIndex, amount, baseAmount) " +
"VALUES (?, ?, ?, ?, ?, ?, ?)");
PrepareStatement(CharStatements.SEL_CHAR_PET_BY_ENTRY, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, abdata, savetime, CreatedBySpell, PetType, specialization FROM character_pet WHERE owner = ? AND id = ?");