mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Spells] Major update to cast restriction code and new spell field 'caster_requirement_id' (field220) implemented (#1508)
* Implemented spells_new table 'field220' as 'caster_requirement_id' Implemented spells_new table 'field220' as 'caster_requirement_id' * Update spell_effects.cpp * updates to CastRestriction enum using live description updated entire function missing and new types added many fixes * updates * code fixes * updates * updates * Update spdat.h * typo fix
This commit is contained in:
parent
5f3c054044
commit
cb3f8daedd
@ -27,16 +27,17 @@ typedef enum {
|
||||
BT_Extraplanar = 6,
|
||||
BT_Magical = 7, //this name might be a bit off,
|
||||
BT_SummonedUndead = 8,
|
||||
BT_RaidGiant = 9,
|
||||
// ...
|
||||
BT_RaidGiant = 9, //Velious era Raid Giant
|
||||
BT_RaidColdain = 10, //Velious era Raid Coldain
|
||||
BT_NoTarget = 11, //no name, can't target this bodytype
|
||||
BT_Vampire = 12,
|
||||
BT_Atenha_Ra = 13,
|
||||
BT_Greater_Akheva = 14,
|
||||
BT_Khati_Sha = 15,
|
||||
BT_Seru = 16, //not confirmed....
|
||||
BT_Seru = 16,
|
||||
BT_Grieg_Veneficus = 17,
|
||||
BT_Draz_Nurakk = 18,
|
||||
BT_Zek = 19,
|
||||
BT_Zek = 19, //"creatures from the Plane of War."
|
||||
BT_Luggald = 20,
|
||||
BT_Animal = 21,
|
||||
BT_Insect = 22,
|
||||
@ -46,17 +47,18 @@ typedef enum {
|
||||
BT_Dragon = 26,
|
||||
BT_Summoned2 = 27,
|
||||
BT_Summoned3 = 28,
|
||||
//29
|
||||
BT_Dragon2 = 29, //database data indicates this is a dragon type (kunark and DoN?)
|
||||
BT_VeliousDragon = 30, //might not be a tight set
|
||||
// ...
|
||||
BT_Familiar = 31,
|
||||
BT_Dragon3 = 32,
|
||||
BT_Boxes = 33,
|
||||
BT_Muramite = 34, //tribal dudes
|
||||
// ...
|
||||
BT_NoTarget2 = 60,
|
||||
// ...
|
||||
BT_SwarmPet = 63, //is this valid, or made up?
|
||||
// ...
|
||||
BT_SwarmPet = 63, //Looks like weapon proc related temp pets and few misc pets, should not be used for checking swarm pets in general.
|
||||
BT_MonsterSummon = 64,
|
||||
// 65, trap or effect related?
|
||||
BT_InvisMan = 66, //no name, seen on 'InvisMan', can be /targeted
|
||||
BT_Special = 67
|
||||
} bodyType;
|
||||
|
||||
@ -1883,6 +1883,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
||||
sp[tempid].override_crit_chance = atoi(row[217]);
|
||||
sp[tempid].aemaxtargets = 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;
|
||||
|
||||
313
common/spdat.h
313
common/spdat.h
@ -155,6 +155,17 @@
|
||||
#define SPELL_RESURRECTION_SICKNESS 756
|
||||
#define SPELL_RESURRECTION_SICKNESS2 5249
|
||||
#define SPELL_REVIVAL_SICKNESS 13087
|
||||
#define SPELL_PACT_OF_HATE_RECOURSE 40375
|
||||
#define SPELL_INCENDIARY_OOZE_BUFF 32513
|
||||
|
||||
//spellgroup ids
|
||||
#define SPELLGROUP_FRENZIED_BURNOUT 2754
|
||||
#define SPELLGROUP_ILLUSION_OF_GRANDEUR 38603
|
||||
#define SPELLGROUP_ROGUES_FURY 16861
|
||||
#define SPELLGROUP_HARMONIOUS_PRECISION 15634
|
||||
#define SPELLGROUP_HARMONIOUS_EXPANSE 15633
|
||||
#define SPELLGROUP_FURIOUS_RAMPAGE 38106
|
||||
#define SPELLGROUP_SHROUD_OF_PRAYER 41050
|
||||
|
||||
|
||||
|
||||
@ -189,6 +200,306 @@ enum FocusLimitIncludes {
|
||||
IncludeExistsSELimitSpellSubclass = 14,
|
||||
IncludeFoundSELimitSpellSubclass = 15
|
||||
};
|
||||
/*
|
||||
The id's correspond to 'type' 39 in live(2021) dbstr_us gives the message for target and caster restricted effects. These are not present in the ROF2 dbstr_us.
|
||||
If from CasterRestriction spell field. "Your target does not meet the spell requirements. <insert below corresponding string>." Msg in combat window, color red.
|
||||
If set as limit in a direct damage or heal spell (SPA 0) do not give message.
|
||||
*/
|
||||
enum SpellRestriction
|
||||
{
|
||||
UNKNOWN_3 = 3, // | caster restriction | seen in spell 30183 Mind Spiral
|
||||
IS_NOT_ON_HORSE = 5, // | caster restriction |
|
||||
IS_ANIMAL_OR_HUMANOID = 100, // This spell will only work on animals or humanoid creatures.
|
||||
IS_DRAGON = 101, // This spell will only work on dragons.
|
||||
IS_ANIMAL_OR_INSECT = 102, // This spell will only work on animals or insects.
|
||||
IS_BODY_TYPE_MISC = 103, // This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, insects, constructs, dragons, Skyshrine dragons, Muramites, or creatures constructed from magic.
|
||||
IS_BODY_TYPE_MISC2 = 104, // This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, or insects.
|
||||
IS_PLANT = 105, // This spell will only work on plants.
|
||||
IS_GIANT = 106, // This spell will only work on animals. | Live used to have this on spells restricted to Giants, but those spells were removed... We still have them
|
||||
IS_NOT_ANIMAL_OR_HUMANOID = 108, // This spell will only work on targets that are neither animals or humanoid.
|
||||
IS_BIXIE = 109, // This spell will only work on bixies.
|
||||
IS_HARPY = 110, // This spell will only work on harpies.
|
||||
IS_GNOLL = 111, // This spell will only work on gnolls.
|
||||
IS_SPORALI = 112, // This spell will only work on fungusoids.
|
||||
IS_KOBOLD = 113, // This spell will only work on kobolds.
|
||||
IS_FROSTCRYPT_SHADE = 114, // This spell will only work on undead creatures or the Shades of Frostcrypt.
|
||||
IS_DRAKKIN = 115, // This spell will only work on Drakkin.
|
||||
IS_UNDEAD_OR_VALDEHOLM_GIANT = 116, // This spell will only work on undead creatures or the inhabitants of Valdeholm.
|
||||
IS_ANIMAL_OR_PLANT = 117, // This spell will only work on plants or animals.
|
||||
IS_SUMMONED = 118, // This spell will only work on constructs, elementals, or summoned elemental minions.
|
||||
IS_WIZARD_USED_ON_MAGE_FIRE_PET = 119, // This spell will only work on wizards. | Live uses this on high level mage fire pets, which are wizard class
|
||||
IS_UNDEAD = 120, //
|
||||
IS_NOT_UNDEAD_OR_SUMMONED_OR_VAMPIRE = 121, // This spell will only work on creatures that are not undead, constructs, elementals, or vampires.
|
||||
IS_FAE_OR_PIXIE = 122, // This spell will only work on Fae or pixies.
|
||||
IS_HUMANOID = 123, //
|
||||
IS_UNDEAD_AND_HP_LESS_THAN_10_PCT = 124, // The Essence Extractor whirrs but does not light up.
|
||||
IS_CLOCKWORK_AND_HP_LESS_THAN_45_PCT = 125, // This spell will only work on clockwork gnomes.
|
||||
IS_WISP_AND_HP_LESS_THAN_10_PCT = 126, // This spell will only work on wisps at or below 10% of their maximum HP.
|
||||
IS_CLASS_MELEE_THAT_CAN_BASH_OR_KICK_EXCEPT_BARD = 127, // This spell will only work on non-bard targets that can bash or kick.
|
||||
IS_CLASS_PURE_MELEE = 128, // This spell will only affect melee classes (warriors, monks, rogues, and berserkers).
|
||||
IS_CLASS_PURE_CASTER = 129, // This spell will only affect pure caster classes (necromancers, wizards, magicians, and enchanters).
|
||||
IS_CLASS_HYBRID_CLASS = 130, // This spell will only affect hybrid classes (paladins, rangers, shadow knights, bards, and beastlords).
|
||||
IS_CLASS_WARRIOR = 131, // This spell will only affect Warriors.
|
||||
IS_CLASS_CLERIC = 132, // This spell will only affect Clerics.
|
||||
IS_CLASS_PALADIN = 133, // This spell will only affect Paladins.
|
||||
IS_CLASS_RANGER = 134, // This spell will only affect Rangers.
|
||||
IS_CLASS_SHADOWKNIGHT = 135, // This spell will only affect Shadow Knights.
|
||||
IS_CLASS_DRUID = 136, // This spell will only affect Druids.
|
||||
IS_CLASS_MONK = 137, // This spell will only affect Monks.
|
||||
IS_CLASS_BARD = 138, // This spell will only affect Bards.
|
||||
IS_CLASS_ROGUE = 139, // This spell will only affect Rogues.
|
||||
IS_CLASS_SHAMAN = 140, // This spell will only affect Shamans.
|
||||
IS_CLASS_NECRO = 141, // This spell will only affect Necromancers.
|
||||
IS_CLASS_WIZARD = 142, // This spell will only affect Wizards.
|
||||
IS_CLASS_MAGE = 143, // This spell will only affect Magicians.
|
||||
IS_CLASS_ENCHANTER = 144, // This spell will only affect Enchanters.
|
||||
IS_CLASS_BEASTLORD = 145, // This spell will only affect Beastlords.
|
||||
IS_CLASS_BERSERKER = 146, // This spell will only affect Berserkers.
|
||||
IS_CLASS_CLR_SHM_DRU = 147, // This spell will only affect priest classes (clerics, druids, and shaman).
|
||||
IS_CLASS_NOT_WAR_PAL_SK = 148, // This spell will not affect Warriors, Paladins, or Shadow Knights.
|
||||
IS_LEVEL_UNDER_100 = 150, // This spell will not affect any target over level 100.
|
||||
IS_NOT_RAID_BOSS = 190, // This spell will not affect raid bosses.
|
||||
IS_RAID_BOSS = 191, // This spell will only affect raid bosses.
|
||||
FRENZIED_BURNOUT_ACTIVE = 192, // This spell will only cast if you have Frenzied Burnout active.
|
||||
FRENZIED_BURNOUT_NOT_ACTIVE = 193, // This spell will only cast if you do not have Frenzied Burnout active.
|
||||
UNKNOWN_199 = 199, //
|
||||
IS_HP_ABOVE_75_PCT = 201, //
|
||||
IS_HP_LESS_THAN_20_PCT = 203, // Your target's HP must be at 20% of its maximum or below. | caster restriction |
|
||||
IS_HP_LESS_THAN_50_PCT = 204, // Your target's HP must be at 50% of its maximum or below. | caster restriction |
|
||||
IS_HP_LESS_THAN_75_PCT = 205, // Your target's HP must be at 75% of its maximum or below.
|
||||
IS_NOT_IN_COMBAT = 216, // This spell will only affect creatures that are not in combat.
|
||||
HAS_AT_LEAST_1_PET_ON_HATELIST = 221, //
|
||||
HAS_AT_LEAST_2_PETS_ON_HATELIST = 222, //
|
||||
HAS_AT_LEAST_3_PETS_ON_HATELIST = 223, //
|
||||
HAS_AT_LEAST_4_PETS_ON_HATELIST = 224, //
|
||||
HAS_AT_LEAST_5_PETS_ON_HATELIST = 225, //
|
||||
HAS_AT_LEAST_6_PETS_ON_HATELIST = 226, //
|
||||
HAS_AT_LEAST_7_PETS_ON_HATELIST = 227, //
|
||||
HAS_AT_LEAST_8_PETS_ON_HATELIST = 228, //
|
||||
HAS_AT_LEAST_9_PETS_ON_HATELIST = 229, //
|
||||
HAS_AT_LEAST_10_PETS_ON_HATELIST = 230, //
|
||||
HAS_AT_LEAST_11_PETS_ON_HATELIST = 231, //
|
||||
HAS_AT_LEAST_12_PETS_ON_HATELIST = 232, //
|
||||
HAS_AT_LEAST_13_PETS_ON_HATELIST = 233, //
|
||||
HAS_AT_LEAST_14_PETS_ON_HATELIST = 234, //
|
||||
HAS_AT_LEAST_15_PETS_ON_HATELIST = 235, //
|
||||
HAS_AT_LEAST_16_PETS_ON_HATELIST = 236, //
|
||||
HAS_AT_LEAST_17_PETS_ON_HATELIST = 237, //
|
||||
HAS_AT_LEAST_18_PETS_ON_HATELIST = 238, //
|
||||
HAS_AT_LEAST_19_PETS_ON_HATELIST = 239, //
|
||||
HAS_AT_LEAST_20_PETS_ON_HATELIST = 240, //
|
||||
IS_HP_LESS_THAN_35_PCT = 250, // Your target's HP must be at 35% of its maximum or below.
|
||||
HAS_BETWEEN_1_TO_2_PETS_ON_HATELIST = 260, // between 1 and 2 pets
|
||||
HAS_BETWEEN_3_TO_5_PETS_ON_HATELIST = 261, // between 3 and 5 pets
|
||||
HAS_BETWEEN_6_TO_9_PETS_ON_HATELIST = 262, // between 6 and 9 pets
|
||||
HAS_BETWEEN_10_TO_14_PETS_ON_HATELIST = 263, // between 10 and 14 pets
|
||||
HAS_MORE_THAN_14_PETS_ON_HATELIST = 264, // 15 or more pets
|
||||
IS_CLASS_CHAIN_OR_PLATE = 304, // This spell will only affect plate or chain wearing classes.
|
||||
IS_HP_BETWEEN_5_AND_9_PCT = 350, // Your target's HP must be between 5% and 9% of its maximum.
|
||||
IS_HP_BETWEEN_10_AND_14_PCT = 351, // Your target's HP must be between 10% and 14% of its maximum.
|
||||
IS_HP_BETWEEN_15_AND_19_PCT = 352, // Your target's HP must be between 15% and 19% of its maximum.
|
||||
IS_HP_BETWEEN_20_AND_24_PCT = 353, // Your target's HP must be between 20% and 24% of its maximum.
|
||||
IS_HP_BETWEEN_25_AND_29_PCT = 354, // Your target's HP must be between 25% and 29% of its maximum.
|
||||
IS_HP_BETWEEN_30_AND_34_PCT = 355, // Your target's HP must be between 30% and 34% of its maximum.
|
||||
IS_HP_BETWEEN_35_AND_39_PCT = 356, // Your target's HP must be between 35% and 39% of its maximum.
|
||||
IS_HP_BETWEEN_40_AND_44_PCT = 357, // Your target's HP must be between 40% and 44% of its maximum.
|
||||
IS_HP_BETWEEN_45_AND_49_PCT = 358, // Your target's HP must be between 45% and 49% of its maximum.
|
||||
IS_HP_BETWEEN_50_AND_54_PCT = 359, // Your target's HP must be between 50% and 54% of its maximum.
|
||||
IS_HP_BETWEEN_55_AND_59_PCT = 360, // Your target's HP must be between 55% and 59% of its maximum.
|
||||
IS_HP_BETWEEN_5_AND_15_PCT = 398, // Your target's HP must be between 5% and 15% of its maximum.
|
||||
IS_HP_BETWEEN_15_AND_25_PCT = 399, // Your target's HP must be between 15% and 25% of its maximum.
|
||||
IS_HP_BETWEEN_1_AND_25_PCT = 400, // Your target's HP must be at 25% of its maximum or below.
|
||||
IS_HP_BETWEEN_25_AND_35_PCT = 401, // Your target's HP must be between 25% and 35% of its maximum.
|
||||
IS_HP_BETWEEN_35_AND_45_PCT = 402, // Your target's HP must be between 35% and 45% of its maximum.
|
||||
IS_HP_BETWEEN_45_AND_55_PCT = 403, // Your target's HP must be between 45% and 55% of its maximum.
|
||||
IS_HP_BETWEEN_55_AND_65_PCT = 404, // Your target's HP must be between 55% and 65% of its maximum.
|
||||
IS_HP_BETWEEN_65_AND_75_PCT = 405, // Your target's HP must be between 65% and 75% of its maximum.
|
||||
IS_HP_BETWEEN_75_AND_85_PCT = 406, // Your target's HP must be between 75% and 85% of its maximum.
|
||||
IS_HP_BETWEEN_85_AND_95_PCT = 407, // Your target's HP must be between 85% and 95% of its maximum.
|
||||
IS_HP_ABOVE_45_PCT = 408, // Your target's HP must be at least 45% of its maximum.
|
||||
IS_HP_ABOVE_55_PCT = 409, // Your target's HP must be at least 55% of its maximum.
|
||||
UNKNOWN_TOO_MUCH_HP_410 = 410, // Your target has too much HP to be affected by this spell.
|
||||
UNKNOWN_TOO_MUCH_HP_411 = 411, // Your target has too much HP to be affected by this spell.
|
||||
IS_HP_ABOVE_99_PCT = 412, //
|
||||
IS_MANA_ABOVE_10_PCT = 429, // You must have at least 10% of your maximum mana available to cast this spell. | caster restriction |
|
||||
IS_HP_BELOW_5_PCT = 501, //
|
||||
IS_HP_BELOW_10_PCT = 502, //
|
||||
IS_HP_BELOW_15_PCT = 503, //
|
||||
IS_HP_BELOW_20_PCT = 504, // Your target's HP must be at 20% of its maximum or below.
|
||||
IS_HP_BELOW_25_PCT = 505, //
|
||||
IS_HP_BELOW_30_PCT = 506, //
|
||||
IS_HP_BELOW_35_PCT = 507, //
|
||||
IS_HP_BELOW_40_PCT = 508, //
|
||||
IS_HP_BELOW_45_PCT = 509, // Your target's HP must be at 45% of its maximum or below.
|
||||
IS_HP_BELOW_50_PCT = 510, //
|
||||
IS_HP_BELOW_55_PCT = 511, //
|
||||
IS_HP_BELOW_60_PCT = 512, //
|
||||
IS_HP_BELOW_65_PCT = 513, //
|
||||
IS_HP_BELOW_70_PCT = 514, //
|
||||
IS_HP_BELOW_75_PCT = 515, //
|
||||
IS_HP_BELOW_80_PCT = 516, //
|
||||
IS_HP_BELOW_85_PCT = 517, //
|
||||
IS_HP_BELOW_90_PCT = 518, // This ability requires you to be at or below 90% of your maximum HP. | caster restriction |
|
||||
IS_HP_BELOW_95_PCT = 519, //
|
||||
IS_MANA_BELOW_UNKNOWN_PCT = 521, //
|
||||
IS_ENDURANCE_BELOW_40_PCT = 522, //
|
||||
IS_MANA_BELOW_40_PCT = 523, //
|
||||
IS_HP_ABOVE_20_PCT = 524, // Your target's HP must be at least 21% of its maximum.
|
||||
IS_BODY_TYPE_UNDEFINED = 600, // This spell will only work on creatures with an undefined body type.
|
||||
IS_BODY_TYPE_HUMANOID = 601, // This spell will only work on humanoid creatures.
|
||||
IS_BODY_TYPE_WEREWOLF = 602, // This spell will only work on lycanthrope creatures.
|
||||
IS_BODY_TYPE_UNDEAD = 603, // This spell will only work on undead creatures.
|
||||
IS_BODY_TYPE_GIANTS = 604, // This spell will only work on giants.
|
||||
IS_BODY_TYPE_CONSTRUCTS = 605, // This spell will only work on constructs.
|
||||
IS_BODY_TYPE_EXTRAPLANAR = 606, // This spell will only work on extraplanar creatures.
|
||||
IS_BODY_TYPE_MAGICAL_CREATURE = 607, // This spell will only work on creatures constructed from magic.
|
||||
IS_BODY_TYPE_UNDEADPET = 608, // This spell will only work on animated undead servants.
|
||||
IS_BODY_TYPE_KAELGIANT = 609, // This spell will only work on the Giants of Kael Drakkal.
|
||||
IS_BODY_TYPE_COLDAIN = 610, // This spell will only work on Coldain Dwarves.
|
||||
IS_BODY_TYPE_VAMPIRE = 612, // This spell will only work on vampires.
|
||||
IS_BODY_TYPE_ATEN_HA_RA = 613, // This spell will only work on Aten Ha Ra.
|
||||
IS_BODY_TYPE_GREATER_AHKEVANS = 614, // This spell will only work on Greater Ahkevans.
|
||||
IS_BODY_TYPE_KHATI_SHA = 615, // This spell will only work on Khati Sha.
|
||||
IS_BODY_TYPE_LORD_INQUISITOR_SERU = 616, // This spell will only work on Lord Inquisitor Seru.
|
||||
IS_BODY_TYPE_GRIEG_VENEFICUS = 617, // This spell will only work on Grieg Veneficus.
|
||||
IS_BODY_TYPE_FROM_PLANE_OF_WAR = 619, // This spell will only work on creatures from the Plane of War.
|
||||
IS_BODY_TYPE_LUGGALD = 620, // This spell will only work on Luggalds.
|
||||
IS_BODY_TYPE_ANIMAL = 621, // This spell will only work on animals.
|
||||
IS_BODY_TYPE_INSECT = 622, // This spell will only work on insects.
|
||||
IS_BODY_TYPE_MONSTER = 623, // This spell will only work on monsters.
|
||||
IS_BODY_TYPE_ELEMENTAL = 624, // This spell will only work on elemental creatures.
|
||||
IS_BODY_TYPE_PLANT = 625, // This spell will only work on plants.
|
||||
IS_BODY_TYPE_DRAGON2 = 626, // This spell will only work on dragons.
|
||||
IS_BODY_TYPE_SUMMONED_ELEMENTAL = 627, // This spell will only work on summoned elementals.
|
||||
IS_BODY_TYPE_WARDER = 628, //
|
||||
IS_BODY_TYPE_DRAGON_OF_TOV = 630, // This spell will only work on Dragons of Veeshan's Temple.
|
||||
IS_BODY_TYPE_FAMILIAR = 631, // This spell will only work on familiars.
|
||||
IS_BODY_TYPE_MURAMITE = 634, // This spell will only work on Muramites.
|
||||
IS_NOT_UNDEAD_OR_SUMMONED = 635, //
|
||||
IS_NOT_PLANT = 636, // This spell will not affect plants.
|
||||
IS_NOT_CLIENT = 700, // This spell will not work on adventurers.
|
||||
IS_CLIENT = 701, // This spell will only work on adventurers.
|
||||
IS_LEVEL_ABOVE_42_AND_IS_CLIENT = 800, // This spell will only work on level 43 or higher adventurers.
|
||||
UNKNOWN_812 = 812, // | seen in spell 22616 Thaumatize Pet Mana Regen Base |
|
||||
UNKNOWN_814 = 814, // | seen in spell 22704 Vegetentacles I |
|
||||
IS_TREANT = 815, // This spell will only work on treants.
|
||||
IS_BIXIE2 = 816, // This spell will only work on bixies.
|
||||
IS_SCARECROW = 817, // This spell will only work on scarecrows.
|
||||
IS_VAMPIRE_OR_UNDEAD_OR_UNDEADPET = 818, // This spell will only work on vampires, undead, or animated undead creatures.
|
||||
IS_NOT_VAMPIRE_OR_UNDEAD = 819, // This spell will not work on vampires or undead creatures.
|
||||
IS_CLASS_KNIGHT_HYBRID_MELEE = 820, // This spell will only work on knights, hybrids, or melee classes.
|
||||
IS_CLASS_WARRIOR_CASTER_PRIEST = 821, // This spell will only work on warriors, casters, or priests.
|
||||
UNKNOWN_822 = 822, // | seen in spell 22870 Morell's Distraction 822 |
|
||||
IS_END_BELOW_21_PCT = 825, // This ability requires you to be at or below 21% of your maximum endurance.
|
||||
IS_END_BELOW_25_PCT = 826, // This ability requires you to be at or below 25% of your maximum endurance.
|
||||
IS_END_BELOW_29_PCT = 827, // This ability requires you to be at or below 29% of your maximum endurance.
|
||||
IS_REGULAR_SERVER = 836, //
|
||||
IS_PROGRESSION_SERVER = 837, //
|
||||
IS_GOD_EXPANSION_UNLOCKED = 839, //
|
||||
UNKNOWN_840 = 840, // | caster restriction | seen in spell 6883 Expedient Recovery
|
||||
UNKNOWN_841 = 841, // | caster restriction | seen in spell 32192 Merciless Blow
|
||||
IS_HUMANOID_LEVEL_84_MAX = 842, //
|
||||
IS_HUMANOID_LEVEL_86_MAX = 843, //
|
||||
IS_HUMANOID_LEVEL_88_MAX = 844, //
|
||||
HAS_CRYSTALLIZED_FLAME_BUFF = 845, // This spell will only work on targets afflicted by Crystallized Flame. | On live spell does not appear to be a buff
|
||||
HAS_INCENDIARY_OOZE_BUFF = 847, // This spell will only work on targets afflicted by Incendiary Ooze.
|
||||
IS_LEVEL_90_MAX = 860, //
|
||||
IS_LEVEL_92_MAX = 861, //
|
||||
IS_LEVEL_94_MAX = 862, //
|
||||
IS_LEVEL_95_MAX = 863, //
|
||||
IS_LEVEL_97_MAX = 864, //
|
||||
IS_LEVEL_99_MAX = 865, //
|
||||
HAS_WEAPONSTANCE_DEFENSIVE_PROFICIENCY = 866, // | caster restriction |
|
||||
HAS_WEAPONSTANCE_TWO_HAND_PROFICIENCY = 867, // | caster restriction |
|
||||
HAS_WEAPONSTANCE_DUAL_WEILD_PROFICIENCY = 868, // | caster restriction |
|
||||
IS_LEVEL_100_MAX = 869, //
|
||||
IS_LEVEL_102_MAX = 870, //
|
||||
IS_LEVEL_104_MAX = 871, //
|
||||
IS_LEVEL_105_MAX = 872, //
|
||||
IS_LEVEL_107_MAX = 873, //
|
||||
IS_LEVEL_109_MAX = 874, //
|
||||
IS_LEVEL_110_MAX = 875, //
|
||||
IS_LEVEL_112_MAX = 876, //
|
||||
IS_LEVEL_114_MAX = 877, //
|
||||
HAS_TBL_ESIANTI_ACCESS = 997, // This spell will only transport adventurers who have gained access to Esianti: Palace of the Winds. | not implemented
|
||||
HAS_ITEM_CLOCKWORK_SCRAPS = 999, //
|
||||
IS_BETWEEN_LEVEL_1_AND_75 = 1000, //
|
||||
IS_BETWEEN_LEVEL_76_AND_85 = 1001, //
|
||||
IS_BETWEEN_LEVEL_86_AND_95 = 1002, //
|
||||
IS_BETWEEN_LEVEL_96_AND_105 = 1003, //
|
||||
IS_HP_LESS_THAN_80_PCT = 1004, //
|
||||
IS_LEVEL_ABOVE_34 = 1474, // Your target must be level 35 or higher.
|
||||
IN_TWO_HANDED_STANCE = 2000, // You must be in your two-handed stance to use this ability.
|
||||
IN_DUAL_WIELD_HANDED_STANCE = 2001, // You must be in your dual-wielding stance to use this ability.
|
||||
IN_SHIELD_STANCE = 2002, // You must be in your shield stance to use this ability.
|
||||
NOT_IN_TWO_HANDED_STANCE = 2010, // You may not use this ability if you are in your two-handed stance.
|
||||
NOT_IN_DUAL_WIELD_HANDED_STANCE = 2011, // You may not use this ability if you are in your dual-wielding stance.
|
||||
NOT_IN_SHIELD_STANCE = 2012, // You may not use this ability if you are in your shield stance.
|
||||
LEVEL_46_MAX = 2761, //
|
||||
DISABLED_UNTIL_EXPANSION_ROK = 7000, // This ability is disabled until Ruins of Kunark.
|
||||
DISABLED_UNTIL_EXPANSION_SOV = 7001, // This ability is disabled until Scars of Velious.
|
||||
DISABLED_UNTIL_EXPANSION_SOL = 7002, // This ability is disabled until Shadows of Luclin.
|
||||
DISABLED_UNTIL_EXPANSION_POP = 7003, // This ability is disabled until Planes of Power.
|
||||
DISABLED_UNTIL_EXPANSION_LOY = 7004, // This ability is disabled until Legacy of Ykesha.
|
||||
DISABLED_UNTIL_EXPANSION_LDON = 7005, // This ability is disabled until Lost Dungeons of Norrath.
|
||||
DISABLED_UNTIL_EXPANSION_GOD = 7006, // This ability is disabled until Gates of Discord.
|
||||
DISABLED_UNTIL_EXPANSION_OOW = 7007, // This ability is disabled until Omens of War.
|
||||
DISABLED_UNTIL_EXPANSION_DON = 7008, // This ability is disabled until Dragons of Norrath.
|
||||
DISABLED_UNTIL_EXPANSION_DOD = 7009, // This ability is disabled until Depths of Darkhollow.
|
||||
DISABLED_UNTIL_EXPANSION_POR = 7010, // This ability is disabled until Prophecy of Ro.
|
||||
DISABLED_UNTIL_EXPANSION_TSS = 7011, // This ability is disabled until Serpent's Spine.
|
||||
DISABLED_UNTIL_EXPANSION_TBS = 7012, // This ability is disabled until Buried Sea.
|
||||
DISABLED_UNTIL_EXPANSION_SOF = 7013, // This ability is disabled until Secrets of Faydwer.
|
||||
DISABLED_UNTIL_EXPANSION_SOD = 7014, // This ability is disabled until Seeds of Destruction.
|
||||
DISABLED_UNTIL_EXPANSION_UF = 7015, // This ability is disabled until Underfoot.
|
||||
DISABLED_UNTIL_EXPANSION_HOT = 7016, // This ability is disabled until House of Thule.
|
||||
DISABLED_UNTIL_EXPANSION_VOA = 7017, // This ability is disabled until Veil of Alaris.
|
||||
DISABLED_UNTIL_EXPANSION_ROF = 7018, // This ability is disabled until Rain of Fear.
|
||||
DISABLED_UNTIL_EXPANSION_COF = 7019, // This ability is disabled until Call of the Forsaken.
|
||||
DISABLED_UNTIL_EXPANSION_TDS = 7020, // This ability is disabled until Darkened Sea.
|
||||
DISABLED_UNTIL_EXPANSION_TBM = 7021, // This ability is disabled until Broken Mirror.
|
||||
DISABLED_UNTIL_EXPANSION_EOK = 7022, // This ability is disabled until Empires of Kunark.
|
||||
DISABLED_UNTIL_EXPANSION_ROS = 7023, // This ability is disabled until Ring of Scale.
|
||||
DISABLED_UNTIL_EXPANSION_TBL = 7024, // This ability is disabled until The Burning Lands.
|
||||
DISABLED_UNTIL_EXPANSION_TOV = 7025, // This ability is disabled until Torment of Velious.
|
||||
DISABLED_UNTIL_EXPANSION_COV = 7026, // This ability is disabled until Claws of Veeshan.
|
||||
HAS_NO_MANA_BURN_BUFF = 8450, // This spell will not take hold until the effects of the previous Mana Burn have expired.
|
||||
IS_RACE_FIRST_CUSTOM = 10000, // | custom range to restrict targets or casters by race *not on live* |
|
||||
IS_RACE_LAST_CUSTOM = 11000, // | custom range to restrict targets or casters by race *not on live* |
|
||||
IS_CLIENT_AND_MALE_PLATE_USER = 11044, // Your target wouldn't look right as that Jann.
|
||||
IS_CLEINT_AND_MALE_DRUID_ENCHANTER_MAGICIAN_NECROANCER_SHAMAN_OR_WIZARD = 11090, // Your target wouldn't look right as that Jann.
|
||||
IS_CLIENT_AND_MALE_BEASTLORD_BERSERKER_MONK_RANGER_OR_ROGUE = 11209, // Your target wouldn't look right as that Jann.
|
||||
IS_CLIENT_AND_FEMALE_PLATE_USER = 11210, // Your target wouldn't look right as that Jann.
|
||||
IS_CLIENT_AND_FEMALE_DRUID_ENCHANTER_MAGICIAN_NECROANCER_SHAMAN_OR_WIZARD = 11211, // Your target wouldn't look right as that Jann.
|
||||
IS_CLIENT_AND_FEMALE_BEASTLORD_BERSERKER_MONK_RANGER_OR_ROGUE = 11248, // Your target wouldn't look right as that Jann.
|
||||
HAS_TRAVELED_TO_STRATOS = 11260, // You must travel to Stratos at least once before wishing to go there.
|
||||
HAS_TRAVELED_TO_AALISHAI = 11261, // You must travel to Aalishai at least once before wishing to go there.
|
||||
HAS_TRAVELED_TO_MEARATS = 11268, // You must travel to Mearatas at least once before wishing to go there.
|
||||
HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, //
|
||||
IS_HP_ABOVE_50_PCT = 16010, //
|
||||
IS_HP_UNDER_50_PCT = 16031, //
|
||||
IS_OFF_HAND_EQUIPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
|
||||
HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction |
|
||||
HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon.
|
||||
IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana.
|
||||
IS_MANA_ABOVE_50_PCT = 38312, // This ability requires you to be at or above 50% of your maximum mana.
|
||||
COMPLETED_ACHIEVEMENT_LEGENDARY_ANSWERER = 39281, // You have completed Legendary Answerer.
|
||||
HAS_NO_ROGUES_FURY_BUFF = 40297, // This spell will not affect anyone that currently has Rogue's Fury active. | caster restriction |
|
||||
NOT_COMPLETED_ACHIEVEMENT_LEGENDARY_ANSWERER = 42280, // You must complete Legendary Answerer.
|
||||
IS_SUMMONED_OR_UNDEAD = 49326, //
|
||||
IS_CLASS_CASTER_PRIEST = 49529, //
|
||||
IS_END_OR_MANA_ABOVE_20_PCT = 49543, // You must have at least 20% of your maximum mana and endurance to use this ability. //pure melee class check end, other check mana
|
||||
IS_END_OR_MANA_BELOW_30_PCT = 49573, // Your target already has 30% or more of their maximum mana or endurance. //pure melee class check the, other check more
|
||||
IS_CLASS_BARD2 = 49574, //
|
||||
IS_NOT_CLASS_BARD = 49575, //
|
||||
HAS_NO_FURIOUS_RAMPAGE_BUFF = 49612, // This ability cannot be activated while Furious Rampage is active.
|
||||
IS_END_OR_MANA_BELOW_30_PCT2 = 49809, // You can only perform this solo if you have less than 30% mana or endurance.
|
||||
HAS_NO_HARMONIOUS_PRECISION_BUFF = 50003, // This spell will not work if you have the Harmonious Precision line active.
|
||||
HAS_NO_HARMONIOUS_EXPANSE_BUFF = 50009, // This spell will not work if you have the Harmonious Expanse line active.
|
||||
UNKNOWN_99999 = 99999, // | caster restriction | works will spell 27672 Strike of Ire
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum SpellTypes : uint32
|
||||
{
|
||||
@ -1037,7 +1348,7 @@ struct SPDat_Spell_Struct
|
||||
/* 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
|
||||
/* 219 */ int no_heal_damage_item_mod; // -- NO_HEAL_DAMAGE_ITEM_MOD
|
||||
/* 220 */ //int caster_requirement_id; // -- CASTER_REQUIREMENT_ID
|
||||
/* 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
|
||||
|
||||
@ -5903,6 +5903,7 @@ int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot)
|
||||
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 == "caster_requirement_id") { return spells[spell_id].caster_requirement_id; }
|
||||
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; }
|
||||
|
||||
@ -420,6 +420,7 @@ public:
|
||||
inline float GetTargetRingZ() const { return m_TargetRing.z; }
|
||||
inline bool HasEndurUpkeep() const { return endur_upkeep; }
|
||||
inline void SetEndurUpkeep(bool val) { endur_upkeep = val; }
|
||||
bool HasBuffWithSpellGroup(int spellgroup);
|
||||
|
||||
//Basic Stats/Inventory
|
||||
virtual void SetLevel(uint8 in_level, bool command = false) { level = in_level; }
|
||||
@ -832,7 +833,7 @@ public:
|
||||
int8 GetDecayEffectValue(uint16 spell_id, uint16 spelleffect);
|
||||
int32 GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg);
|
||||
void MeleeLifeTap(int32 damage);
|
||||
bool PassCastRestriction(bool UseCastRestriction = true, int16 value = 0, bool IsDamage = true);
|
||||
bool PassCastRestriction(int value);
|
||||
bool ImprovedTaunt();
|
||||
bool TryRootFadeByDamage(int buffslot, Mob* attacker);
|
||||
float GetSlowMitigation() const { return slow_mitigation; }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1535,8 +1535,13 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if (isproc && IsNPC() && CastToNPC()->GetInnateProcSpellID() == spell_id)
|
||||
targetType = ST_Target;
|
||||
|
||||
if (spell_target && !spell_target->PassCastRestriction(true, spells[spell_id].CastRestriction)){
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
if (spell_target && spells[spell_id].CastRestriction && !spell_target->PassCastRestriction(spells[spell_id].CastRestriction)){
|
||||
Message(Chat::Red, "Your target does not meet the spell requirements."); //Current live also adds description after this from dbstr_us type 39
|
||||
return false;
|
||||
}
|
||||
|
||||
if (spells[spell_id].caster_requirement_id && !PassCastRestriction(spells[spell_id].caster_requirement_id)) {
|
||||
MessageString(Chat::Red, SPELL_WOULDNT_HOLD);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4146,6 +4151,16 @@ uint32 Mob::BuffCount() {
|
||||
return active_buff_count;
|
||||
}
|
||||
|
||||
bool Mob::HasBuffWithSpellGroup(int spellgroup)
|
||||
{
|
||||
for (int i = 0; i < GetMaxTotalSlots(); i++) {
|
||||
if (IsValidSpell(buffs[i].spellid) && spells[buffs[i].spellid].spellgroup == spellgroup) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// removes all buffs
|
||||
void Mob::BuffFadeAll()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user