diff options
author | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:26:53 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-08-22 17:26:53 -0500 |
commit | dc95ce61b46ce2d542ee4c4dbdf35a9e854c4316 (patch) | |
tree | e673101dc6554a76dfacb5cf3497dd1d2bde4f41 /src/server/game/Spells/SpellMgr.cpp | |
parent | cecaab7948d5289439d1334d7bedcaae90e1fe3a (diff) | |
parent | 85ed0e32a9b2b029c1db3cf1a914b3940cf72b9b (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
dep/PackageList.txt
src/server/game/Movement/MotionMaster.cpp
src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
src/server/game/Movement/Spline/MoveSplineInit.h
src/server/game/World/World.h
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rwxr-xr-x | src/server/game/Spells/SpellMgr.cpp | 378 |
1 files changed, 210 insertions, 168 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index cf200f19010..5493f1a2649 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -30,6 +30,8 @@ #include "CreatureAI.h" #include "MapManager.h" #include "BattlegroundIC.h" +#include "BattlefieldWG.h" +#include "BattlefieldMgr.h" bool IsPrimaryProfessionSkill(uint32 skill) { @@ -370,7 +372,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id); else - sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id); } return false; } @@ -384,7 +386,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); else - sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType); } return false; } @@ -402,7 +404,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); else - sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell); } return false; } @@ -422,7 +424,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg if (player) ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); else - sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); + sLog->outError(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]); } return false; } @@ -454,7 +456,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con uint32 mode = uint32(caster->GetMap()->GetSpawnMode()); if (mode >= MAX_DIFFICULTY) { - sLog->outError("SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId); return spellId; //return source spell } @@ -477,7 +479,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con if (difficultyEntry->SpellID[mode] <= 0) { - sLog->outErrorDb("SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode); + sLog->outError(LOG_FILTER_SQL, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode); return spellId; } @@ -1120,6 +1122,16 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 return false; break; } + case 58730: // No fly Zone - Wintergrasp + { + if (!player) + return false; + + Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetZoneId()); + if (!Bf || Bf->CanFlyIn() || (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY))) + return false; + break; + } case 68719: // Oil Refinery - Isle of Conquest. case 68720: // Quarry - Isle of Conquest. { @@ -1135,6 +1147,26 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 return false; } + case 56618: // Horde Controls Factory Phase Shift + case 56617: // Alliance Controls Factory Phase Shift + { + if (!player) + return false; + + Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetZoneId()); + + if (!bf || bf->GetTypeId() != BATTLEFIELD_WG) + return false; + + // team that controls the workshop in the specified area + uint32 team = bf->GetData(newArea); + + if (team == TEAM_HORDE) + return spellId == 56618; + else if (team == TEAM_ALLIANCE) + return spellId == 56617; + } + break; } return true; @@ -1155,8 +1187,8 @@ void SpellMgr::LoadSpellRanks() if (!result) { - sLog->outString(">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty."); + return; } @@ -1195,13 +1227,13 @@ void SpellMgr::LoadSpellRanks() SpellInfo const* first = GetSpellInfo(lastSpell); if (!first) { - sLog->outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); + sLog->outError(LOG_FILTER_SQL, "Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); continue; } // check if chain is long enough if (rankChain.size() < 2) { - sLog->outErrorDb("There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); + sLog->outError(LOG_FILTER_SQL, "There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); continue; } int32 curRank = 0; @@ -1212,14 +1244,14 @@ void SpellMgr::LoadSpellRanks() SpellInfo const* spell = GetSpellInfo(itr->first); if (!spell) { - sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); valid = false; break; } ++curRank; if (itr->second != curRank) { - sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); + sLog->outError(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); valid = false; break; } @@ -1251,8 +1283,8 @@ void SpellMgr::LoadSpellRanks() while (true); } while (!finished); - sLog->outString(">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellRequired() @@ -1267,8 +1299,8 @@ void SpellMgr::LoadSpellRequired() if (!result) { - sLog->outString(">> Loaded 0 spell required records. DB table `spell_required` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell required records. DB table `spell_required` is empty."); + return; } @@ -1284,26 +1316,26 @@ void SpellMgr::LoadSpellRequired() SpellInfo const* spell = GetSpellInfo(spell_id); if (!spell) { - sLog->outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); + sLog->outError(LOG_FILTER_SQL, "spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); continue; } SpellInfo const* req_spell = GetSpellInfo(spell_req); if (!req_spell) { - sLog->outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); + sLog->outError(LOG_FILTER_SQL, "req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); continue; } if (GetFirstSpellInChain(spell_id) == GetFirstSpellInChain(spell_req)) { - sLog->outErrorDb("req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); + sLog->outError(LOG_FILTER_SQL, "req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); continue; } if (IsSpellRequiringSpell(spell_id, spell_req)) { - sLog->outErrorDb("duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); + sLog->outError(LOG_FILTER_SQL, "duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); continue; } @@ -1312,8 +1344,8 @@ void SpellMgr::LoadSpellRequired() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellLearnSkills() @@ -1350,8 +1382,7 @@ void SpellMgr::LoadSpellLearnSkills() } } - sLog->outString(">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellLearnSpells() @@ -1364,8 +1395,7 @@ void SpellMgr::LoadSpellLearnSpells() QueryResult result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell"); if (!result) { - sLog->outString(">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty."); return; } @@ -1383,19 +1413,19 @@ void SpellMgr::LoadSpellLearnSpells() if (!GetSpellInfo(spell_id)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` does not exist", spell_id); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` does not exist", spell_id); continue; } if (!GetSpellInfo(node.spell)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); continue; } if (GetTalentSpellCost(node.spell)) { - sLog->outErrorDb("Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); continue; } @@ -1437,7 +1467,7 @@ void SpellMgr::LoadSpellLearnSpells() { if (itr->second.spell == dbc_node.spell) { - sLog->outErrorDb("Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", + sLog->outError(LOG_FILTER_SQL, "Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", spell, dbc_node.spell); found = true; break; @@ -1453,8 +1483,7 @@ void SpellMgr::LoadSpellLearnSpells() } } - sLog->outString(">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellTargetPositions() @@ -1467,8 +1496,7 @@ void SpellMgr::LoadSpellTargetPositions() QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position"); if (!result) { - sLog->outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); return; } @@ -1490,20 +1518,20 @@ void SpellMgr::LoadSpellTargetPositions() MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId); if (!mapEntry) { - sLog->outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, st.target_mapId); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, st.target_mapId); continue; } if (st.target_X==0 && st.target_Y==0 && st.target_Z==0) { - sLog->outErrorDb("Spell (ID:%u) target coordinates not provided.", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) target coordinates not provided.", Spell_ID); continue; } SpellInfo const* spellInfo = GetSpellInfo(Spell_ID); if (!spellInfo) { - sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID); continue; } @@ -1518,7 +1546,7 @@ void SpellMgr::LoadSpellTargetPositions() uint32 area_id = sMapMgr->GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z); if (area_id != uint32(spellInfo->Effects[i].MiscValue)) { - sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.", Spell_ID, spellInfo->Effects[i].MiscValue, area_id); + sLog->outError(LOG_FILTER_SQL, "Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.", Spell_ID, spellInfo->Effects[i].MiscValue, area_id); break; } } @@ -1529,7 +1557,7 @@ void SpellMgr::LoadSpellTargetPositions() } if (!found) { - sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID); + sLog->outError(LOG_FILTER_SQL, "Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID); continue; } @@ -1573,8 +1601,7 @@ void SpellMgr::LoadSpellTargetPositions() } }*/ - sLog->outString(">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellGroups() @@ -1588,8 +1615,7 @@ void SpellMgr::LoadSpellGroups() QueryResult result = WorldDatabase.Query("SELECT id, spell_id FROM spell_group"); if (!result) { - sLog->outString(">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty."); return; } @@ -1602,7 +1628,7 @@ void SpellMgr::LoadSpellGroups() uint32 group_id = fields[0].GetUInt32(); if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_groups` is in core range, but is not defined in core!", group_id); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` is in core range, but is not defined in core!", group_id); continue; } int32 spell_id = fields[1].GetInt32(); @@ -1618,7 +1644,7 @@ void SpellMgr::LoadSpellGroups() { if (groups.find(abs(itr->second)) == groups.end()) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_groups` does not exist", abs(itr->second)); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` does not exist", abs(itr->second)); mSpellGroupSpell.erase(itr++); } else @@ -1630,12 +1656,12 @@ void SpellMgr::LoadSpellGroups() if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_group` does not exist", itr->second); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_group` does not exist", itr->second); mSpellGroupSpell.erase(itr++); } else if (spellInfo->GetRank() > 1) { - sLog->outErrorDb("Spell %u listed in `spell_group` is not first rank of spell", itr->second); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_group` is not first rank of spell", itr->second); mSpellGroupSpell.erase(itr++); } else @@ -1655,8 +1681,7 @@ void SpellMgr::LoadSpellGroups() } } - sLog->outString(">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellGroupStackRules() @@ -1669,8 +1694,7 @@ void SpellMgr::LoadSpellGroupStackRules() QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules"); if (!result) { - sLog->outString(">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty."); return; } @@ -1683,7 +1707,7 @@ void SpellMgr::LoadSpellGroupStackRules() uint8 stack_rule = fields[1].GetInt8(); if (stack_rule >= SPELL_GROUP_STACK_RULE_MAX) { - sLog->outErrorDb("SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); + sLog->outError(LOG_FILTER_SQL, "SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); continue; } @@ -1691,7 +1715,7 @@ void SpellMgr::LoadSpellGroupStackRules() if (spellGroup.first == spellGroup.second) { - sLog->outErrorDb("SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); + sLog->outError(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); continue; } @@ -1700,8 +1724,7 @@ void SpellMgr::LoadSpellGroupStackRules() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellProcEvents() @@ -1714,8 +1737,7 @@ void SpellMgr::LoadSpellProcEvents() QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event"); if (!result) { - sLog->outString(">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty."); return; } @@ -1730,7 +1752,7 @@ void SpellMgr::LoadSpellProcEvents() SpellInfo const* spell = GetSpellInfo(entry); if (!spell) { - sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` does not exist", entry); continue; } @@ -1753,7 +1775,7 @@ void SpellMgr::LoadSpellProcEvents() { if (spe.procFlags == 0) { - sLog->outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` probally not triggered spell", entry); continue; } customProc++; @@ -1762,10 +1784,10 @@ void SpellMgr::LoadSpellProcEvents() } while (result->NextRow()); if (customProc) - sLog->outString(">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); else - sLog->outString(">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } void SpellMgr::LoadSpellProcs() @@ -1778,8 +1800,7 @@ void SpellMgr::LoadSpellProcs() QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc"); if (!result) { - sLog->outString(">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); return; } @@ -1800,7 +1821,7 @@ void SpellMgr::LoadSpellProcs() SpellInfo const* spellEntry = GetSpellInfo(spellId); if (!spellEntry) { - sLog->outErrorDb("Spell %u listed in `spell_proc` does not exist", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` does not exist", spellId); continue; } @@ -1808,7 +1829,7 @@ void SpellMgr::LoadSpellProcs() { if (GetFirstSpellInChain(spellId) != uint32(spellId)) { - sLog->outErrorDb("Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32()); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32()); continue; } } @@ -1835,7 +1856,7 @@ void SpellMgr::LoadSpellProcs() { if (mSpellProcMap.find(spellId) != mSpellProcMap.end()) { - sLog->outErrorDb("Spell %u listed in `spell_proc` has duplicate entry in the table", spellId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellId); break; } SpellProcEntry procEntry = SpellProcEntry(baseProcEntry); @@ -1850,47 +1871,47 @@ void SpellMgr::LoadSpellProcs() // validate data if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask); if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16)) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName); if (procEntry.chance < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId); procEntry.chance = 0; } if (procEntry.ratePerMinute < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId); procEntry.ratePerMinute = 0; } if (cooldown < 0) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId); procEntry.cooldown = 0; } if (procEntry.chance == 0 && procEntry.ratePerMinute == 0) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId); if (procEntry.charges > 99) { - sLog->outErrorDb("`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId); procEntry.charges = 99; } if (!procEntry.typeMask) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId); if (procEntry.spellTypeMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask); if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId); if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK) - sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId); if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask); if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId); if (procEntry.hitMask & ~PROC_HIT_MASK_ALL) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask); if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH))))) - sLog->outErrorDb("`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId); + sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId); mSpellProcMap[spellId] = procEntry; @@ -1905,8 +1926,7 @@ void SpellMgr::LoadSpellProcs() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellBonusess() @@ -1919,8 +1939,7 @@ void SpellMgr::LoadSpellBonusess() QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data"); if (!result) { - sLog->outString(">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty."); return; } @@ -1933,7 +1952,7 @@ void SpellMgr::LoadSpellBonusess() SpellInfo const* spell = GetSpellInfo(entry); if (!spell) { - sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_bonus_data` does not exist", entry); continue; } @@ -1946,8 +1965,7 @@ void SpellMgr::LoadSpellBonusess() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellThreats() @@ -1960,8 +1978,7 @@ void SpellMgr::LoadSpellThreats() QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat"); if (!result) { - sLog->outString(">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty."); return; } @@ -1974,7 +1991,7 @@ void SpellMgr::LoadSpellThreats() if (!GetSpellInfo(entry)) { - sLog->outErrorDb("Spell %u listed in `spell_threat` does not exist", entry); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_threat` does not exist", entry); continue; } @@ -1987,8 +2004,7 @@ void SpellMgr::LoadSpellThreats() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSkillLineAbilityMap() @@ -2009,8 +2025,7 @@ void SpellMgr::LoadSkillLineAbilityMap() ++count; } - sLog->outString(">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellPetAuras() @@ -2023,8 +2038,7 @@ void SpellMgr::LoadSpellPetAuras() QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras"); if (!result) { - sLog->outString(">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); return; } @@ -2046,21 +2060,21 @@ void SpellMgr::LoadSpellPetAuras() SpellInfo const* spellInfo = GetSpellInfo(spell); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_pet_auras` does not exist", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_pet_auras` does not exist", spell); continue; } if (spellInfo->Effects[eff].Effect != SPELL_EFFECT_DUMMY && (spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA || spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY)) { - sLog->outError("Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); + sLog->outError(LOG_FILTER_SPELLS_AURAS, "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); continue; } SpellInfo const* spellInfo2 = GetSpellInfo(aura); if (!spellInfo2) { - sLog->outErrorDb("Aura %u listed in `spell_pet_auras` does not exist", aura); + sLog->outError(LOG_FILTER_SQL, "Aura %u listed in `spell_pet_auras` does not exist", aura); continue; } @@ -2071,8 +2085,7 @@ void SpellMgr::LoadSpellPetAuras() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } // Fill custom data about enchancments @@ -2094,7 +2107,7 @@ void SpellMgr::LoadEnchantCustomAttr() continue; // TODO: find a better check - if (!(spellInfo->AttributesEx2 & SPELL_ATTR2_UNK13) || !(spellInfo->Attributes & SPELL_ATTR0_NOT_SHAPESHIFT)) + if (!(spellInfo->AttributesEx2 & SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA) || !(spellInfo->Attributes & SPELL_ATTR0_NOT_SHAPESHIFT)) continue; for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j) @@ -2112,8 +2125,7 @@ void SpellMgr::LoadEnchantCustomAttr() } } - sLog->outString(">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellEnchantProcData() @@ -2126,8 +2138,7 @@ void SpellMgr::LoadSpellEnchantProcData() QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data"); if (!result) { - sLog->outString(">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); return; } @@ -2141,7 +2152,7 @@ void SpellMgr::LoadSpellEnchantProcData() SpellItemEnchantmentEntry const* ench = sSpellItemEnchantmentStore.LookupEntry(enchantId); if (!ench) { - sLog->outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); + sLog->outError(LOG_FILTER_SQL, "Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); continue; } @@ -2156,8 +2167,7 @@ void SpellMgr::LoadSpellEnchantProcData() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellLinked() @@ -2170,8 +2180,7 @@ void SpellMgr::LoadSpellLinked() QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell"); if (!result) { - sLog->outString(">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); return; } @@ -2187,13 +2196,13 @@ void SpellMgr::LoadSpellLinked() SpellInfo const* spellInfo = GetSpellInfo(abs(trigger)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); continue; } spellInfo = GetSpellInfo(abs(effect)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); continue; } @@ -2209,8 +2218,7 @@ void SpellMgr::LoadSpellLinked() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadPetLevelupSpellMap() @@ -2266,8 +2274,7 @@ void SpellMgr::LoadPetLevelupSpellMap() } } - sLog->outString(">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); } bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells) @@ -2351,10 +2358,9 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outString(">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString("Loading summonable creature templates..."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading summonable creature templates..."); oldMSTime = getMSTime(); // different summon spells @@ -2395,8 +2401,7 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog->outString(">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellAreas() @@ -2414,8 +2419,8 @@ void SpellMgr::LoadSpellAreas() if (!result) { - sLog->outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); + return; } @@ -2443,7 +2448,7 @@ void SpellMgr::LoadSpellAreas() } else { - sLog->outErrorDb("Spell %u listed in `spell_area` does not exist", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` does not exist", spell); continue; } @@ -2472,20 +2477,20 @@ void SpellMgr::LoadSpellAreas() if (!ok) { - sLog->outErrorDb("Spell %u listed in `spell_area` already listed with similar requirements.", spell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` already listed with similar requirements.", spell); continue; } } if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId); continue; } if (spellArea.questStart && !sObjectMgr->GetQuestTemplate(spellArea.questStart)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart); continue; } @@ -2493,13 +2498,13 @@ void SpellMgr::LoadSpellAreas() { if (!sObjectMgr->GetQuestTemplate(spellArea.questEnd)) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd); continue; } if (spellArea.questEnd == spellArea.questStart && !spellArea.questStartCanActive) { - sLog->outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell, spellArea.questEnd); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell, spellArea.questEnd); continue; } } @@ -2509,13 +2514,13 @@ void SpellMgr::LoadSpellAreas() SpellInfo const* spellInfo = GetSpellInfo(abs(spellArea.auraSpell)); if (!spellInfo) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell)); continue; } if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell)); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell)); continue; } @@ -2535,7 +2540,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); continue; } @@ -2551,7 +2556,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell); continue; } } @@ -2559,13 +2564,13 @@ void SpellMgr::LoadSpellAreas() if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask); continue; } if (spellArea.gender != GENDER_NONE && spellArea.gender != GENDER_FEMALE && spellArea.gender != GENDER_MALE) { - sLog->outErrorDb("Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); + sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); continue; } @@ -2595,8 +2600,7 @@ void SpellMgr::LoadSpellAreas() ++count; } while (result->NextRow()); - sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadSpellInfoStore() @@ -2612,8 +2616,7 @@ void SpellMgr::LoadSpellInfoStore() mSpellInfoMap[i] = new SpellInfo(spellEntry); } - sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::UnloadSpellInfoStore() @@ -2925,8 +2928,7 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); - sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime)); } void SpellMgr::LoadDbcDataCorrections() @@ -2960,8 +2962,10 @@ void SpellMgr::LoadDbcDataCorrections() switch (spellInfo->Id) { - case 40244: case 40245: // Simon Game Visual - case 40246: case 40247: // Simon Game Visual + case 40244: // Simon Game Visual + case 40245: // Simon Game Visual + case 40246: // Simon Game Visual + case 40247: // Simon Game Visual case 42835: // Spout, remove damage effect, only anim is needed spellInfo->Effect[0] = 0; break; @@ -2973,7 +2977,6 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->EffectImplicitTargetB[0] = 0; break; case 63665: // Charge (Argent Tournament emote on riders) - case 31447: // Mark of Kaz'rogal (needs target selection script) case 31298: // Sleep (needs target selection script) case 51904: // Summon Ghouls On Scarlet Crusade (this should use conditions table, script for this spell needs to be fixed) case 2895: // Wrath of Air Totem rank 1 (Aura) @@ -3045,6 +3048,9 @@ void SpellMgr::LoadDbcDataCorrections() case 48246: // Ball of Flame spellInfo->MaxAffectedTargets = 1; break; + case 36384: // Skartax Purple Beam + spellInfo->MaxAffectedTargets = 2; + break; case 41376: // Spite case 39992: // Needle Spine case 29576: // Multi-Shot @@ -3084,7 +3090,7 @@ void SpellMgr::LoadDbcDataCorrections() case 50312: // Unholy Frenzy spellInfo->MaxAffectedTargets = 15; break; - case 33711: //Murmur's Touch + case 33711: // Murmur's Touch case 38794: spellInfo->MaxAffectedTargets = 1; spellInfo->EffectTriggerSpell[0] = 33760; @@ -3125,6 +3131,9 @@ void SpellMgr::LoadDbcDataCorrections() case 51852: // The Eye of Acherus (no spawn in phase 2 in db) spellInfo->EffectMiscValue[0] |= 1; break; + case 51912: // Crafty's Ultra-Advanced Proto-Typical Shortening Blaster + spellInfo->EffectAmplitude[0] = 3000; + break; case 29809: // Desecration Arm - 36 instead of 37 - typo? :/ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_7_YARDS; break; @@ -3234,9 +3243,24 @@ void SpellMgr::LoadDbcDataCorrections() // this needs research on modifier applying rules, does not seem to be in Attributes fields spellInfo->EffectSpellClassMask[0] = flag96(0x00000040, 0x00000000, 0x00000000); break; - case 63163: // Apply Enchanted Bridle (Argent Tournament) - spellInfo->EffectDieSides[0] = 0; // was 1, that should probably mean seat 0, but instead it's treated as spell 1 - spellInfo->EffectBasePoints[0] = 52391; // Ride Vehicle (forces seat 0) + case 64949: // Idol of the Flourishing Life + spellInfo->EffectSpellClassMask[EFFECT_0] = flag96(0x00000000, 0x02000000, 0x00000000); + spellInfo->EffectApplyAuraName[EFFECT_0] = SPELL_AURA_ADD_FLAT_MODIFIER; + break; + case 34231: // Libram of the Lightbringer + case 60792: // Libram of Tolerance + case 64956: // Libram of the Resolute + spellInfo->EffectSpellClassMask[EFFECT_0] = flag96(0x80000000, 0x00000000, 0x00000000); + spellInfo->EffectApplyAuraName[EFFECT_0] = SPELL_AURA_ADD_FLAT_MODIFIER; + break; + case 28851: // Libram of Light + case 28853: // Libram of Divinity + case 32403: // Blessed Book of Nagrand + spellInfo->EffectSpellClassMask[EFFECT_0] = flag96(0x40000000, 0x00000000, 0x00000000); + spellInfo->EffectApplyAuraName[EFFECT_0] = SPELL_AURA_ADD_FLAT_MODIFIER; + break; + case 45602: // Ride Carpet + spellInfo->EffectBasePoints[EFFECT_0] = 0; // force seat 0, vehicle doesn't have the required seat flags for "no seat specified (-1)" break; case 64745: // Item - Death Knight T8 Tank 4P Bonus case 64936: // Item - Warrior T8 Protection 4P Bonus @@ -3252,9 +3276,16 @@ void SpellMgr::LoadDbcDataCorrections() case 53313: // Entangling Roots (Rank 8) -- Nature's Grasp Proc spellInfo->CastingTimeIndex = 1; break; + case 59414: // Pulsing Shockwave Aura (Loken) + // this flag breaks movement, remove it + spellInfo->AttributesEx &= ~SPELL_ATTR1_CHANNELED_1; + break; case 61719: // Easter Lay Noblegarden Egg Aura - Interrupt flags copied from aura which this aura is linked with spellInfo->AuraInterruptFlags = AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_TAKE_DAMAGE; break; + case 70650: // Death Knight T10 Tank 2P Bonus + spellInfo->EffectApplyAuraName[0] = SPELL_AURA_ADD_PCT_MODIFIER; + break; // ULDUAR SPELLS // case 62374: // Pursued (Flame Leviathan) @@ -3293,10 +3324,18 @@ void SpellMgr::LoadDbcDataCorrections() // that will be clear if we get more spells with problem like this spellInfo->AttributesEx |= SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY; break; - case 62584: // Lifebinder's Gift - case 64185: // Lifebinder's Gift - spellInfo->EffectImplicitTargetB[1] = TARGET_UNIT_NEARBY_ENTRY; - spellInfo->EffectImplicitTargetB[2] = TARGET_UNIT_NEARBY_ENTRY; + case 62301: // Cosmic Smash (Algalon the Observer) + spellInfo->MaxAffectedTargets = 1; + break; + case 64598: // Cosmic Smash (Algalon the Observer) + spellInfo->MaxAffectedTargets = 3; + break; + case 62293: // Cosmic Smash (Algalon the Observer) + spellInfo->EffectImplicitTargetB[0] = TARGET_DEST_CASTER; + break; + case 62311: // Cosmic Smash (Algalon the Observer) + case 64596: // Cosmic Smash (Algalon the Observer) + spellInfo->rangeIndex = 6; // 100yd break; // ENDOF ULDUAR SPELLS // @@ -3333,13 +3372,22 @@ void SpellMgr::LoadDbcDataCorrections() case 70835: // Bone Storm (Lord Marrowgar) case 70836: // Bone Storm (Lord Marrowgar) case 72864: // Death Plague (Rotting Frost Giant) - case 72378: // Blood Nova (Deathbringer Saurfang) - case 73058: // Blood Nova (Deathbringer Saurfang) case 71160: // Plague Stench (Stinky) case 71161: // Plague Stench (Stinky) case 71123: // Decimate (Stinky & Precious) spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd break; + case 72378: // Blood Nova (Deathbringer Saurfang) + case 73058: // Blood Nova (Deathbringer Saurfang) + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; + break; + case 72769: // Scent of Blood (Deathbringer Saurfang) + spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; + // no break + case 72771: // Scent of Blood (Deathbringer Saurfang) + spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; + break; case 72723: // Resistant Skin (Deathbringer Saurfang adds) // this spell initially granted Shadow damage immunity, however it was removed but the data was left in client spellInfo->Effect[2] = 0; @@ -3347,9 +3395,9 @@ void SpellMgr::LoadDbcDataCorrections() case 70460: // Coldflame Jets (Traps after Saurfang) spellInfo->DurationIndex = 1; // 10 seconds break; - case 71413: // Green Ooze Summon (Professor Putricide) - case 71414: // Orange Ooze Summon (Professor Putricide) - spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST; + case 71412: // Green Ooze Summon (Professor Putricide) + case 71415: // Orange Ooze Summon (Professor Putricide) + spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_TARGET_ANY; break; case 71159: // Awaken Plagued Zombies spellInfo->DurationIndex = 21; @@ -3407,7 +3455,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd break; case 70598: // Sindragosa's Fury - spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_CASTER; + spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST; break; case 69846: // Frost Bomb spellInfo->speed = 0.0f; // This spell's summon happens instantly @@ -3517,11 +3565,6 @@ void SpellMgr::LoadDbcDataCorrections() switch (spellInfo->SpellFamilyName) { - case SPELLFAMILY_DRUID: - // Starfall Target Selection - if (spellInfo->SpellFamilyFlags[2] & 0x100) - spellInfo->MaxAffectedTargets = 2; - break; case SPELLFAMILY_PALADIN: // Seals of the Pure should affect Seal of Righteousness if (spellInfo->SpellIconID == 25 && spellInfo->Attributes & SPELL_ATTR0_PASSIVE) @@ -3540,6 +3583,5 @@ void SpellMgr::LoadDbcDataCorrections() properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893 properties->Type = SUMMON_TYPE_TOTEM; - sLog->outString(">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); } |