mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Script): 'Battle at Valhalas' quests done automatically (#7036)
* fix(Core/Script): 'Battle at Valhalas' quests done automatically Battle at Valhalas series of quests, get to automatically complete Closes #6753 * Refactoring * Refactoring * Refactoring PlayerUpdates.cpp Co-authored-by: IntelligentQuantum <IntelligentQuantum@ProtonMail.Com> * Refactoring PlayerQuest.cpp Co-authored-by: IntelligentQuantum <IntelligentQuantum@ProtonMail.Com> * Update src/server/scripts/Northrend/zone_icecrown.cpp Co-authored-by: IntelligentQuantum <IntelligentQuantum@ProtonMail.Com>
This commit is contained in:
@@ -1813,8 +1813,7 @@ void Player::UpdateForQuestWorldObjects()
|
||||
|
||||
UpdateData udata;
|
||||
WorldPacket packet;
|
||||
for (GuidUnorderedSet::iterator itr = m_clientGUIDs.begin();
|
||||
itr != m_clientGUIDs.end(); ++itr)
|
||||
for (GuidUnorderedSet::iterator itr = m_clientGUIDs.begin(); itr != m_clientGUIDs.end(); ++itr)
|
||||
{
|
||||
if ((*itr).IsGameObject())
|
||||
{
|
||||
@@ -1823,8 +1822,7 @@ void Player::UpdateForQuestWorldObjects()
|
||||
}
|
||||
else if ((*itr).IsCreatureOrVehicle())
|
||||
{
|
||||
Creature* obj =
|
||||
ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr);
|
||||
Creature* obj = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr);
|
||||
if (!obj)
|
||||
continue;
|
||||
|
||||
@@ -1832,23 +1830,15 @@ void Player::UpdateForQuestWorldObjects()
|
||||
if (!obj->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK))
|
||||
continue;
|
||||
|
||||
SpellClickInfoMapBounds clickPair =
|
||||
sObjectMgr->GetSpellClickInfoMapBounds(obj->GetEntry());
|
||||
for (SpellClickInfoContainer::const_iterator _itr = clickPair.first;
|
||||
_itr != clickPair.second; ++_itr)
|
||||
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(obj->GetEntry());
|
||||
for (SpellClickInfoContainer::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
|
||||
{
|
||||
//! This code doesn't look right, but it was logically converted
|
||||
//! to condition system to do the exact same thing it did
|
||||
//! before. It definitely needs to be overlooked for intended
|
||||
//! functionality.
|
||||
ConditionList conds =
|
||||
sConditionMgr->GetConditionsForSpellClickEvent(
|
||||
obj->GetEntry(), _itr->second.spellId);
|
||||
//! This code doesn't look right, but it was logically converted to condition system to do the exact
|
||||
//! same thing it did before. It definitely needs to be overlooked for intended functionality.
|
||||
ConditionList conds = sConditionMgr->GetConditionsForSpellClickEvent(obj->GetEntry(), _itr->second.spellId);
|
||||
bool buildUpdateBlock = false;
|
||||
for (ConditionList::const_iterator jtr = conds.begin();
|
||||
jtr != conds.end() && !buildUpdateBlock; ++jtr)
|
||||
if ((*jtr)->ConditionType == CONDITION_QUESTREWARDED ||
|
||||
(*jtr)->ConditionType == CONDITION_QUESTTAKEN)
|
||||
for (ConditionList::const_iterator jtr = conds.begin(); jtr != conds.end() && !buildUpdateBlock; ++jtr)
|
||||
if ((*jtr)->ConditionType == CONDITION_QUESTREWARDED || (*jtr)->ConditionType == CONDITION_QUESTTAKEN)
|
||||
buildUpdateBlock = true;
|
||||
|
||||
if (buildUpdateBlock)
|
||||
|
||||
Reference in New Issue
Block a user