Revert "fix(Core/Spells): Forward core changes (#8841)" (#9631)

This reverts commit 85d2c39a48.
This commit is contained in:
Skjalf
2021-12-10 11:31:48 -03:00
committed by GitHub
parent 8b200fae91
commit 2d55974c0c
14 changed files with 140 additions and 233 deletions

View File

@@ -1829,7 +1829,7 @@ void Player::UpdateTriggerVisibility()
GetSession()->SendPacket(&packet);
}
void Player::UpdateVisibleGameobjectsOrSpellClicks()
void Player::UpdateForQuestWorldObjects()
{
if (m_clientGUIDs.empty())
return;
@@ -1856,9 +1856,19 @@ void Player::UpdateVisibleGameobjectsOrSpellClicks()
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);
obj->BuildValuesUpdateBlockForPlayer(&udata, this);
break;
bool buildUpdateBlock = false;
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)
{
obj->BuildValuesUpdateBlockForPlayer(&udata, this);
break;
}
}
}
}