Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/game/Handlers/TicketHandler.cpp src/server/game/Tickets/TicketMgr.cpp src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
This commit is contained in:
commit
705873091b
12 files changed
+142
-218
No files matched your search
@@ -1061,12 +1061,9 @@ SpellAreaMapBounds SpellMgr::GetSpellAreaMapBounds(uint32 spell_id) const
|
||||
return SpellAreaMapBounds(mSpellAreaMap.lower_bound(spell_id), mSpellAreaMap.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds SpellMgr::GetSpellAreaForQuestMapBounds(uint32 quest_id, bool active) const
|
||||
SpellAreaForQuestMapBounds SpellMgr::GetSpellAreaForQuestMapBounds(uint32 quest_id) const
|
||||
{
|
||||
if (active)
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForActiveQuestMap.lower_bound(quest_id), mSpellAreaForActiveQuestMap.upper_bound(quest_id));
|
||||
else
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestMap.lower_bound(quest_id), mSpellAreaForQuestMap.upper_bound(quest_id));
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestMap.lower_bound(quest_id), mSpellAreaForQuestMap.upper_bound(quest_id));
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds SpellMgr::GetSpellAreaForQuestEndMapBounds(uint32 quest_id) const
|
||||
@@ -1099,11 +1096,11 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
|
||||
return false;
|
||||
|
||||
if (questStart) // not in expected required quest state
|
||||
if (!player || ((!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart)))
|
||||
if (!player || (((1 << player->GetQuestStatus(questStart)) & questStartStatus) == 0))
|
||||
return false;
|
||||
|
||||
if (questEnd) // not in expected forbidden quest state
|
||||
if (!player || player->GetQuestRewardStatus(questEnd))
|
||||
if (!player || (((1 << player->GetQuestStatus(questEnd)) & questEndStatus) == 0))
|
||||
return false;
|
||||
|
||||
if (auraSpell) // not have expected aura
|
||||
@@ -2433,12 +2430,11 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
mSpellAreaMap.clear(); // need for reload case
|
||||
mSpellAreaForQuestMap.clear();
|
||||
mSpellAreaForActiveQuestMap.clear();
|
||||
mSpellAreaForQuestEndMap.clear();
|
||||
mSpellAreaForAuraMap.clear();
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell, area, quest_start, quest_start_active, quest_end, aura_spell, racemask, gender, autocast FROM spell_area");
|
||||
// 0 1 2 3 4 5 6 7 8 9
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell, area, quest_start, quest_start_status, quest_end_status, quest_end, aura_spell, racemask, gender, autocast FROM spell_area");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -2457,12 +2453,13 @@ void SpellMgr::LoadSpellAreas()
|
||||
spellArea.spellId = spell;
|
||||
spellArea.areaId = fields[1].GetUInt32();
|
||||
spellArea.questStart = fields[2].GetUInt32();
|
||||
spellArea.questStartCanActive = fields[3].GetBool();
|
||||
spellArea.questEnd = fields[4].GetUInt32();
|
||||
spellArea.auraSpell = fields[5].GetInt32();
|
||||
spellArea.raceMask = fields[6].GetUInt32();
|
||||
spellArea.gender = Gender(fields[7].GetUInt8());
|
||||
spellArea.autocast = fields[8].GetBool();
|
||||
spellArea.questStartStatus = fields[3].GetUInt32();
|
||||
spellArea.questEndStatus = fields[4].GetUInt32();
|
||||
spellArea.questEnd = fields[5].GetUInt32();
|
||||
spellArea.auraSpell = fields[6].GetInt32();
|
||||
spellArea.raceMask = fields[7].GetUInt32();
|
||||
spellArea.gender = Gender(fields[8].GetUInt8());
|
||||
spellArea.autocast = fields[9].GetBool();
|
||||
|
||||
if (SpellInfo const* spellInfo = GetSpellInfo(spell))
|
||||
{
|
||||
@@ -2494,7 +2491,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
continue;
|
||||
|
||||
// duplicate by requirements
|
||||
ok =false;
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2524,12 +2521,6 @@ void SpellMgr::LoadSpellAreas()
|
||||
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->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;
|
||||
}
|
||||
}
|
||||
|
||||
if (spellArea.auraSpell)
|
||||
@@ -2605,12 +2596,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
// for search at quest start/reward
|
||||
if (spellArea.questStart)
|
||||
{
|
||||
if (spellArea.questStartCanActive)
|
||||
mSpellAreaForActiveQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart, sa));
|
||||
else
|
||||
mSpellAreaForQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart, sa));
|
||||
}
|
||||
mSpellAreaForQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart, sa));
|
||||
|
||||
// for search at quest start/reward
|
||||
if (spellArea.questEnd)
|
||||
|
||||
Reference in new issue
Block a user