diff --git a/includes/defines.php b/includes/defines.php index 3a565119..4fec740c 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -834,6 +834,492 @@ define('ITEM_MOD_SHADOW_POWER', 60); define('ITEM_MOD_NATURE_POWER', 61); define('ITEM_MOD_ARCANE_POWER', 62); +// Spell Effects and Auras +define('SPELL_EFFECT_NONE', 0); +define('SPELL_EFFECT_INSTAKILL', 1); +define('SPELL_EFFECT_SCHOOL_DAMAGE', 2); +define('SPELL_EFFECT_DUMMY', 3); +define('SPELL_EFFECT_PORTAL_TELEPORT', 4); +define('SPELL_EFFECT_TELEPORT_UNITS', 5); +define('SPELL_EFFECT_APPLY_AURA', 6); +define('SPELL_EFFECT_ENVIRONMENTAL_DAMAGE', 7); +define('SPELL_EFFECT_POWER_DRAIN', 8); +define('SPELL_EFFECT_HEALTH_LEECH', 9); +define('SPELL_EFFECT_HEAL', 10); +define('SPELL_EFFECT_BIND', 11); +define('SPELL_EFFECT_PORTAL', 12); +define('SPELL_EFFECT_RITUAL_BASE', 13); +define('SPELL_EFFECT_RITUAL_SPECIALIZE', 14); +define('SPELL_EFFECT_RITUAL_ACTIVATE_PORTAL', 15); +define('SPELL_EFFECT_QUEST_COMPLETE', 16); +define('SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL', 17); +define('SPELL_EFFECT_RESURRECT', 18); +define('SPELL_EFFECT_ADD_EXTRA_ATTACKS', 19); +define('SPELL_EFFECT_DODGE', 20); +define('SPELL_EFFECT_EVADE', 21); +define('SPELL_EFFECT_PARRY', 22); +define('SPELL_EFFECT_BLOCK', 23); +define('SPELL_EFFECT_CREATE_ITEM', 24); +define('SPELL_EFFECT_WEAPON', 25); +define('SPELL_EFFECT_DEFENSE', 26); +define('SPELL_EFFECT_PERSISTENT_AREA_AURA', 27); +define('SPELL_EFFECT_SUMMON', 28); +define('SPELL_EFFECT_LEAP', 29); +define('SPELL_EFFECT_ENERGIZE', 30); +define('SPELL_EFFECT_WEAPON_PERCENT_DAMAGE', 31); +define('SPELL_EFFECT_TRIGGER_MISSILE', 32); +define('SPELL_EFFECT_OPEN_LOCK', 33); +define('SPELL_EFFECT_SUMMON_CHANGE_ITEM', 34); +define('SPELL_EFFECT_APPLY_AREA_AURA_PARTY', 35); +define('SPELL_EFFECT_LEARN_SPELL', 36); +define('SPELL_EFFECT_SPELL_DEFENSE', 37); +define('SPELL_EFFECT_DISPEL', 38); +define('SPELL_EFFECT_LANGUAGE', 39); +define('SPELL_EFFECT_DUAL_WIELD', 40); +define('SPELL_EFFECT_JUMP', 41); +define('SPELL_EFFECT_JUMP_DEST', 42); +define('SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER', 43); +define('SPELL_EFFECT_SKILL_STEP', 44); +define('SPELL_EFFECT_ADD_HONOR', 45); +define('SPELL_EFFECT_SPAWN', 46); +define('SPELL_EFFECT_TRADE_SKILL', 47); +define('SPELL_EFFECT_STEALTH', 48); +define('SPELL_EFFECT_DETECT', 49); +define('SPELL_EFFECT_TRANS_DOOR', 50); +define('SPELL_EFFECT_FORCE_CRITICAL_HIT', 51); +define('SPELL_EFFECT_GUARANTEE_HIT', 52); +define('SPELL_EFFECT_ENCHANT_ITEM', 53); +define('SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY', 54); +define('SPELL_EFFECT_TAMECREATURE', 55); +define('SPELL_EFFECT_SUMMON_PET', 56); +define('SPELL_EFFECT_LEARN_PET_SPELL', 57); +define('SPELL_EFFECT_WEAPON_DAMAGE', 58); +define('SPELL_EFFECT_CREATE_RANDOM_ITEM', 59); +define('SPELL_EFFECT_PROFICIENCY', 60); +define('SPELL_EFFECT_SEND_EVENT', 61); +define('SPELL_EFFECT_POWER_BURN', 62); +define('SPELL_EFFECT_THREAT', 63); +define('SPELL_EFFECT_TRIGGER_SPELL', 64); +define('SPELL_EFFECT_APPLY_AREA_AURA_RAID', 65); +define('SPELL_EFFECT_CREATE_MANA_GEM', 66); +define('SPELL_EFFECT_HEAL_MAX_HEALTH', 67); +define('SPELL_EFFECT_INTERRUPT_CAST', 68); +define('SPELL_EFFECT_DISTRACT', 69); +define('SPELL_EFFECT_PULL', 70); +define('SPELL_EFFECT_PICKPOCKET', 71); +define('SPELL_EFFECT_ADD_FARSIGHT', 72); +define('SPELL_EFFECT_UNTRAIN_TALENTS', 73); +define('SPELL_EFFECT_APPLY_GLYPH', 74); +define('SPELL_EFFECT_HEAL_MECHANICAL', 75); +define('SPELL_EFFECT_SUMMON_OBJECT_WILD', 76); +define('SPELL_EFFECT_SCRIPT_EFFECT', 77); +define('SPELL_EFFECT_ATTACK', 78); +define('SPELL_EFFECT_SANCTUARY', 79); +define('SPELL_EFFECT_ADD_COMBO_POINTS', 80); +define('SPELL_EFFECT_CREATE_HOUSE', 81); +define('SPELL_EFFECT_BIND_SIGHT', 82); +define('SPELL_EFFECT_DUEL', 83); +define('SPELL_EFFECT_STUCK', 84); +define('SPELL_EFFECT_SUMMON_PLAYER', 85); +define('SPELL_EFFECT_ACTIVATE_OBJECT', 86); +define('SPELL_EFFECT_GAMEOBJECT_DAMAGE', 87); +define('SPELL_EFFECT_GAMEOBJECT_REPAIR', 88); +define('SPELL_EFFECT_GAMEOBJECT_SET_DESTRUCTION_STATE', 89); +define('SPELL_EFFECT_KILL_CREDIT', 90); +define('SPELL_EFFECT_THREAT_ALL', 91); +define('SPELL_EFFECT_ENCHANT_HELD_ITEM', 92); +define('SPELL_EFFECT_FORCE_DESELECT', 93); +define('SPELL_EFFECT_SELF_RESURRECT', 94); +define('SPELL_EFFECT_SKINNING', 95); +define('SPELL_EFFECT_CHARGE', 96); +define('SPELL_EFFECT_CAST_BUTTON', 97); +define('SPELL_EFFECT_KNOCK_BACK', 98); +define('SPELL_EFFECT_DISENCHANT', 99); +define('SPELL_EFFECT_INEBRIATE', 100); +define('SPELL_EFFECT_FEED_PET', 101); +define('SPELL_EFFECT_DISMISS_PET', 102); +define('SPELL_EFFECT_REPUTATION', 103); +define('SPELL_EFFECT_SUMMON_OBJECT_SLOT1', 104); +define('SPELL_EFFECT_SUMMON_OBJECT_SLOT2', 105); +define('SPELL_EFFECT_SUMMON_OBJECT_SLOT3', 106); +define('SPELL_EFFECT_SUMMON_OBJECT_SLOT4', 107); +define('SPELL_EFFECT_DISPEL_MECHANIC', 108); +define('SPELL_EFFECT_RESURRECT_PET', 109); +define('SPELL_EFFECT_DESTROY_ALL_TOTEMS', 110); +define('SPELL_EFFECT_DURABILITY_DAMAGE', 111); +define('SPELL_EFFECT_SUMMON_DEMON', 112); +define('SPELL_EFFECT_RESURRECT_NEW', 113); +define('SPELL_EFFECT_ATTACK_ME', 114); +define('SPELL_EFFECT_DURABILITY_DAMAGE_PCT', 115); +define('SPELL_EFFECT_SKIN_PLAYER_CORPSE', 116); +define('SPELL_EFFECT_SPIRIT_HEAL', 117); +define('SPELL_EFFECT_SKILL', 118); +define('SPELL_EFFECT_APPLY_AREA_AURA_PET', 119); +define('SPELL_EFFECT_TELEPORT_GRAVEYARD', 120); +define('SPELL_EFFECT_NORMALIZED_WEAPON_DMG', 121); +define('SPELL_EFFECT_122', 122); +define('SPELL_EFFECT_SEND_TAXI', 123); +define('SPELL_EFFECT_PULL_TOWARDS', 124); +define('SPELL_EFFECT_MODIFY_THREAT_PERCENT', 125); +define('SPELL_EFFECT_STEAL_BENEFICIAL_BUFF', 126); +define('SPELL_EFFECT_PROSPECTING', 127); +define('SPELL_EFFECT_APPLY_AREA_AURA_FRIEND', 128); +define('SPELL_EFFECT_APPLY_AREA_AURA_ENEMY', 129); +define('SPELL_EFFECT_REDIRECT_THREAT', 130); +define('SPELL_EFFECT_PLAY_SOUND', 131); +define('SPELL_EFFECT_PLAY_MUSIC', 132); +define('SPELL_EFFECT_UNLEARN_SPECIALIZATION', 133); +define('SPELL_EFFECT_KILL_CREDIT2', 134); +define('SPELL_EFFECT_CALL_PET', 135); +define('SPELL_EFFECT_HEAL_PCT', 136); +define('SPELL_EFFECT_ENERGIZE_PCT', 137); +define('SPELL_EFFECT_LEAP_BACK', 138); +define('SPELL_EFFECT_CLEAR_QUEST', 139); +define('SPELL_EFFECT_FORCE_CAST', 140); +define('SPELL_EFFECT_FORCE_CAST_WITH_VALUE', 141); +define('SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE', 142); +define('SPELL_EFFECT_APPLY_AREA_AURA_OWNER', 143); +define('SPELL_EFFECT_KNOCK_BACK_DEST', 144); +define('SPELL_EFFECT_PULL_TOWARDS_DEST', 145); +define('SPELL_EFFECT_ACTIVATE_RUNE', 146); +define('SPELL_EFFECT_QUEST_FAIL', 147); +define('SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE', 148); +define('SPELL_EFFECT_CHARGE_DEST', 149); +define('SPELL_EFFECT_QUEST_START', 150); +define('SPELL_EFFECT_TRIGGER_SPELL_2', 151); +define('SPELL_EFFECT_SUMMON_RAF_FRIEND', 152); +define('SPELL_EFFECT_CREATE_TAMED_PET', 153); +define('SPELL_EFFECT_DISCOVER_TAXI', 154); +define('SPELL_EFFECT_TITAN_GRIP', 155); +define('SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC', 156); +define('SPELL_EFFECT_CREATE_ITEM_2', 157); +define('SPELL_EFFECT_MILLING', 158); +define('SPELL_EFFECT_ALLOW_RENAME_PET', 159); +define('SPELL_EFFECT_FORCE_CAST_2', 160); +define('SPELL_EFFECT_TALENT_SPEC_COUNT', 161); +define('SPELL_EFFECT_TALENT_SPEC_SELECT', 162); +define('SPELL_EFFECT_163', 163); +define('SPELL_EFFECT_REMOVE_AURA', 164); + +define('SPELL_AURA_NONE', 0); +define('SPELL_AURA_BIND_SIGHT', 1); +define('SPELL_AURA_MOD_POSSESS', 2); +define('SPELL_AURA_PERIODIC_DAMAGE', 3); +define('SPELL_AURA_DUMMY', 4); +define('SPELL_AURA_MOD_CONFUSE', 5); +define('SPELL_AURA_MOD_CHARM', 6); +define('SPELL_AURA_MOD_FEAR', 7); +define('SPELL_AURA_PERIODIC_HEAL', 8); +define('SPELL_AURA_MOD_ATTACKSPEED', 9); +define('SPELL_AURA_MOD_THREAT', 10); +define('SPELL_AURA_MOD_TAUNT', 11); +define('SPELL_AURA_MOD_STUN', 12); +define('SPELL_AURA_MOD_DAMAGE_DONE', 13); +define('SPELL_AURA_MOD_DAMAGE_TAKEN', 14); +define('SPELL_AURA_DAMAGE_SHIELD', 15); +define('SPELL_AURA_MOD_STEALTH', 16); +define('SPELL_AURA_MOD_STEALTH_DETECT', 17); +define('SPELL_AURA_MOD_INVISIBILITY', 18); +define('SPELL_AURA_MOD_INVISIBILITY_DETECT', 19); +define('SPELL_AURA_OBS_MOD_HEALTH', 20); +define('SPELL_AURA_OBS_MOD_POWER', 21); +define('SPELL_AURA_MOD_RESISTANCE', 22); +define('SPELL_AURA_PERIODIC_TRIGGER_SPELL', 23); +define('SPELL_AURA_PERIODIC_ENERGIZE', 24); +define('SPELL_AURA_MOD_PACIFY', 25); +define('SPELL_AURA_MOD_ROOT', 26); +define('SPELL_AURA_MOD_SILENCE', 27); +define('SPELL_AURA_REFLECT_SPELLS', 28); +define('SPELL_AURA_MOD_STAT', 29); +define('SPELL_AURA_MOD_SKILL', 30); +define('SPELL_AURA_MOD_INCREASE_SPEED', 31); +define('SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED', 32); +define('SPELL_AURA_MOD_DECREASE_SPEED', 33); +define('SPELL_AURA_MOD_INCREASE_HEALTH', 34); +define('SPELL_AURA_MOD_INCREASE_ENERGY', 35); +define('SPELL_AURA_MOD_SHAPESHIFT', 36); +define('SPELL_AURA_EFFECT_IMMUNITY', 37); +define('SPELL_AURA_STATE_IMMUNITY', 38); +define('SPELL_AURA_SCHOOL_IMMUNITY', 39); +define('SPELL_AURA_DAMAGE_IMMUNITY', 40); +define('SPELL_AURA_DISPEL_IMMUNITY', 41); +define('SPELL_AURA_PROC_TRIGGER_SPELL', 42); +define('SPELL_AURA_PROC_TRIGGER_DAMAGE', 43); +define('SPELL_AURA_TRACK_CREATURES', 44); +define('SPELL_AURA_TRACK_RESOURCES', 45); +define('SPELL_AURA_46', 46); +define('SPELL_AURA_MOD_PARRY_PERCENT', 47); +define('SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT', 48); +define('SPELL_AURA_MOD_DODGE_PERCENT', 49); +define('SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT', 50); +define('SPELL_AURA_MOD_BLOCK_PERCENT', 51); +define('SPELL_AURA_MOD_WEAPON_CRIT_PERCENT', 52); +define('SPELL_AURA_PERIODIC_LEECH', 53); +define('SPELL_AURA_MOD_HIT_CHANCE', 54); +define('SPELL_AURA_MOD_SPELL_HIT_CHANCE', 55); +define('SPELL_AURA_TRANSFORM', 56); +define('SPELL_AURA_MOD_SPELL_CRIT_CHANCE', 57); +define('SPELL_AURA_MOD_INCREASE_SWIM_SPEED', 58); +define('SPELL_AURA_MOD_DAMAGE_DONE_CREATURE', 59); +define('SPELL_AURA_MOD_PACIFY_SILENCE', 60); +define('SPELL_AURA_MOD_SCALE', 61); +define('SPELL_AURA_PERIODIC_HEALTH_FUNNEL', 62); +define('SPELL_AURA_63', 63); +define('SPELL_AURA_PERIODIC_MANA_LEECH', 64); +define('SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK', 65); +define('SPELL_AURA_FEIGN_DEATH', 66); +define('SPELL_AURA_MOD_DISARM', 67); +define('SPELL_AURA_MOD_STALKED', 68); +define('SPELL_AURA_SCHOOL_ABSORB', 69); +define('SPELL_AURA_EXTRA_ATTACKS', 70); +define('SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL', 71); +define('SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT', 72); +define('SPELL_AURA_MOD_POWER_COST_SCHOOL', 73); +define('SPELL_AURA_REFLECT_SPELLS_SCHOOL', 74); +define('SPELL_AURA_MOD_LANGUAGE', 75); +define('SPELL_AURA_FAR_SIGHT', 76); +define('SPELL_AURA_MECHANIC_IMMUNITY', 77); +define('SPELL_AURA_MOUNTED', 78); +define('SPELL_AURA_MOD_DAMAGE_PERCENT_DONE', 79); +define('SPELL_AURA_MOD_PERCENT_STAT', 80); +define('SPELL_AURA_SPLIT_DAMAGE_PCT', 81); +define('SPELL_AURA_WATER_BREATHING', 82); +define('SPELL_AURA_MOD_BASE_RESISTANCE', 83); +define('SPELL_AURA_MOD_REGEN', 84); +define('SPELL_AURA_MOD_POWER_REGEN', 85); +define('SPELL_AURA_CHANNEL_DEATH_ITEM', 86); +define('SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN', 87); +define('SPELL_AURA_MOD_HEALTH_REGEN_PERCENT', 88); +define('SPELL_AURA_PERIODIC_DAMAGE_PERCENT', 89); +define('SPELL_AURA_90', 90); +define('SPELL_AURA_MOD_DETECT_RANGE', 91); +define('SPELL_AURA_PREVENTS_FLEEING', 92); +define('SPELL_AURA_MOD_UNATTACKABLE', 93); +define('SPELL_AURA_INTERRUPT_REGEN', 94); +define('SPELL_AURA_GHOST', 95); +define('SPELL_AURA_SPELL_MAGNET', 96); +define('SPELL_AURA_MANA_SHIELD', 97); +define('SPELL_AURA_MOD_SKILL_TALENT', 98); +define('SPELL_AURA_MOD_ATTACK_POWER', 99); +define('SPELL_AURA_AURAS_VISIBLE', 100); +define('SPELL_AURA_MOD_RESISTANCE_PCT', 101); +define('SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS', 102); +define('SPELL_AURA_MOD_TOTAL_THREAT', 103); +define('SPELL_AURA_WATER_WALK', 104); +define('SPELL_AURA_FEATHER_FALL', 105); +define('SPELL_AURA_HOVER', 106); +define('SPELL_AURA_ADD_FLAT_MODIFIER', 107); +define('SPELL_AURA_ADD_PCT_MODIFIER', 108); +define('SPELL_AURA_ADD_TARGET_TRIGGER', 109); +define('SPELL_AURA_MOD_POWER_REGEN_PERCENT', 110); +define('SPELL_AURA_ADD_CASTER_HIT_TRIGGER', 111); +define('SPELL_AURA_OVERRIDE_CLASS_SCRIPTS', 112); +define('SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN', 113); +define('SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT', 114); +define('SPELL_AURA_MOD_HEALING', 115); +define('SPELL_AURA_MOD_REGEN_DURING_COMBAT', 116); +define('SPELL_AURA_MOD_MECHANIC_RESISTANCE', 117); +define('SPELL_AURA_MOD_HEALING_PCT', 118); +define('SPELL_AURA_119', 119); +define('SPELL_AURA_UNTRACKABLE', 120); +define('SPELL_AURA_EMPATHY', 121); +define('SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT', 122); +define('SPELL_AURA_MOD_TARGET_RESISTANCE', 123); +define('SPELL_AURA_MOD_RANGED_ATTACK_POWER', 124); +define('SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN', 125); +define('SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT', 126); +define('SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS', 127); +define('SPELL_AURA_MOD_POSSESS_PET', 128); +define('SPELL_AURA_MOD_SPEED_ALWAYS', 129); +define('SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS', 130); +define('SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS', 131); +define('SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT', 132); +define('SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT', 133); +define('SPELL_AURA_MOD_MANA_REGEN_INTERRUPT', 134); +define('SPELL_AURA_MOD_HEALING_DONE', 135); +define('SPELL_AURA_MOD_HEALING_DONE_PERCENT', 136); +define('SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE', 137); +define('SPELL_AURA_MOD_MELEE_HASTE', 138); +define('SPELL_AURA_FORCE_REACTION', 139); +define('SPELL_AURA_MOD_RANGED_HASTE', 140); +define('SPELL_AURA_MOD_RANGED_AMMO_HASTE', 141); +define('SPELL_AURA_MOD_BASE_RESISTANCE_PCT', 142); +define('SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE', 143); +define('SPELL_AURA_SAFE_FALL', 144); +define('SPELL_AURA_MOD_PET_TALENT_POINTS', 145); +define('SPELL_AURA_ALLOW_TAME_PET_TYPE', 146); +define('SPELL_AURA_MECHANIC_IMMUNITY_MASK', 147); +define('SPELL_AURA_RETAIN_COMBO_POINTS', 148); +define('SPELL_AURA_REDUCE_PUSHBACK', 149); +define('SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT', 150); +define('SPELL_AURA_TRACK_STEALTHED', 151); +define('SPELL_AURA_MOD_DETECTED_RANGE', 152); +define('SPELL_AURA_SPLIT_DAMAGE_FLAT', 153); +define('SPELL_AURA_MOD_STEALTH_LEVEL', 154); +define('SPELL_AURA_MOD_WATER_BREATHING', 155); +define('SPELL_AURA_MOD_REPUTATION_GAIN', 156); +define('SPELL_AURA_PET_DAMAGE_MULTI', 157); +define('SPELL_AURA_MOD_SHIELD_BLOCKVALUE', 158); +define('SPELL_AURA_NO_PVP_CREDIT', 159); +define('SPELL_AURA_MOD_AOE_AVOIDANCE', 160); +define('SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT', 161); +define('SPELL_AURA_POWER_BURN', 162); +define('SPELL_AURA_MOD_CRIT_DAMAGE_BONUS', 163); +define('SPELL_AURA_164', 164); +define('SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS', 165); +define('SPELL_AURA_MOD_ATTACK_POWER_PCT', 166); +define('SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT', 167); +define('SPELL_AURA_MOD_DAMAGE_DONE_VERSUS', 168); +define('SPELL_AURA_MOD_CRIT_PERCENT_VERSUS', 169); +define('SPELL_AURA_DETECT_AMORE', 170); +define('SPELL_AURA_MOD_SPEED_NOT_STACK', 171); +define('SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK', 172); +define('SPELL_AURA_173', 173); +define('SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT', 174); +define('SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT', 175); +define('SPELL_AURA_SPIRIT_OF_REDEMPTION', 176); +define('SPELL_AURA_AOE_CHARM', 177); +define('SPELL_AURA_MOD_DEBUFF_RESISTANCE', 178); +define('SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE', 179); +define('SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS', 180); +define('SPELL_AURA_181', 181); +define('SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT', 182); +define('SPELL_AURA_MOD_CRITICAL_THREAT', 183); +define('SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE', 184); +define('SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE', 185); +define('SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE', 186); +define('SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE', 187); +define('SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_CHANCE', 188); +define('SPELL_AURA_MOD_RATING', 189); +define('SPELL_AURA_MOD_FACTION_REPUTATION_GAIN', 190); +define('SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED', 191); +define('SPELL_AURA_MOD_MELEE_RANGED_HASTE', 192); +define('SPELL_AURA_MELEE_SLOW', 193); +define('SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL', 194); +define('SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL', 195); +define('SPELL_AURA_MOD_COOLDOWN', 196); +define('SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE', 197); +define('SPELL_AURA_198', 198); +define('SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT', 199); +define('SPELL_AURA_MOD_XP_PCT', 200); +define('SPELL_AURA_FLY', 201); +define('SPELL_AURA_IGNORE_COMBAT_RESULT', 202); +define('SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE', 203); +define('SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE', 204); +define('SPELL_AURA_MOD_SCHOOL_CRIT_DMG_TAKEN', 205); +define('SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED', 206); +define('SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED', 207); +define('SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED', 208); +define('SPELL_AURA_MOD_MOUNTED_FLIGHT_SPEED_ALWAYS', 209); +define('SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS', 210); +define('SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK', 211); +define('SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT', 212); +define('SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT', 213); +define('SPELL_AURA_214', 214); +define('SPELL_AURA_ARENA_PREPARATION', 215); +define('SPELL_AURA_HASTE_SPELLS', 216); +define('SPELL_AURA_MOD_MELEE_HASTE_2', 217); +define('SPELL_AURA_HASTE_RANGED', 218); +define('SPELL_AURA_MOD_MANA_REGEN_FROM_STAT', 219); +define('SPELL_AURA_MOD_RATING_FROM_STAT', 220); +define('SPELL_AURA_MOD_DETAUNT', 221); +define('SPELL_AURA_222', 222); +define('SPELL_AURA_RAID_PROC_FROM_CHARGE', 223); +define('SPELL_AURA_224', 224); +define('SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE', 225); +define('SPELL_AURA_PERIODIC_DUMMY', 226); +define('SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE', 227); +define('SPELL_AURA_DETECT_STEALTH', 228); +define('SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE', 229); +define('SPELL_AURA_MOD_INCREASE_HEALTH_NONSTACK', 230); +define('SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE', 231); +define('SPELL_AURA_MECHANIC_DURATION_MOD', 232); +define('SPELL_AURA_CHANGE_MODEL_FOR_ALL_HUMANOIDS', 233); +define('SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK', 234); +define('SPELL_AURA_MOD_DISPEL_RESIST', 235); +define('SPELL_AURA_CONTROL_VEHICLE', 236); +define('SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER', 237); +define('SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER', 238); +define('SPELL_AURA_MOD_SCALE_2', 239); +define('SPELL_AURA_MOD_EXPERTISE', 240); +define('SPELL_AURA_FORCE_MOVE_FORWARD', 241); +define('SPELL_AURA_MOD_SPELL_DAMAGE_FROM_HEALING', 242); +define('SPELL_AURA_MOD_FACTION', 243); +define('SPELL_AURA_COMPREHEND_LANGUAGE', 244); +define('SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL', 245); +define('SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK', 246); +define('SPELL_AURA_CLONE_CASTER', 247); +define('SPELL_AURA_MOD_COMBAT_RESULT_CHANCE', 248); +define('SPELL_AURA_CONVERT_RUNE', 249); +define('SPELL_AURA_MOD_INCREASE_HEALTH_2', 250); +define('SPELL_AURA_MOD_ENEMY_DODGE', 251); +define('SPELL_AURA_MOD_SPEED_SLOW_ALL', 252); +define('SPELL_AURA_MOD_BLOCK_CRIT_CHANCE', 253); +define('SPELL_AURA_MOD_DISARM_OFFHAND', 254); +define('SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT', 255); +define('SPELL_AURA_NO_REAGENT_USE', 256); +define('SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS', 257); +define('SPELL_AURA_258', 258); +define('SPELL_AURA_MOD_HOT_PCT', 259); +define('SPELL_AURA_SCREEN_EFFECT', 260); +define('SPELL_AURA_PHASE', 261); +define('SPELL_AURA_ABILITY_IGNORE_AURASTATE', 262); +define('SPELL_AURA_ALLOW_ONLY_ABILITY', 263); +define('SPELL_AURA_264', 264); +define('SPELL_AURA_265', 265); +define('SPELL_AURA_266', 266); +define('SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL', 267); +define('SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT', 268); +define('SPELL_AURA_MOD_IGNORE_TARGET_RESIST', 269); +define('SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST', 270); +define('SPELL_AURA_MOD_DAMAGE_FROM_CASTER', 271); +define('SPELL_AURA_IGNORE_MELEE_RESET', 272); +define('SPELL_AURA_X_RAY', 273); +define('SPELL_AURA_ABILITY_CONSUME_NO_AMMO', 274); +define('SPELL_AURA_MOD_IGNORE_SHAPESHIFT', 275); +define('SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC', 276); +define('SPELL_AURA_MOD_MAX_AFFECTED_TARGETS', 277); +define('SPELL_AURA_MOD_DISARM_RANGED', 278); +define('SPELL_AURA_INITIALIZE_IMAGES', 279); +define('SPELL_AURA_MOD_ARMOR_PENETRATION_PCT', 280); +define('SPELL_AURA_MOD_HONOR_GAIN_PCT', 281); +define('SPELL_AURA_MOD_BASE_HEALTH_PCT', 282); +define('SPELL_AURA_MOD_HEALING_RECEIVED', 283); +define('SPELL_AURA_LINKED', 284); +define('SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR', 285); +define('SPELL_AURA_ABILITY_PERIODIC_CRIT', 286); +define('SPELL_AURA_DEFLECT_SPELLS', 287); +define('SPELL_AURA_IGNORE_HIT_DIRECTION', 288); +define('SPELL_AURA_PREVENT_DURABILITY_LOSS', 289); +define('SPELL_AURA_MOD_CRIT_PCT', 290); +define('SPELL_AURA_MOD_XP_QUEST_PCT', 291); +define('SPELL_AURA_OPEN_STABLE', 292); +define('SPELL_AURA_OVERRIDE_SPELLS', 293); +define('SPELL_AURA_PREVENT_REGENERATE_POWER', 294); +define('SPELL_AURA_295', 295); +define('SPELL_AURA_SET_VEHICLE_ID', 296); +define('SPELL_AURA_BLOCK_SPELL_FAMILY', 297); +define('SPELL_AURA_STRANGULATE', 298); +define('SPELL_AURA_299', 299); +define('SPELL_AURA_SHARE_DAMAGE_PCT', 300); +define('SPELL_AURA_SCHOOL_HEAL_ABSORB', 301); +define('SPELL_AURA_302', 302); +define('SPELL_AURA_MOD_DAMAGE_DONE_VERSUS_AURASTATE', 303); +define('SPELL_AURA_MOD_FAKE_INEBRIATE', 304); +define('SPELL_AURA_MOD_MINIMUM_SPEED', 305); +define('SPELL_AURA_306', 306); +define('SPELL_AURA_HEAL_ABSORB_TEST', 307); +define('SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER', 308); +define('SPELL_AURA_309', 309); +define('SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE', 310); +define('SPELL_AURA_311', 311); +define('SPELL_AURA_312', 312); +define('SPELL_AURA_313', 313); +define('SPELL_AURA_PREVENT_RESURRECTION', 314); +define('SPELL_AURA_UNDERWATER_WALKING', 315); +define('SPELL_AURA_PERIODIC_HASTE', 316); + + // item trigger and recipe handling define('SPELL_TRIGGER_USE', 0); define('SPELL_TRIGGER_EQUIP', 1); diff --git a/includes/loot.class.php b/includes/loot.class.php index 8224e6c3..0c935df8 100644 --- a/includes/loot.class.php +++ b/includes/loot.class.php @@ -552,9 +552,9 @@ class Loot case LOOT_SPELL: $conditions = array( 'OR', - ['AND', ['effect1CreateItemId', $this->entry], ['OR', ['effect1Id', SpellList::$effects['itemCreate']], ['effect1AuraId', SpellList::$auras['itemCreate']]]], - ['AND', ['effect2CreateItemId', $this->entry], ['OR', ['effect2Id', SpellList::$effects['itemCreate']], ['effect2AuraId', SpellList::$auras['itemCreate']]]], - ['AND', ['effect3CreateItemId', $this->entry], ['OR', ['effect3Id', SpellList::$effects['itemCreate']], ['effect3AuraId', SpellList::$auras['itemCreate']]]], + ['AND', ['effect1CreateItemId', $this->entry], ['OR', ['effect1Id', SpellList::EFFECTS_ITEM_CREATE], ['effect1AuraId', SpellList::AURAS_ITEM_CREATE]]], + ['AND', ['effect2CreateItemId', $this->entry], ['OR', ['effect2Id', SpellList::EFFECTS_ITEM_CREATE], ['effect2AuraId', SpellList::AURAS_ITEM_CREATE]]], + ['AND', ['effect3CreateItemId', $this->entry], ['OR', ['effect3Id', SpellList::EFFECTS_ITEM_CREATE], ['effect3AuraId', SpellList::AURAS_ITEM_CREATE]]], ); if ($ids) $conditions[] = ['id', $ids]; diff --git a/includes/types/quest.class.php b/includes/types/quest.class.php index d5380efd..4927c8b6 100644 --- a/includes/types/quest.class.php +++ b/includes/types/quest.class.php @@ -662,7 +662,7 @@ class QuestListFilter extends Filter return false; if ($cr[1]) - return ['OR', ['sourceSpellId', 0, '>'], ['rewardSpell', 0, '>'], ['rsc.effect1Id', SpellList::$effects['teach']], ['rsc.effect2Id', SpellList::$effects['teach']], ['rsc.effect3Id', SpellList::$effects['teach']]]; + return ['OR', ['sourceSpellId', 0, '>'], ['rewardSpell', 0, '>'], ['rsc.effect1Id', SpellList::EFFECTS_TEACH], ['rsc.effect2Id', SpellList::EFFECTS_TEACH], ['rsc.effect3Id', SpellList::EFFECTS_TEACH]]; else return ['AND', ['sourceSpellId', 0], ['rewardSpell', 0], ['rewardSpellCast', 0]]; } diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index a7cad3b2..05c65297 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -29,20 +29,56 @@ class SpellList extends BaseType 10 => 4 ); - public static $effects = array( - 'heal' => [ 0,/*3,*/10, 67, 75, 136 ], // , /*Dummy*/, Heal, Heal Max Health, Heal Mechanical, Heal Percent - 'damage' => [ 0, 2, 3, 9, 62 ], // , Dummy, School Damage, Health Leech, Power Burn - 'itemCreate' => [24, 34, 59, 66, 157 ], // createItem, changeItem, randomItem, createManaGem, createItem2 - 'trigger' => [ 3, 32, 64, 101, 142, 148, 151, 152, 155, 160, 164], // dummy, trigger missile, trigger spell, feed pet, force cast, force cast with value, unk, trigger spell 2, unk, dualwield 2H, unk, remove aura - 'teach' => [36, 57, /*133*/ ] // learn spell, learn pet spell, /*unlearn specialization*/ + public const EFFECTS_HEAL = array( + SPELL_EFFECT_NONE, /*SPELL_EFFECT_DUMMY*/ SPELL_EFFECT_HEAL, SPELL_EFFECT_HEAL_MAX_HEALTH, SPELL_EFFECT_HEAL_MECHANICAL, + SPELL_EFFECT_HEAL_PCT + ); + public const EFFECTS_DAMAGE = array( + SPELL_EFFECT_NONE, SPELL_EFFECT_DUMMY, SPELL_EFFECT_SCHOOL_DAMAGE, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_POWER_BURN + ); + public const EFFECTS_ITEM_CREATE = array( + SPELL_EFFECT_CREATE_ITEM, SPELL_EFFECT_SUMMON_CHANGE_ITEM, SPELL_EFFECT_CREATE_RANDOM_ITEM, SPELL_EFFECT_CREATE_MANA_GEM, SPELL_EFFECT_CREATE_ITEM_2 + ); + public const EFFECTS_TRIGGER = array( + SPELL_EFFECT_DUMMY, SPELL_EFFECT_TRIGGER_MISSILE, SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_FEED_PET, SPELL_EFFECT_FORCE_CAST, + SPELL_EFFECT_FORCE_CAST_WITH_VALUE, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_SPELL_2, SPELL_EFFECT_SUMMON_RAF_FRIEND, + SPELL_EFFECT_TITAN_GRIP, SPELL_EFFECT_FORCE_CAST_2, SPELL_EFFECT_REMOVE_AURA + ); + public const EFFECTS_TEACH = array( + SPELL_EFFECT_LEARN_SPELL, SPELL_EFFECT_LEARN_PET_SPELL /*SPELL_EFFECT_UNLEARN_SPECIALIZATION*/ + ); + public const EFFECTS_MODEL_OBJECT = array( + SPELL_EFFECT_TRANS_DOOR, SPELL_EFFECT_SUMMON_OBJECT_WILD, SPELL_EFFECT_SUMMON_OBJECT_SLOT1, SPELL_EFFECT_SUMMON_OBJECT_SLOT2, SPELL_EFFECT_SUMMON_OBJECT_SLOT3, + SPELL_EFFECT_SUMMON_OBJECT_SLOT4 + ); + public const EFFECTS_MODEL_NPC = array( + SPELL_EFFECT_SUMMON, SPELL_EFFECT_SUMMON_PET, SPELL_EFFECT_SUMMON_DEMON, SPELL_EFFECT_KILL_CREDIT, SPELL_EFFECT_KILL_CREDIT2 + ); + public const EFFECTS_DIRECT_SCALING = array( + SPELL_EFFECT_SCHOOL_DAMAGE, SPELL_EFFECT_ENVIRONMENTAL_DAMAGE, SPELL_EFFECT_POWER_DRAIN, SPELL_EFFECT_HEALTH_LEECH, SPELL_EFFECT_POWER_BURN, + SPELL_EFFECT_HEAL_MAX_HEALTH ); - public static $auras = array( - 'heal' => [ 4, 8, 62, 69, 97, 226 ], // Dummy, Periodic Heal, Periodic Health Funnel, School Absorb, Mana Shield, Periodic Dummy - 'damage' => [ 3, 4, 15, 53, 89, 162, 226 ], // Periodic Damage, Dummy, Damage Shield, Periodic Health Leech, Periodic Damage Percent, Power Burn Mana, Periodic Dummy - 'itemCreate' => [86 ], // Channel Death Item - 'trigger' => [ 4, 23, 42, 48, 109, 226, 227, 231, 236, 284 ], // dummy; 23/227: periodic trigger spell (with value); 42/231: proc trigger spell (with value); 48: unk; 109: add target trigger; 226: periodic dummy; 236: control vehicle; 284: linked - 'teach' => [ ] + public const AURAS_HEAL = array( + SPELL_AURA_DUMMY, SPELL_AURA_PERIODIC_HEAL, SPELL_AURA_PERIODIC_HEALTH_FUNNEL, SPELL_AURA_SCHOOL_ABSORB, SPELL_AURA_MANA_SHIELD, + SPELL_AURA_PERIODIC_DUMMY + ); + public const AURAS_DAMAGE = array( + SPELL_AURA_PERIODIC_DAMAGE, SPELL_AURA_DUMMY, SPELL_AURA_DAMAGE_SHIELD, SPELL_AURA_PERIODIC_LEECH, SPELL_AURA_PERIODIC_DAMAGE_PERCENT, + SPELL_AURA_POWER_BURN, SPELL_AURA_PERIODIC_DUMMY + ); + public const AURAS_ITEM_CREATE = array( + SPELL_AURA_CHANNEL_DEATH_ITEM + ); + public const AURAS_TRIGGER = array( + SPELL_AURA_DUMMY, SPELL_AURA_PERIODIC_TRIGGER_SPELL, SPELL_AURA_PROC_TRIGGER_SPELL, SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT, SPELL_AURA_ADD_TARGET_TRIGGER, + SPELL_AURA_PERIODIC_DUMMY, SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE, SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE, SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_LINKED + ); + public const AURAS_MODEL_NPC = array( + SPELL_AURA_TRANSFORM, SPELL_AURA_MOUNTED + ); + public const AURAS_PERIODIC_SCALING = array( + SPELL_AURA_PERIODIC_DAMAGE, SPELL_AURA_PERIODIC_HEAL, SPELL_AURA_PERIODIC_LEECH ); private $spellVars = []; @@ -167,8 +203,7 @@ class SpellList extends BaseType $mv = $this->curTpl['effect'.$i.'MiscValue']; $au = $this->curTpl['effect'.$i.'AuraId']; - // Enchant Item Permanent (53) / Temporary (54) - if (in_array($this->curTpl['effect'.$i.'Id'], [53, 54])) + if (in_array($this->curTpl['effect'.$i.'Id'], [SPELL_EFFECT_ENCHANT_ITEM, SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY])) { if ($mv && ($json = DB::Aowow()->selectRow('SELECT * FROM ?_item_stats WHERE `type` = ?d AND `typeId` = ?d', Type::ENCHANTMENT, $mv))) { @@ -186,7 +221,7 @@ class SpellList extends BaseType switch ($au) { - case 29: // ModStat MiscVal:type + case SPELL_AURA_MOD_STAT: if ($mv < 0) // all stats { for ($iMod = ITEM_MOD_AGILITY; $iMod <= ITEM_MOD_STAMINA; $iMod++) @@ -206,12 +241,12 @@ class SpellList extends BaseType trigger_error('AuraId 29 of spell #'.$this->id.' has wrong statId #'.$mv, E_USER_WARNING); break; - case 34: // Increase Health - case 230: - case 250: + case SPELL_AURA_MOD_INCREASE_HEALTH: + case SPELL_AURA_MOD_INCREASE_HEALTH_NONSTACK: + case SPELL_AURA_MOD_INCREASE_HEALTH_2: Util::arraySumByKey($stats, [ITEM_MOD_HEALTH => $pts]); break; - case 13: // damage splpwr + physical (dmg & any) + case SPELL_AURA_MOD_DAMAGE_DONE: // + weapon damage if ($mv == (1 << SPELL_SCHOOL_NORMAL)) { @@ -253,10 +288,10 @@ class SpellList extends BaseType } break; - case 135: // healing splpwr (healing & any) .. not as a mask.. + case SPELL_AURA_MOD_HEALING_DONE: // not as a mask.. Util::arraySumByKey($stats, [ITEM_MOD_SPELL_HEALING_DONE => $pts]); break; - case 35: // ModPower - MiscVal:type see defined Powers only energy/mana in use + case SPELL_AURA_MOD_INCREASE_ENERGY: // MiscVal:type see defined Powers only energy/mana in use if ($mv == POWER_HEALTH) Util::arraySumByKey($stats, [ITEM_MOD_HEALTH => $pts]); else if ($mv == POWER_ENERGY) @@ -269,21 +304,23 @@ class SpellList extends BaseType Util::arraySumByKey($stats, [ITEM_MOD_RUNIC_POWER => $pts]); break; - case 189: // CombatRating MiscVal:ratingMask - case 220: + case SPELL_AURA_MOD_RATING: + case SPELL_AURA_MOD_RATING_FROM_STAT: if ($mod = Game::itemModByRatingMask($mv)) Util::arraySumByKey($stats, [$mod => $pts]); break; - case 143: // Resistance MiscVal:school - case 83: - case 22: - if ($mv == 1) // Armor only if explicitly specified + case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE: + case SPELL_AURA_MOD_BASE_RESISTANCE: + case SPELL_AURA_MOD_RESISTANCE: + // Armor only if explicitly specified + if ($mv == (1 << SPELL_SCHOOL_NORMAL)) { Util::arraySumByKey($stats, [ITEM_MOD_ARMOR => $pts]); break; } - if ($mv == 2) // holy-resistance ONLY if explicitly specified (shouldn't even exist...) + // Holy resistance only if explicitly specified (shouldn't even exist...?) + if ($mv == (1 << SPELL_SCHOOL_HOLY)) { Util::arraySumByKey($stats, [ITEM_MOD_HOLY_RESISTANCE => $pts]); break; @@ -296,45 +333,45 @@ class SpellList extends BaseType switch ($j) { - case 2: + case SPELL_SCHOOL_FIRE: Util::arraySumByKey($stats, [ITEM_MOD_FIRE_RESISTANCE => $pts]); break; - case 3: + case SPELL_SCHOOL_NATURE: Util::arraySumByKey($stats, [ITEM_MOD_NATURE_RESISTANCE => $pts]); break; - case 4: + case SPELL_SCHOOL_FROST: Util::arraySumByKey($stats, [ITEM_MOD_FROST_RESISTANCE => $pts]); break; - case 5: + case SPELL_SCHOOL_SHADOW: Util::arraySumByKey($stats, [ITEM_MOD_SHADOW_RESISTANCE => $pts]); break; - case 6: + case SPELL_SCHOOL_ARCANE: Util::arraySumByKey($stats, [ITEM_MOD_ARCANE_RESISTANCE => $pts]); break; } } break; - case 8: // hp5 - case 84: - case 161: + case SPELL_AURA_PERIODIC_HEAL: // hp5 + case SPELL_AURA_MOD_REGEN: + case SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT: Util::arraySumByKey($stats, [ITEM_MOD_HEALTH_REGEN => $pts]); break; - case 85: // mp5 + case SPELL_AURA_MOD_POWER_REGEN: // mp5 Util::arraySumByKey($stats, [ITEM_MOD_MANA_REGENERATION => $pts]); break; - case 99: // atkpwr + case SPELL_AURA_MOD_ATTACK_POWER: Util::arraySumByKey($stats, [ITEM_MOD_ATTACK_POWER => $pts]); break; // ?carries over to rngatkpwr? - case 124: // rngatkpwr + case SPELL_AURA_MOD_RANGED_ATTACK_POWER: Util::arraySumByKey($stats, [ITEM_MOD_RANGED_ATTACK_POWER => $pts]); break; - case 158: // blockvalue + case SPELL_AURA_MOD_SHIELD_BLOCKVALUE: Util::arraySumByKey($stats, [ITEM_MOD_BLOCK_VALUE => $pts]); break; - case 240: // ModExpertise + case SPELL_AURA_MOD_EXPERTISE: Util::arraySumByKey($stats, [ITEM_MOD_EXPERTISE_RATING => $pts]); break; - case 123: // Mod Target Resistance + case SPELL_AURA_MOD_TARGET_RESISTANCE: if ($mv == 0x7C && $pts < 0) Util::arraySumByKey($stats, [ITEM_MOD_SPELL_PENETRATION => -$pts]); break; @@ -466,57 +503,59 @@ class SpellList extends BaseType switch ($au) { - case 101: // Mod Resistance Percent - case 142: // Mod Base Resistance Percent - if ($mv == 1) // Armor only if explicitly specified only affects armor from equippment + case SPELL_AURA_MOD_RESISTANCE_PCT: + case SPELL_AURA_MOD_BASE_RESISTANCE_PCT: + // Armor only if explicitly specified only affects armor from equippment + if ($mv == (1 << SPELL_SCHOOL_NORMAL)) $data[$id]['armor'] = [$pts / 100, 'percentOf', ['armor', 0]]; else if ($mv) $modXBySchool($data[$id], 'res', $pts); break; - case 182: // Mod Resistance Of Stat Percent - if ($mv == 1) // Armor only if explicitly specified + case SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT: + // Armor only if explicitly specified + if ($mv == (1 << SPELL_SCHOOL_NORMAL)) $data[$id]['armor'] = [$pts / 100, 'percentOf', $jsonStat($mvB)]; else if ($mv) $modXBySchool($data[$id], 'res', [$pts / 100, 'percentOf', $jsonStat($mvB)]); break; - case 137: // mod stat percent + case SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE: if ($mv > -1) // one stat $modXByStat($data[$id], null, $pts); else if ($mv < 0) // all stats for ($iMod = ITEM_MOD_AGILITY; $iMod <= ITEM_MOD_STAMINA; $iMod++) $data[$id][Game::$itemMods[$iMod]] = [$pts / 100, 'percentOf', Game::$itemMods[$iMod]]; break; - case 174: // Mod Spell Damage Of Stat Percent + case SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT: $mv = $mv ?: SPELL_MAGIC_SCHOOLS; $modXBySchool($data[$id], 'spldmg', [$pts / 100, 'percentOf', $jsonStat($mvB)]); break; - case 212: // Mod Ranged Attack Power Of Stat Percent + case SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT: $modXByStat($data[$id], 'rgdatkpwr', $pts); break; - case 268: // Mod Attack Power Of Stat Percent + case SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT: $modXByStat($data[$id], 'mleatkpwr', $pts); break; - case 175: // Mod Spell Healing Of Stat Percent + case SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT: $modXByStat($data[$id], 'splheal', $pts); break; - case 219: // Mod Mana Regeneration from Stat + case SPELL_AURA_MOD_MANA_REGEN_FROM_STAT: $modXByStat($data[$id], 'manargn', $pts); break; - case 134: // Mod Mana Regeneration Interrupt + case SPELL_AURA_MOD_MANA_REGEN_INTERRUPT: $data[$id]['icmanargn'] = [$pts / 100, 'percentOf', 'oocmanargn']; break; - case 57: // Mod Spell Crit Chance - case 71: // Mod Spell Crit Chance School + case SPELL_AURA_MOD_SPELL_CRIT_CHANCE: + case SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL: $mv = $mv ?: SPELL_MAGIC_SCHOOLS; $modXBySchool($data[$id], 'splcritstrkpct', [$pts, 'add']); if (($mv & SPELL_MAGIC_SCHOOLS) == SPELL_MAGIC_SCHOOLS) $data[$id]['splcritstrkpct'] = [$pts, 'add']; break; - case 285: // Mod Attack Power Of Armor + case SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR: $data[$id]['mleatkpwr'] = [1 / $pts, 'percentOf', 'fullarmor']; $data[$id]['rgdatkpwr'] = [1 / $pts, 'percentOf', 'fullarmor']; break; - case 52: // Mod Physical Crit Percent + case SPELL_AURA_MOD_WEAPON_CRIT_PERCENT: if ($class < 1 || ($class == ITEM_CLASS_WEAPON && ($subClass & 0x5000C))) $data[$id]['rgdcritstrkpct'] = [1, 'functionOf', sprintf($whCheck, 18, $class, $subClass, $pts)]; // $data[$id]['rgdcritstrkpct'] = [$pts, 'add']; @@ -524,16 +563,16 @@ class SpellList extends BaseType $data[$id]['mlecritstrkpct'] = [1, 'functionOf', sprintf($whCheck, 16, $class, $subClass, $pts)]; // $data[$id]['mlecritstrkpct'] = [$pts, 'add']; break; - case 47: // Mod Parry Percent + case SPELL_AURA_MOD_PARRY_PERCENT: $data[$id]['parrypct'] = [$pts, 'add']; break; - case 49: // Mod Dodge Percent + case SPELL_AURA_MOD_DODGE_PERCENT: $data[$id]['dodgepct'] = [$pts, 'add']; break; - case 51: // Mod Block Percent + case SPELL_AURA_MOD_BLOCK_PERCENT: $data[$id]['blockpct'] = [$pts, 'add']; break; - case 132: // Mod Increase Energy Percent + case SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT: if ($mv == POWER_HEALTH) $data[$id]['health'] = [$pts / 100, 'percentOf', 'health']; else if ($mv == POWER_ENERGY) @@ -545,28 +584,28 @@ class SpellList extends BaseType else if ($mv == POWER_RUNIC_POWER) $data[$id]['runic'] = [$pts / 100, 'percentOf', 'runic']; break; - case 133: // Mod Increase Health Percent + case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: $data[$id]['health'] = [$pts / 100, 'percentOf', 'health']; break; - case 150: // Mod Shield Blockvalue Percent + case SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT: $data[$id]['block'] = [$pts / 100, 'percentOf', 'block']; break; - case 290: // Mod Crit Percent + case SPELL_AURA_MOD_CRIT_PCT: $data[$id]['mlecritstrkpct'] = [$pts, 'add']; $data[$id]['rgdcritstrkpct'] = [$pts, 'add']; $data[$id]['splcritstrkpct'] = [$pts, 'add']; break; - case 237: // Mod Spell Damage Of Attack Power + case SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER: $mv = $mv ?: SPELL_MAGIC_SCHOOLS; $modXBySchool($data[$id], 'spldmg', [$pts / 100, 'percentOf', 'mleatkpwr']); break; - case 238: // Mod Spell Healing Of Attack Power + case SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER: $data[$id]['splheal'] = [$pts / 100, 'percentOf', 'mleatkpwr']; break; - case 166: // Mod Attack Power Percent [ingmae only melee..?] + case SPELL_AURA_MOD_ATTACK_POWER_PCT: // ingmae only melee..? $data[$id]['mleatkpwr'] = [$pts / 100, 'percentOf', 'mleatkpwr']; break; - case 88: // Mod Health Regeneration Percent + case SPELL_AURA_MOD_HEALTH_REGEN_PERCENT: $data[$id]['healthrgn'] = [$pts / 100, 'percentOf', 'healthrgn']; break; } @@ -644,7 +683,7 @@ class SpellList extends BaseType continue; // GO Model from MiscVal - if (in_array($this->curTpl['effect'.$i.'Id'], [50, 76, 104, 105, 106, 107])) + if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_MODEL_OBJECT)) { if (isset($displays[Type::OBJECT][$id])) $displays[Type::OBJECT][$id][0][] = $i; @@ -652,7 +691,7 @@ class SpellList extends BaseType $displays[Type::OBJECT][$id] = [[$i], $effMV]; } // NPC Model from MiscVal - else if (in_array($this->curTpl['effect'.$i.'Id'], [28, 90, 56, 112, 134]) || in_array($this->curTpl['effect'.$i.'AuraId'], [56, 78])) + else if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_MODEL_NPC) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_MODEL_NPC)) { if (isset($displays[Type::NPC][$id])) $displays[Type::NPC][$id][0][] = $i; @@ -660,7 +699,7 @@ class SpellList extends BaseType $displays[Type::NPC][$id] = [[$i], $effMV]; } // Shapeshift - else if ($this->curTpl['effect'.$i.'AuraId'] == 36) + else if ($this->curTpl['effect'.$i.'AuraId'] == SPELL_AURA_MOD_SHAPESHIFT) { $subForms = array( 892 => [892, 29407, 29406, 29408, 29405], // Cat - NE @@ -866,7 +905,7 @@ class SpellList extends BaseType { $idx = []; for ($i = 1; $i < 4; $i++) - if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::$effects['itemCreate']) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::$auras['itemCreate'])) + if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_ITEM_CREATE) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_ITEM_CREATE)) if ($this->curTpl['effect'.$i.'CreateItemId'] > 0) $idx[] = $i; @@ -877,8 +916,8 @@ class SpellList extends BaseType { $idx = []; for ($i = 1; $i < 4; $i++) - if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::$effects['trigger']) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::$auras['trigger'])) - if ($this->curTpl['effect'.$i.'AuraId'] == 4 || $this->curTpl['effect'.$i.'TriggerSpell'] > 0 || ($this->curTpl['effect'.$i.'Id'] == 155 && $this->curTpl['effect'.$i.'MiscValue'] > 0)) + if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_TRIGGER) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_TRIGGER)) + if ($this->curTpl['effect'.$i.'AuraId'] == SPELL_AURA_DUMMY || $this->curTpl['effect'.$i.'TriggerSpell'] > 0 || ($this->curTpl['effect'.$i.'Id'] == SPELL_EFFECT_TITAN_GRIP && $this->curTpl['effect'.$i.'MiscValue'] > 0)) $idx[] = $i; return $idx; @@ -888,7 +927,7 @@ class SpellList extends BaseType { $idx = []; for ($i = 1; $i < 4; $i++) - if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::$effects['teach']) || in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::$auras['teach'])) + if (in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_TEACH)) if ($this->curTpl['effect'.$i.'TriggerSpell'] > 0) $idx[] = $i; @@ -903,7 +942,7 @@ class SpellList extends BaseType public function isHealingSpell() { for ($i = 1; $i < 4; $i++) - if (!in_array($this->curTpl['effect'.$i.'Id'], SpellList::$effects['heal']) && !in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::$auras['heal'])) + if (!in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_HEAL) && !in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_HEAL)) return false; return true; @@ -912,7 +951,7 @@ class SpellList extends BaseType public function isDamagingSpell() { for ($i = 1; $i < 4; $i++) - if (!in_array($this->curTpl['effect'.$i.'Id'], SpellList::$effects['damage']) && !in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::$auras['damage'])) + if (!in_array($this->curTpl['effect'.$i.'Id'], SpellList::EFFECTS_DAMAGE) && !in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_DAMAGE)) return false; return true; @@ -1198,7 +1237,7 @@ class SpellList extends BaseType // Aura giving combat ratings $rType = 0; - if ($aura == 189) + if ($aura == SPELL_AURA_MOD_RATING) if ($rType = Game::itemModByRatingMask($mv)) $this->scaling[$this->id] = true; // Aura end @@ -1230,7 +1269,7 @@ class SpellList extends BaseType { // Mod Power Regeneration & Mod Health Regeneration have an implicit periode of 5sec $aura = $srcSpell->getField('effect'.$effIdx.'AuraId'); - if ($aura == 84 || $aura == 85) + if ($aura == SPELL_AURA_MOD_REGEN || $aura == SPELL_AURA_MOD_POWER_REGEN) $periode = 5000; else $periode = 3000; @@ -1285,7 +1324,7 @@ class SpellList extends BaseType } // Aura giving combat ratings $rType = 0; - if ($aura == 189) + if ($aura == SPELL_AURA_MOD_RATING) if ($rType = Game::itemModByRatingMask($mv)) $this->scaling[$this->id] = true; // Aura end @@ -1295,7 +1334,7 @@ class SpellList extends BaseType $result[2] = '%s (%s)'; $result[4] = $rType; } - else if ($aura == 189 && $this->interactive) + else if ($aura == SPELL_AURA_MOD_RATING && $this->interactive) { $result[2] = $modStrMin.'%s'; $result[3] = $modStrMax.'%s'; @@ -1965,7 +2004,8 @@ class SpellList extends BaseType { foreach ($this->canCreateItem() as $idx) { - if ($this->curTpl['effect'.$idx.'Id'] == 53)// Enchantment (has createItem Scroll of Enchantment) + // has createItem Scroll of Enchantment + if ($this->curTpl['effect'.$idx.'Id'] == SPELL_EFFECT_ENCHANT_ITEM) continue; foreach ($this->relItems->iterate() as $cId => $__) @@ -2243,7 +2283,7 @@ class SpellList extends BaseType // play sound effect for ($i = 1; $i < 4; $i++) - if ($this->getField('effect'.$i.'Id') == 131 || $this->getField('effect'.$i.'Id') == 132) + if ($this->getField('effect'.$i.'Id') == SPELL_EFFECT_PLAY_SOUND || $this->getField('effect'.$i.'Id') == SPELL_EFFECT_PLAY_MUSIC) $data[Type::SOUND][$this->getField('effect'.$i.'MiscValue')] = $this->getField('effect'.$i.'MiscValue'); } @@ -2308,9 +2348,9 @@ class SpellList extends BaseType for ($i = 1; $i <= 3; $i++) { - if (in_array($this->curTpl['effect'.$i.'Id'], [2, 7, 8, 9, 62, 67])) + if (in_array($this->curTpl['effect'.$i.'Id'], SpellLIst::EFFECTS_DIRECT_SCALING)) $isDirect = true; - else if (in_array($this->curTpl['effect'.$i.'AuraId'], [3, 8, 53])) + else if (in_array($this->curTpl['effect'.$i.'AuraId'], SpellList::AURAS_PERIODIC_SCALING)) if ($_ = $this->curTpl['duration']) $overTime = $_; else if ($this->curTpl['effect'.$i.'AuraId']) diff --git a/pages/item.php b/pages/item.php index 5037c214..6be169a5 100644 --- a/pages/item.php +++ b/pages/item.php @@ -1129,9 +1129,9 @@ class ItemPage extends genericPage // reagents $cnd = array( 'OR', - ['AND', ['effect1CreateItemId', $this->typeId], ['OR', ['effect1Id', SpellList::$effects['itemCreate']], ['effect1AuraId', SpellList::$auras['itemCreate']]]], - ['AND', ['effect2CreateItemId', $this->typeId], ['OR', ['effect2Id', SpellList::$effects['itemCreate']], ['effect2AuraId', SpellList::$auras['itemCreate']]]], - ['AND', ['effect3CreateItemId', $this->typeId], ['OR', ['effect3Id', SpellList::$effects['itemCreate']], ['effect3AuraId', SpellList::$auras['itemCreate']]]], + ['AND', ['effect1CreateItemId', $this->typeId], ['OR', ['effect1Id', SpellList::EFFECTS_ITEM_CREATE], ['effect1AuraId', SpellList::AURAS_ITEM_CREATE]]], + ['AND', ['effect2CreateItemId', $this->typeId], ['OR', ['effect2Id', SpellList::EFFECTS_ITEM_CREATE], ['effect2AuraId', SpellList::AURAS_ITEM_CREATE]]], + ['AND', ['effect3CreateItemId', $this->typeId], ['OR', ['effect3Id', SpellList::EFFECTS_ITEM_CREATE], ['effect3AuraId', SpellList::AURAS_ITEM_CREATE]]], ); $spellSource = new SpellList($cnd); diff --git a/pages/spell.php b/pages/spell.php index 6dc33491..40857b75 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -826,9 +826,9 @@ class SpellPage extends GenericPage // tab: triggered by $conditions = array( 'OR', - ['AND', ['OR', ['effect1Id', SpellList::$effects['trigger']], ['effect1AuraId', SpellList::$auras['trigger']]], ['effect1TriggerSpell', $this->subject->id]], - ['AND', ['OR', ['effect2Id', SpellList::$effects['trigger']], ['effect2AuraId', SpellList::$auras['trigger']]], ['effect2TriggerSpell', $this->subject->id]], - ['AND', ['OR', ['effect3Id', SpellList::$effects['trigger']], ['effect3AuraId', SpellList::$auras['trigger']]], ['effect3TriggerSpell', $this->subject->id]], + ['AND', ['OR', ['effect1Id', SpellList::EFFECTS_TRIGGER], ['effect1AuraId', SpellList::AURAS_TRIGGER]], ['effect1TriggerSpell', $this->subject->id]], + ['AND', ['OR', ['effect2Id', SpellList::EFFECTS_TRIGGER], ['effect2AuraId', SpellList::AURAS_TRIGGER]], ['effect2TriggerSpell', $this->subject->id]], + ['AND', ['OR', ['effect3Id', SpellList::EFFECTS_TRIGGER], ['effect3AuraId', SpellList::AURAS_TRIGGER]], ['effect3TriggerSpell', $this->subject->id]], ); $trigger = new SpellList($conditions); @@ -1087,9 +1087,9 @@ class SpellPage extends GenericPage // tab: taught by spell $conditions = array( 'OR', - ['AND', ['effect1Id', SpellList::$effects['teach']], ['effect1TriggerSpell', $this->subject->id]], - ['AND', ['effect2Id', SpellList::$effects['teach']], ['effect2TriggerSpell', $this->subject->id]], - ['AND', ['effect3Id', SpellList::$effects['teach']], ['effect3TriggerSpell', $this->subject->id]], + ['AND', ['effect1Id', SpellList::EFFECTS_TEACH], ['effect1TriggerSpell', $this->subject->id]], + ['AND', ['effect2Id', SpellList::EFFECTS_TEACH], ['effect2TriggerSpell', $this->subject->id]], + ['AND', ['effect3Id', SpellList::EFFECTS_TEACH], ['effect3TriggerSpell', $this->subject->id]], ); $tbSpell = new SpellList($conditions); diff --git a/setup/tools/sqlgen/source.func.php b/setup/tools/sqlgen/source.func.php index d4e0195b..14be012b 100644 --- a/setup/tools/sqlgen/source.func.php +++ b/setup/tools/sqlgen/source.func.php @@ -1010,7 +1010,7 @@ SqlGen::register(new class extends SetupScript foreach ($qSpells as $sId => $spell) for ($i = 1; $i <= 3; $i++) - if ($spell['effect'.$i.'Id'] == 36) // effect: learnSpell + if ($spell['effect'.$i.'Id'] == SPELL_EFFECT_LEARN_SPELL) $this->pushBuffer(Type::SPELL, $spell['effect'.$i.'TriggerSpell'], SRC_QUEST, $quests[$sId]['side'], $quests[$sId]['qty'] > 1 ? 0 : Type::QUEST, $quests[$sId]['id'], $areaParent[$quests[$sId]['zone']] ?? $quests[$sId]['zone']); } @@ -1042,7 +1042,7 @@ SqlGen::register(new class extends SetupScript $triggered = false; for ($i = 1; $i <= 3; $i++) { - if ($effects['effect'.$i.'Id'] != 36) // effect: learnSpell + if ($effects['effect'.$i.'Id'] != SPELL_EFFECT_LEARN_SPELL) continue; $triggered = true; @@ -1084,7 +1084,7 @@ SqlGen::register(new class extends SetupScript foreach ($tSpells as $tId => $spell) { for ($i = 1; $i <= 3; $i++) - if ($spell['effect'.$i.'Id'] == 36) // effect: learnSpell + if ($spell['effect'.$i.'Id'] == SPELL_EFFECT_LEARN_SPELL) $recurse[$spell['effect'.$i.'TriggerSpell']] = $tId; if (array_search($tId, $recurse)) diff --git a/setup/tools/sqlgen/spell.func.php b/setup/tools/sqlgen/spell.func.php index c56d715b..43bbd8cb 100644 --- a/setup/tools/sqlgen/spell.func.php +++ b/setup/tools/sqlgen/spell.func.php @@ -364,7 +364,7 @@ SqlGen::register(new class extends SetupScript for ($i = 1; $i <= 3; $i++) { - if ($effects['effect'.$i.'Id'] != 36) // effect: learnSpell + if ($effects['effect'.$i.'Id'] != SPELL_EFFECT_LEARN_SPELL) continue; $triggered = true;