| 1036 | | if(spellInfo_1->Id == spellId_2) //checked before |
| 1037 | | return false; |
| 1038 | | |
| 1039 | | if(spellInfo_1->SpellFamilyName && spellInfo_1->SpellFamilyName == spellInfo_2->SpellFamilyName) //resurrection sickness |
| 1040 | | { |
| 1041 | | if(spellInfo_1->SpellFamilyFlags && spellInfo_1->SpellFamilyFlags == spellInfo_2->SpellFamilyFlags) |
| 1042 | | return true; |
| 1043 | | if(spellInfo_1->SpellFamilyName == SPELLFAMILY_SHAMAN) |
| 1044 | | if(IsElementalShield(spellInfo_1) && IsElementalShield(spellInfo_2)) |
| 1045 | | return true; |
| 1046 | | //Corruption & Seed of corruption |
| 1047 | | if(spellInfo_1->SpellFamilyName == SPELLFAMILY_WARLOCK) |
| 1048 | | if( spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 1932 || |
| 1049 | | spellInfo_2->SpellIconID == 313 && spellInfo_1->SpellIconID == 1932 ) |
| 1050 | | if(spellInfo_1->SpellVisual != 0 && spellInfo_2->SpellVisual != 0) |
| 1051 | | return true; // can't be stacked |
| 1052 | | } |
| 1053 | | |
| 1054 | | //I think we don't check this correctly because i need a exception for spell: |
| 1055 | | //72,11327,18461...(called from 1856,1857...) Call Aura 16,31, after trigger another spell who call aura 77 and 77 remove 16 and 31, this should not happen. |
| 1056 | | //if(spellInfo_2->SpellFamilyFlags == 2048) |
| 1057 | | // return false; |
| 1058 | | |
| 1059 | | // Resurrection sickness |
| 1060 | | //if((spellInfo_1->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS) != (spellInfo_2->Id==SPELL_ID_PASSIVE_RESURRECTION_SICKNESS)) |
| 1061 | | // return false; |
| 1062 | | |
| 1063 | | // Specific spell family spells |
| 1064 | | /*switch(spellInfo_1->SpellFamilyName) |
| 1065 | | { |
| 1066 | | case SPELLFAMILY_GENERIC: |
| 1067 | | switch(spellInfo_2->SpellFamilyName) |
| 1068 | | { |
| 1069 | | case SPELLFAMILY_GENERIC: // same family case |
| 1070 | | { |
| 1071 | | // Thunderfury |
| 1072 | | if( spellInfo_1->Id == 21992 && spellInfo_2->Id == 27648 || spellInfo_2->Id == 21992 && spellInfo_1->Id == 27648 ) |
| 1073 | | return false; |
| 1074 | | |
| 1075 | | // Lightning Speed (Mongoose) and Fury of the Crashing Waves (Tsunami Talisman) |
| 1076 | | if( spellInfo_1->Id == 28093 && spellInfo_2->Id == 42084 || |
| 1077 | | spellInfo_2->Id == 28093 && spellInfo_1->Id == 42084 ) |
| 1078 | | return false; |
| 1079 | | |
| 1080 | | // Soulstone Resurrection and Twisting Nether (resurrector) |
| 1081 | | if( spellInfo_1->SpellIconID == 92 && spellInfo_2->SpellIconID == 92 && ( |
| 1082 | | spellInfo_1->SpellVisual == 99 && spellInfo_2->SpellVisual == 0 || |
| 1083 | | spellInfo_2->SpellVisual == 99 && spellInfo_1->SpellVisual == 0 ) ) |
| 1084 | | return false; |
| 1085 | | |
| 1086 | | // Heart of the Wild and (Primal Instinct (Idol of Terror) triggering spell or Agility) |
| 1087 | | if( spellInfo_1->SpellIconID == 240 && spellInfo_2->SpellIconID == 240 && ( |
| 1088 | | spellInfo_1->SpellVisual == 0 && spellInfo_2->SpellVisual == 78 || |
| 1089 | | spellInfo_2->SpellVisual == 0 && spellInfo_1->SpellVisual == 78 ) ) |
| 1090 | | return false; |
| 1091 | | |
| 1092 | | // Personalized Weather (thunder effect should overwrite rainy aura) |
| 1093 | | if(spellInfo_1->SpellIconID == 2606 && spellInfo_2->SpellIconID == 2606) |
| 1094 | | return false; |
| 1095 | | |
| 1096 | | // Brood Affliction: Bronze |
| 1097 | | if( (spellInfo_1->Id == 23170 && spellInfo_2->Id == 23171) || |
| 1098 | | (spellInfo_2->Id == 23170 && spellInfo_1->Id == 23171) ) |
| 1099 | | return false; |
| 1100 | | |
| 1101 | | break; |
| 1102 | | } |
| 1103 | | case SPELLFAMILY_WARRIOR: |
| 1104 | | { |
| 1105 | | // Scroll of Protection and Defensive Stance (multi-family check) |
| 1106 | | if( spellInfo_1->SpellIconID == 276 && spellInfo_1->SpellVisual == 196 && spellInfo_2->Id == 71) |
| 1107 | | return false; |
| 1108 | | |
| 1109 | | // Improved Hamstring -> Hamstring (multi-family check) |
| 1110 | | if( (spellInfo_2->SpellFamilyFlags & 2) && spellInfo_1->Id == 23694 ) |
| 1111 | | return false; |
| 1112 | | |
| 1113 | | break; |
| 1114 | | } |
| 1115 | | case SPELLFAMILY_DRUID: |
| 1116 | | { |
| 1117 | | // Scroll of Stamina and Leader of the Pack (multi-family check) |
| 1118 | | if( spellInfo_1->SpellIconID == 312 && spellInfo_1->SpellVisual == 216 && spellInfo_2->Id == 24932 ) |
| 1119 | | return false; |
| 1120 | | |
| 1121 | | // Dragonmaw Illusion (multi-family check) |
| 1122 | | if (spellId_1 == 40216 && spellId_2 == 42016 ) |
| 1123 | | return false; |
| 1124 | | |
| 1125 | | break; |
| 1126 | | } |
| 1127 | | case SPELLFAMILY_ROGUE: |
| 1128 | | { |
| 1129 | | // Garrote-Silence -> Garrote (multi-family check) |
| 1130 | | if( spellInfo_1->SpellIconID == 498 && spellInfo_1->SpellVisual == 0 && spellInfo_2->SpellIconID == 498 ) |
| 1131 | | return false; |
| 1132 | | |
| 1133 | | break; |
| 1134 | | } |
| 1135 | | case SPELLFAMILY_HUNTER: |
| 1136 | | { |
| 1137 | | // Concussive Shot and Imp. Concussive Shot (multi-family check) |
| 1138 | | if( spellInfo_1->Id == 19410 && spellInfo_2->Id == 5116 ) |
| 1139 | | return false; |
| 1140 | | |
| 1141 | | // Improved Wing Clip -> Wing Clip (multi-family check) |
| 1142 | | if( (spellInfo_2->SpellFamilyFlags & 0x40) && spellInfo_1->Id == 19229 ) |
| 1143 | | return false; |
| 1144 | | break; |
| 1145 | | } |
| 1146 | | case SPELLFAMILY_PALADIN: |
| 1147 | | { |
| 1148 | | // Unstable Currents and other -> *Sanctity Aura (multi-family check) |
| 1149 | | if( spellInfo_2->SpellIconID==502 && spellInfo_1->SpellIconID==502 && spellInfo_1->SpellVisual==969 ) |
| 1150 | | return false; |
| 1151 | | |
| 1152 | | // *Band of Eternal Champion and Seal of Command(multi-family check) |
| 1153 | | if( spellId_1 == 35081 && spellInfo_2->SpellIconID==561 && spellInfo_2->SpellVisual==7992) |
| 1154 | | return false; |
| 1155 | | |
| 1156 | | break; |
| 1157 | | } |
| 1158 | | } |
| 1159 | | break; |
| 1160 | | case SPELLFAMILY_MAGE: |
| 1161 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_MAGE ) |
| 1162 | | { |
| 1163 | | // Blizzard & Chilled (and some other stacked with blizzard spells |
| 1164 | | if( (spellInfo_1->SpellFamilyFlags & 0x80) && (spellInfo_2->SpellFamilyFlags & 0x100000) || |
| 1165 | | (spellInfo_2->SpellFamilyFlags & 0x80) && (spellInfo_1->SpellFamilyFlags & 0x100000) ) |
| 1166 | | return false; |
| 1167 | | |
| 1168 | | // Blink & Improved Blink |
| 1169 | | if( (spellInfo_1->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_2->SpellVisual == 72 && spellInfo_2->SpellIconID == 1499) || |
| 1170 | | (spellInfo_2->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_1->SpellVisual == 72 && spellInfo_1->SpellIconID == 1499) ) |
| 1171 | | return false; |
| 1172 | | } |
| 1173 | | // Detect Invisibility and Mana Shield (multi-family check) |
| 1174 | | if( spellInfo_2->Id == 132 && spellInfo_1->SpellIconID == 209 && spellInfo_1->SpellVisual == 968 ) |
| 1175 | | return false; |
| 1176 | | |
| 1177 | | // Combustion and Fire Protection Aura (multi-family check) |
| 1178 | | if( spellInfo_1->Id == 11129 && spellInfo_2->SpellIconID == 33 && spellInfo_2->SpellVisual == 321 ) |
| 1179 | | return false; |
| 1180 | | |
| 1181 | | break; |
| 1182 | | case SPELLFAMILY_WARLOCK: |
| 1183 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_WARLOCK ) |
| 1184 | | { |
| 1185 | | // Siphon Life and Drain Life |
| 1186 | | if( spellInfo_1->SpellIconID == 152 && spellInfo_2->SpellIconID == 546 || |
| 1187 | | spellInfo_2->SpellIconID == 152 && spellInfo_1->SpellIconID == 546 ) |
| 1188 | | return false; |
| 1189 | | |
| 1190 | | //Corruption & Seed of corruption |
| 1191 | | if( spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 1932 || |
| 1192 | | spellInfo_2->SpellIconID == 313 && spellInfo_1->SpellIconID == 1932 ) |
| 1193 | | if(spellInfo_1->SpellVisual != 0 && spellInfo_2->SpellVisual != 0) |
| 1194 | | return true; // can't be stacked |
| 1195 | | |
| 1196 | | // Corruption and Unstable Affliction |
| 1197 | | if( spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 2039 || |
| 1198 | | spellInfo_2->SpellIconID == 313 && spellInfo_1->SpellIconID == 2039 ) |
| 1199 | | return false; |
| 1200 | | |
| 1201 | | // (Corruption or Unstable Affliction) and (Curse of Agony or Curse of Doom) |
| 1202 | | if( (spellInfo_1->SpellIconID == 313 || spellInfo_1->SpellIconID == 2039) && (spellInfo_2->SpellIconID == 544 || spellInfo_2->SpellIconID == 91) || |
| 1203 | | (spellInfo_2->SpellIconID == 313 || spellInfo_2->SpellIconID == 2039) && (spellInfo_1->SpellIconID == 544 || spellInfo_1->SpellIconID == 91) ) |
| 1204 | | return false; |
| 1205 | | } |
| 1206 | | // Detect Invisibility and Mana Shield (multi-family check) |
| 1207 | | if( spellInfo_1->Id == 132 && spellInfo_2->SpellIconID == 209 && spellInfo_2->SpellVisual == 968 ) |
| 1208 | | return false; |
| 1209 | | break; |
| 1210 | | case SPELLFAMILY_WARRIOR: |
| 1211 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_WARRIOR ) |
| 1212 | | { |
| 1213 | | // Rend and Deep Wound |
| 1214 | | if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x1000000000LL) || |
| 1215 | | (spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x1000000000LL) ) |
| 1216 | | return false; |
| 1217 | | |
| 1218 | | // Battle Shout and Rampage |
| 1219 | | if( (spellInfo_1->SpellIconID == 456 && spellInfo_2->SpellIconID == 2006) || |
| 1220 | | (spellInfo_2->SpellIconID == 456 && spellInfo_1->SpellIconID == 2006) ) |
| 1221 | | return false; |
| 1222 | | } |
| 1223 | | |
| 1224 | | // Hamstring -> Improved Hamstring (multi-family check) |
| 1225 | | if( (spellInfo_1->SpellFamilyFlags & 2) && spellInfo_2->Id == 23694 ) |
| 1226 | | return false; |
| 1227 | | |
| 1228 | | // Defensive Stance and Scroll of Protection (multi-family check) |
| 1229 | | if( spellInfo_1->Id == 71 && spellInfo_2->SpellIconID == 276 && spellInfo_2->SpellVisual == 196 ) |
| 1230 | | return false; |
| 1231 | | |
| 1232 | | // Bloodlust and Bloodthirst (multi-family check) |
| 1233 | | if( spellInfo_2->Id == 2825 && spellInfo_1->SpellIconID == 38 && spellInfo_1->SpellVisual == 0 ) |
| 1234 | | return false; |
| 1235 | | |
| 1236 | | break; |
| 1237 | | case SPELLFAMILY_PRIEST: |
| 1238 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_PRIEST ) |
| 1239 | | { |
| 1240 | | //Devouring Plague and Shadow Vulnerability |
| 1241 | | if( (spellInfo_1->SpellFamilyFlags & 0x2000000) && (spellInfo_2->SpellFamilyFlags & 0x800000000LL) || |
| 1242 | | (spellInfo_2->SpellFamilyFlags & 0x2000000) && (spellInfo_1->SpellFamilyFlags & 0x800000000LL) ) |
| 1243 | | return false; |
| 1244 | | |
| 1245 | | //StarShards and Shadow Word: Pain |
| 1246 | | if( (spellInfo_1->SpellFamilyFlags & 0x200000) && (spellInfo_2->SpellFamilyFlags & 0x8000) || |
| 1247 | | (spellInfo_2->SpellFamilyFlags & 0x200000) && (spellInfo_1->SpellFamilyFlags & 0x8000) ) |
| 1248 | | return false; |
| 1249 | | } |
| 1250 | | break; |
| 1251 | | case SPELLFAMILY_DRUID: |
| 1252 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_DRUID ) |
| 1253 | | { |
| 1254 | | //Omen of Clarity and Blood Frenzy |
| 1255 | | if( (spellInfo_1->SpellFamilyFlags == 0x0 && spellInfo_1->SpellIconID == 108) && (spellInfo_2->SpellFamilyFlags & 0x20000000000000LL) || |
| 1256 | | (spellInfo_2->SpellFamilyFlags == 0x0 && spellInfo_2->SpellIconID == 108) && (spellInfo_1->SpellFamilyFlags & 0x20000000000000LL) ) |
| 1257 | | return false; |
| 1258 | | |
| 1259 | | // Tree of Life (Shapeshift) and 34123 Tree of Life (Passive) |
| 1260 | | if ((spellId_1 == 33891 && spellId_2 == 34123) || |
| 1261 | | (spellId_2 == 33891 && spellId_1 == 34123)) |
| 1262 | | return false; |
| 1263 | | |
| 1264 | | // Wrath of Elune and Nature's Grace |
| 1265 | | if( spellInfo_1->Id == 16886 && spellInfo_2->Id == 46833 || spellInfo_2->Id == 16886 && spellInfo_1->Id == 46833 ) |
| 1266 | | return false; |
| 1267 | | |
| 1268 | | // Bear Rage (Feral T4 (2)) and Omen of Clarity |
| 1269 | | if( spellInfo_1->Id == 16864 && spellInfo_2->Id == 37306 || spellInfo_2->Id == 16864 && spellInfo_1->Id == 37306 ) |
| 1270 | | return false; |
| 1271 | | |
| 1272 | | // Cat Energy (Feral T4 (2)) and Omen of Clarity |
| 1273 | | if( spellInfo_1->Id == 16864 && spellInfo_2->Id == 37311 || spellInfo_2->Id == 16864 && spellInfo_1->Id == 37311 ) |
| 1274 | | return false; |
| 1275 | | } |
| 1276 | | |
| 1277 | | // Leader of the Pack and Scroll of Stamina (multi-family check) |
| 1278 | | if( spellInfo_1->Id == 24932 && spellInfo_2->SpellIconID == 312 && spellInfo_2->SpellVisual == 216 ) |
| 1279 | | return false; |
| 1280 | | |
| 1281 | | // Dragonmaw Illusion (multi-family check) |
| 1282 | | if (spellId_1 == 42016 && spellId_2 == 40216 ) |
| 1283 | | return false; |
| 1284 | | |
| 1285 | | break; |
| 1286 | | case SPELLFAMILY_ROGUE: |
| 1287 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_ROGUE ) |
| 1288 | | { |
| 1289 | | // Master of Subtlety |
| 1290 | | if (spellId_1 == 31665 && spellId_2 == 31666 || spellId_1 == 31666 && spellId_2 == 31665 ) |
| 1291 | | return false; |
| 1292 | | } |
| 1293 | | |
| 1294 | | // Garrote -> Garrote-Silence (multi-family check) |
| 1295 | | if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual == 0 ) |
| 1296 | | return false; |
| 1297 | | break; |
| 1298 | | case SPELLFAMILY_HUNTER: |
| 1299 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_HUNTER ) |
| 1300 | | { |
| 1301 | | // Rapid Fire & Quick Shots |
| 1302 | | if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x20000000000LL) || |
| 1303 | | (spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x20000000000LL) ) |
| 1304 | | return false; |
| 1305 | | |
| 1306 | | // Serpent Sting & (Immolation/Explosive Trap Effect) |
| 1307 | | if( (spellInfo_1->SpellFamilyFlags & 0x4) && (spellInfo_2->SpellFamilyFlags & 0x00000004000LL) || |
| 1308 | | (spellInfo_2->SpellFamilyFlags & 0x4) && (spellInfo_1->SpellFamilyFlags & 0x00000004000LL) ) |
| 1309 | | return false; |
| 1310 | | |
| 1311 | | // Bestial Wrath |
| 1312 | | if( spellInfo_1->SpellIconID == 1680 && spellInfo_2->SpellIconID == 1680 ) |
| 1313 | | return false; |
| 1314 | | } |
| 1315 | | |
| 1316 | | // Wing Clip -> Improved Wing Clip (multi-family check) |
| 1317 | | if( (spellInfo_1->SpellFamilyFlags & 0x40) && spellInfo_2->Id == 19229 ) |
| 1318 | | return false; |
| 1319 | | |
| 1320 | | // Concussive Shot and Imp. Concussive Shot (multi-family check) |
| 1321 | | if( spellInfo_2->Id == 19410 && spellInfo_1->Id == 5116 ) |
| 1322 | | return false; |
| 1323 | | break; |
| 1324 | | case SPELLFAMILY_PALADIN: |
| 1325 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_PALADIN ) |
| 1326 | | { |
| 1327 | | // Paladin Seals |
| 1328 | | if( IsSealSpell(spellInfo_1) && IsSealSpell(spellInfo_2) ) |
| 1329 | | return true; |
| 1330 | | } |
| 1331 | | // Combustion and Fire Protection Aura (multi-family check) |
| 1332 | | if( spellInfo_2->Id == 11129 && spellInfo_1->SpellIconID == 33 && spellInfo_1->SpellVisual == 321 ) |
| 1333 | | return false; |
| 1334 | | |
| 1335 | | // *Sanctity Aura -> Unstable Currents and other (multi-family check) |
| 1336 | | if( spellInfo_1->SpellIconID==502 && spellInfo_2->SpellFamilyName == SPELLFAMILY_GENERIC && spellInfo_2->SpellIconID==502 && spellInfo_2->SpellVisual==969 ) |
| 1337 | | return false; |
| 1338 | | |
| 1339 | | // *Seal of Command and Band of Eternal Champion (multi-family check) |
| 1340 | | if( spellInfo_1->SpellIconID==561 && spellInfo_1->SpellVisual==7992 && spellId_2 == 35081) |
| 1341 | | return false; |
| 1342 | | break; |
| 1343 | | case SPELLFAMILY_SHAMAN: |
| 1344 | | if( spellInfo_2->SpellFamilyName == SPELLFAMILY_SHAMAN ) |
| 1345 | | { |
| 1346 | | // shaman shields |
| 1347 | | if( IsElementalShield(spellInfo_1) && IsElementalShield(spellInfo_2) ) |
| 1348 | | return true; |
| 1349 | | |
| 1350 | | // Windfury weapon |
| 1351 | | if( spellInfo_1->SpellIconID==220 && spellInfo_2->SpellIconID==220 && |
| 1352 | | spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags ) |
| 1353 | | return false; |
| 1354 | | } |
| 1355 | | // Bloodlust and Bloodthirst (multi-family check) |
| 1356 | | if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual == 0 ) |
| 1357 | | return false; |
| 1358 | | break; |
| 1359 | | default: |
| 1360 | | break; |
| 1361 | | } |
| 1362 | | |
| 1363 | | if (IsRankSpellDueToSpell(spellInfo_1, spellId_2)) |
| 1364 | | return true;*/ |
| 1365 | | |
| 1366 | | if (spellInfo_1->SpellIconID != spellInfo_2->SpellIconID |
| 1367 | | || !spellInfo_1->SpellIconID) |
| 1368 | | return false; |
| 1369 | | |
| 1370 | | if (spellInfo_1->SpellFamilyName != spellInfo_2->SpellFamilyName) |
| 1371 | | return false; |
| 1372 | | |
| 1373 | | for (int i = 0; i < 3; ++i) |
| 1374 | | if (spellInfo_1->Effect[i] != spellInfo_2->Effect[i] || |
| 1375 | | spellInfo_1->EffectItemType[i] != spellInfo_2->EffectItemType[i] || |
| 1376 | | spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i] || |
| 1377 | | spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]) |
| | 1044 | if(spellInfo_1->SpellFamilyName != spellInfo_2->SpellFamilyName) |
| | 1045 | return false; |
| | 1046 | |
| | 1047 | if(!spellInfo_1->SpellFamilyName) // generic spells |
| | 1048 | { |
| | 1049 | if(!spellInfo_1->SpellIconID |
| | 1050 | || spellInfo_1->SpellIconID != spellInfo_2->SpellIconID) |
| | 1051 | return false; |
| | 1052 | } |
| | 1053 | else if (spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags) |
| | 1054 | return false; |
| | 1055 | |
| | 1056 | for(uint32 i = 0; i < 3; ++i) |
| | 1057 | if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i] |
| | 1058 | || spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]) |