diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 2afe1ccd0..eea0b4495 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7409,10 +7409,6 @@ bool PlayerCondition::Meets(Player const * player) const return data->CheckConditionCriteriaMeet(player, value1, value2); return false; } - case CONDITION_QUESTTARGET: - { - return player->HasQuestObjectiveForTarget(int32(value1), !bool(value2)); - } default: return false; } @@ -7637,31 +7633,6 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val break; } - case CONDITION_QUESTTARGET: - { - if (int32(value1) > 0) - { - if (!sObjectMgr.GetCreatureTemplate(value1)) - { - sLog.outErrorDb("Quest target condition has not existed creature entry %u as first arg, skipped", value1); - return false; - } - } - else if (int32(value1) < 0) - { - if (!sObjectMgr.GetGameObjectInfo(-int32(value1))) - { - sLog.outErrorDb("Quest target condition has not existed gameobject entry %u as first arg, skipped", -int32(value1)); - return false; - } - } - else - { - sLog.outErrorDb("Quest target condition has not existed entry 0 as first arg, skipped"); - return false; - } - break; - } case CONDITION_NONE: break; } diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index d0b584bf7..2793b7709 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -317,10 +317,9 @@ enum ConditionType CONDITION_NOITEM = 16, // item_id count CONDITION_SPELL = 17, // spell_id 0, 1 (0: has spell, 1: hasn't spell) CONDITION_INSTANCE_SCRIPT = 18, // map_id instance_condition_id (instance script specific enum) - CONDITION_QUESTTARGET = 19, // entry complete,for condition true entry (positive - creature entry, negative (-entry) - gameobject entry) is not rewarded quest objective in (completed, bool) state. }; -#define MAX_CONDITION 20 // maximum value in ConditionType enum +#define MAX_CONDITION 19 // maximum value in ConditionType enum struct PlayerCondition { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index dccd7240f..7513657d7 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19842,44 +19842,6 @@ bool Player::HasQuestForGO(int32 GOId) const return false; } -bool Player::HasQuestObjectiveForTarget(int32 creatureOrGOId, bool incomplete /*= true*/) const -{ - for( int i = 0; i < MAX_QUEST_LOG_SIZE; ++i ) - { - uint32 questid = GetQuestSlotQuestId(i); - if ( questid == 0 ) - continue; - - QuestStatusMap::const_iterator qs_itr = mQuestStatus.find(questid); - if(qs_itr == mQuestStatus.end()) - continue; - - QuestStatusData const& qs = qs_itr->second; - - // for incopmplete objective we need incomplete quests, for complete objective it can be complete/incomplete - if (qs.m_status == QUEST_STATUS_INCOMPLETE || !incomplete && qs.m_status == QUEST_STATUS_COMPLETE) - { - Quest const* qinfo = sObjectMgr.GetQuestTemplate(questid); - if (!qinfo) - continue; - - if (GetGroup() && GetGroup()->isRaidGroup() && qinfo->IsAllowedInRaid()) - continue; - - for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) - { - // creatureOrGOId have expected signs for creature/go cases, comparison signed - if (qinfo->ReqCreatureOrGOId[j] != creatureOrGOId) - continue; - - if (incomplete == (qs.m_creatureOrGOcount[j] < qinfo->ReqCreatureOrGOCount[j])) - return true; - } - } - } - return false; -} - void Player::UpdateForQuestWorldObjects() { if(m_clientGUIDs.empty()) diff --git a/src/game/Player.h b/src/game/Player.h index b7034247d..cdf20bb19 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1410,7 +1410,6 @@ class MANGOS_DLL_SPEC Player : public Unit void ReputationChanged(FactionEntry const* factionEntry ); bool HasQuestForItem( uint32 itemid ) const; bool HasQuestForGO(int32 GOId) const; - bool HasQuestObjectiveForTarget(int32 creatureOrGOId, bool incomplete = true) const; void UpdateForQuestWorldObjects(); bool CanShareQuest(uint32 quest_id) const; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4f2847d3f..4d5d0b7d1 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10013" + #define REVISION_NR "10014" #endif // __REVISION_NR_H__