diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 12 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 60 | ||||
-rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 21 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_quest.cpp | 7 |
4 files changed, 17 insertions, 83 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 10dfe946a86..2c0d22bee29 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16267,10 +16267,6 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid /*= 0*/) if (qInfo->RequiredNpcOrGo[j] <= 0) continue; - // skip Cast at creature objective - if (qInfo->RequiredSpellCast[j] != 0) - continue; - uint32 reqkill = qInfo->RequiredNpcOrGo[j]; if (reqkill == real_entry) @@ -16360,10 +16356,6 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - // skip kill creature objective (0) or wrong spell casts - if (qInfo->RequiredSpellCast[j] != spell_id) - continue; - uint32 reqTarget = 0; if (isCreature) @@ -16443,8 +16435,8 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - // skip spell casts and Gameobject objectives - if (qInfo->RequiredSpellCast[j] > 0 || qInfo->RequiredNpcOrGo[j] < 0) + // skip gameobject objectives + if (qInfo->RequiredNpcOrGo[j] < 0) continue; uint32 reqTarget = 0; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index b902872ed4e..7893885da6d 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -3725,16 +3725,12 @@ void ObjectMgr::LoadQuests() "RequiredNpcOrGo1, RequiredNpcOrGo2, RequiredNpcOrGo3, RequiredNpcOrGo4, RequiredNpcOrGoCount1, RequiredNpcOrGoCount2, RequiredNpcOrGoCount3, RequiredNpcOrGoCount4, " // 97 98 99 100 101 102 103 104 "RequiredSourceItemId1, RequiredSourceItemId2, RequiredSourceItemId3, RequiredSourceItemId4, RequiredSourceItemCount1, RequiredSourceItemCount2, RequiredSourceItemCount3, RequiredSourceItemCount4, " - // 105 106 107 108 109 110 111 112 113 114 115 116 + // 105 106 107 108 109 110 111 112 113 114 115 116 "RequiredItemId1, RequiredItemId2, RequiredItemId3, RequiredItemId4, RequiredItemId5, RequiredItemId6, RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredItemCount6, " - // 117 118 119 120 121 122 123 124 125 - "RequiredSpellCast1, RequiredSpellCast2, RequiredSpellCast3, RequiredSpellCast4, Unknown0, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4, " - // 126 127 128 129 130 131 132 133 134 135 - "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4, EmoteOnIncomplete, EmoteOnComplete, " - // 136 137 138 139 140 141 142 143 - "OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4, OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4, " - // 144 - "WDBVerified" + // 117 118 119 120 121 122 123 124 125 126 127 128 129 + "Unknown0, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4, DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4, " + // 130 131 132 133 134 135 136 137 138 139 140 + ", EmoteOnIncomplete, EmoteOnComplete, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4, OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4, WDBVerified" " FROM quest_template"); if (!result) { @@ -4065,52 +4061,6 @@ void ObjectMgr::LoadQuests() for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - uint32 id = qinfo->RequiredSpellCast[j]; - if (id) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); - if (!spellInfo) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u but spell %u does not exist, quest can't be done.", - qinfo->GetQuestId(), j+1, id, id); - continue; - } - - if (!qinfo->RequiredNpcOrGo[j]) - { - bool found = false; - for (uint8 k = 0; k < MAX_SPELL_EFFECTS; ++k) - { - if ((spellInfo->Effects[k].Effect == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->Effects[k].MiscValue) == qinfo->Id) || - spellInfo->Effects[k].Effect == SPELL_EFFECT_SEND_EVENT) - { - found = true; - break; - } - } - - if (found) - { - if (!qinfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and RequiredNpcOrGo%d = 0, but quest not have flag QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT. Quest flags or RequiredNpcOrGo%d must be fixed, quest modified to enable objective.", spellInfo->Id, qinfo->Id, j+1, j+1); - - // this will prevent quest completing without objective - const_cast<Quest*>(qinfo)->SetFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT); - } - } - else - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u and RequiredNpcOrGo%d = 0 but spell %u does not have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT effect for this quest, quest can't be done.", - qinfo->GetQuestId(), j+1, id, j+1, id); - // no changes, quest can't be done for this requirement - } - } - } - } - - for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) - { int32 id = qinfo->RequiredNpcOrGo[j]; if (id < 0 && !sObjectMgr->GetGameObjectTemplate(-id)) { diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 3fefa812489..7345dcafe92 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -117,30 +117,27 @@ Quest::Quest(Field* questRecord) for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) RequiredItemCount[i] = questRecord[111+i].GetUInt16(); - for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - RequiredSpellCast[i] = questRecord[117+i].GetUInt32(); - - // int8 Unknown0 = questRecord[121].GetUInt8(); + // int8 Unknown0 = questRecord[117].GetUInt8(); for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ObjectiveText[i] = questRecord[122+i].GetString(); + ObjectiveText[i] = questRecord[118+i].GetString(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmote[i] = questRecord[126+i].GetUInt16(); + DetailsEmote[i] = questRecord[122+i].GetUInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmoteDelay[i] = questRecord[130+i].GetUInt32(); + DetailsEmoteDelay[i] = questRecord[126+i].GetUInt32(); - EmoteOnIncomplete = questRecord[134].GetUInt16(); - EmoteOnComplete = questRecord[135].GetUInt16(); + EmoteOnIncomplete = questRecord[130].GetUInt16(); + EmoteOnComplete = questRecord[131].GetUInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmote[i] = questRecord[136+i].GetInt16(); + OfferRewardEmote[i] = questRecord[132+i].GetInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmoteDelay[i] = questRecord[140+i].GetInt32(); + OfferRewardEmoteDelay[i] = questRecord[136+i].GetInt32(); - //int32 WDBVerified = questRecord[144].GetInt32(); + //int32 WDBVerified = questRecord[140].GetInt32(); Flags |= SpecialFlags << 20; if (Flags & QUEST_TRINITY_FLAGS_AUTO_ACCEPT) diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 6b7d10ff7b1..12912f68bd5 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -207,12 +207,7 @@ public: int32 creature = quest->RequiredNpcOrGo[i]; uint32 creaturecount = quest->RequiredNpcOrGoCount[i]; - if (uint32 spell_id = quest->RequiredSpellCast[i]) - { - for (uint16 z = 0; z < creaturecount; ++z) - player->CastedCreatureOrGO(creature, 0, spell_id); - } - else if (creature > 0) + if (creature > 0) { if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature)) for (uint16 z = 0; z < creaturecount; ++z) |