mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8720] Added missing ReqItem 5 and 6 to database.
(backported from commit 7a722b8)
This commit is contained in:
parent
e79aa4dee2
commit
3cc7f36006
12 changed files with 106 additions and 92 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
|||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`cache_id` int(10) default '0',
|
||||
`required_8693_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
`required_8720_01_mangos_quest_template` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -13677,10 +13677,14 @@ CREATE TABLE `quest_template` (
|
|||
`RewItemId2` mediumint(8) unsigned NOT NULL default '0',
|
||||
`RewItemId3` mediumint(8) unsigned NOT NULL default '0',
|
||||
`RewItemId4` mediumint(8) unsigned NOT NULL default '0',
|
||||
`ReqItemId5` mediumint(8) unsigned NOT NULL default '0',
|
||||
`ReqItemId6` mediumint(8) unsigned NOT NULL default '0',
|
||||
`RewItemCount1` smallint(5) unsigned NOT NULL default '0',
|
||||
`RewItemCount2` smallint(5) unsigned NOT NULL default '0',
|
||||
`RewItemCount3` smallint(5) unsigned NOT NULL default '0',
|
||||
`RewItemCount4` smallint(5) unsigned NOT NULL default '0',
|
||||
`ReqItemCount5` smallint(5) unsigned NOT NULL default '0',
|
||||
`ReqItemCount6` smallint(5) unsigned NOT NULL default '0',
|
||||
`RewRepFaction1` smallint(5) unsigned NOT NULL default '0' COMMENT 'faction id from Faction.dbc in this case',
|
||||
`RewRepFaction2` smallint(5) unsigned NOT NULL default '0' COMMENT 'faction id from Faction.dbc in this case',
|
||||
`RewRepFaction3` smallint(5) unsigned NOT NULL default '0' COMMENT 'faction id from Faction.dbc in this case',
|
||||
|
|
|
|||
7
sql/updates/8720_01_mangos_quest_template.sql
Normal file
7
sql/updates/8720_01_mangos_quest_template.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_8693_01_mangos_spell_proc_event required_8720_01_mangos_quest_template bit;
|
||||
|
||||
alter table `quest_template`
|
||||
add column `ReqItemId5` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemId4`,
|
||||
add column `ReqItemId6` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemId5`,
|
||||
add column `ReqItemCount5` smallint(5) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemCount4`,
|
||||
add column `ReqItemCount6` smallint(5) UNSIGNED DEFAULT '0' NOT NULL after `ReqItemCount5`;
|
||||
|
|
@ -139,6 +139,7 @@ pkgdata_DATA = \
|
|||
8688_01_mangos_creature_template.sql \
|
||||
8693_01_mangos_spell_proc_event.sql \
|
||||
8702_01_characters_character_reputation.sql \
|
||||
8720_01_mangos_quest_template.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -258,4 +259,5 @@ EXTRA_DIST = \
|
|||
8688_01_mangos_creature_template.sql \
|
||||
8693_01_mangos_spell_proc_event.sql \
|
||||
8702_01_characters_character_reputation.sql \
|
||||
8720_01_mangos_quest_template.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -626,17 +626,12 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
|||
data << uint32(pQuest->ReqSourceId[iI]);
|
||||
}
|
||||
|
||||
for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI)
|
||||
for (iI = 0; iI < QUEST_ITEM_OBJECTIVES_COUNT; ++iI)
|
||||
{
|
||||
data << uint32(pQuest->ReqItemId[iI]);
|
||||
data << uint32(pQuest->ReqItemCount[iI]);
|
||||
}
|
||||
|
||||
data << uint32(0); // TODO: 5 item objective
|
||||
data << uint32(0);
|
||||
data << uint32(0); // TODO: 6 item objective
|
||||
data << uint32(0);
|
||||
|
||||
for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI)
|
||||
data << ObjectiveText[iI];
|
||||
|
||||
|
|
@ -782,9 +777,10 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
|
|||
|
||||
data << uint32( pQuest->GetReqItemsCount() );
|
||||
ItemPrototype const *pItem;
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if ( !pQuest->ReqItemId[i] ) continue;
|
||||
if ( !pQuest->ReqItemId[i] )
|
||||
continue;
|
||||
pItem = objmgr.GetItemPrototype(pQuest->ReqItemId[i]);
|
||||
data << uint32(pQuest->ReqItemId[i]);
|
||||
data << uint32(pQuest->ReqItemCount[i]);
|
||||
|
|
|
|||
|
|
@ -4794,7 +4794,7 @@ bool ChatHandler::HandleQuestComplete(const char* args)
|
|||
}
|
||||
|
||||
// Add quest items for quests that require items
|
||||
for(uint8 x = 0; x < QUEST_OBJECTIVES_COUNT; ++x)
|
||||
for(uint8 x = 0; x < QUEST_ITEM_OBJECTIVES_COUNT; ++x)
|
||||
{
|
||||
uint32 id = pQuest->ReqItemId[x];
|
||||
uint32 count = pQuest->ReqItemCount[x];
|
||||
|
|
|
|||
|
|
@ -3224,31 +3224,31 @@ void ObjectMgr::LoadQuests()
|
|||
"QuestFlags, SpecialFlags, CharTitleId, PlayersSlain, BonusTalents, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell,"
|
||||
// 29 30 31 32 33 34 35 36 37 38
|
||||
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
|
||||
// 39 40 41 42 43 44 45 46
|
||||
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4,"
|
||||
// 47 48 49 50 51 52 53 54
|
||||
// 39 40 41 42 43 44 45 46 47 48 49 50
|
||||
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemId5, ReqItemId6, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4, ReqItemCount5, ReqItemCount6,"
|
||||
// 51 52 53 54 55 56 57 58
|
||||
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4,"
|
||||
// 55 56 57 58 59 60 61 62
|
||||
// 59 60 61 62 63 64 65 66
|
||||
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
|
||||
// 63 64 65 66
|
||||
// 67 68 69 70
|
||||
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
|
||||
// 67 68 69 70 71 72
|
||||
// 71 72 73 74 75 76
|
||||
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
|
||||
// 73 74 75 76 77 78
|
||||
// 77 78 79 80 81 82
|
||||
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
|
||||
// 79 80 81 82 83 84 85 86
|
||||
// 83 84 85 86 87 88 89 90
|
||||
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
|
||||
// 87 88 89 90 91 92 93 94 95 96
|
||||
// 91 92 93 94 95 96 97 98 99 100
|
||||
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
|
||||
// 97 98 99 100 101 102 103 104 105 106 107
|
||||
// 101 102 103 104 105 106 107 108 109 110 111
|
||||
"RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
|
||||
// 108 109 110 111 112 113 114 115
|
||||
// 112 113 114 115 116 117 118 119
|
||||
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4,"
|
||||
// 116 117 118 119 120 121
|
||||
// 120 121 122 123 124 125
|
||||
"IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
|
||||
// 122 123 124 125
|
||||
// 126 127 128 129
|
||||
"OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4,"
|
||||
// 126 127
|
||||
// 130 131
|
||||
"StartScript, CompleteScript"
|
||||
" FROM quest_template");
|
||||
if(result == NULL)
|
||||
|
|
@ -3502,7 +3502,7 @@ void ObjectMgr::LoadQuests()
|
|||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
|
||||
for(int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j )
|
||||
{
|
||||
uint32 id = qinfo->ReqItemId[j];
|
||||
if(id)
|
||||
|
|
|
|||
|
|
@ -12418,7 +12418,7 @@ bool Player::CanCompleteQuest( uint32 quest_id )
|
|||
|
||||
if ( qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
{
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if( qInfo->ReqItemCount[i] != 0 && q_status.m_itemcount[i] < qInfo->ReqItemCount[i] )
|
||||
return false;
|
||||
|
|
@ -12468,7 +12468,7 @@ bool Player::CanCompleteRepeatableQuest( Quest const *pQuest )
|
|||
return false;
|
||||
|
||||
if (pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER) )
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
if( pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i], pQuest->ReqItemCount[i]) )
|
||||
return false;
|
||||
|
||||
|
|
@ -12495,7 +12495,7 @@ bool Player::CanRewardQuest( Quest const *pQuest, bool msg )
|
|||
// prevent receive reward with quest items in bank
|
||||
if ( pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
{
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if( pQuest->ReqItemCount[i] != 0 &&
|
||||
GetItemCount(pQuest->ReqItemId[i]) < pQuest->ReqItemCount[i] )
|
||||
|
|
@ -12577,7 +12577,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
|||
|
||||
if ( pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
{
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
questStatusData.m_itemcount[i] = 0;
|
||||
}
|
||||
|
||||
|
|
@ -12675,7 +12675,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
|||
|
||||
uint32 quest_id = pQuest->GetQuestId();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i )
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i )
|
||||
{
|
||||
if (pQuest->ReqItemId[i])
|
||||
DestroyItemCount( pQuest->ReqItemId[i], pQuest->ReqItemCount[i], true);
|
||||
|
|
@ -13381,7 +13381,7 @@ void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& ques
|
|||
{
|
||||
if ( pQuest->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
{
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
uint32 reqitemcount = pQuest->ReqItemCount[i];
|
||||
if( reqitemcount != 0 )
|
||||
|
|
@ -13460,7 +13460,7 @@ void Player::ItemAddedQuestCheck( uint32 entry, uint32 count )
|
|||
if( !qInfo || !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
||||
{
|
||||
uint32 reqitem = qInfo->ReqItemId[j];
|
||||
if ( reqitem == entry )
|
||||
|
|
@ -13497,7 +13497,7 @@ void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
|
|||
if( !qInfo->HasFlag( QUEST_MANGOS_FLAGS_DELIVER ) )
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
||||
{
|
||||
uint32 reqitem = qInfo->ReqItemId[j];
|
||||
if ( reqitem == entry )
|
||||
|
|
@ -13799,7 +13799,7 @@ bool Player::HasQuestForItem( uint32 itemid ) const
|
|||
|
||||
// There should be no mixed ReqItem/ReqSource drop
|
||||
// This part for ReqItem drop
|
||||
for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
|
||||
for (int j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
|
||||
{
|
||||
if(itemid == qinfo->ReqItemId[j] && q_status.m_itemcount[j] < qinfo->ReqItemCount[j] )
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -61,74 +61,74 @@ Quest::Quest(Field * questRecord)
|
|||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ObjectiveText[i] = questRecord[35+i].GetCppString();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
ReqItemId[i] = questRecord[39+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqItemCount[i] = questRecord[43+i].GetUInt32();
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
ReqItemCount[i] = questRecord[45+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
ReqSourceId[i] = questRecord[47+i].GetUInt32();
|
||||
ReqSourceId[i] = questRecord[51+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
ReqSourceCount[i] = questRecord[51+i].GetUInt32();
|
||||
ReqSourceCount[i] = questRecord[55+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqCreatureOrGOId[i] = questRecord[55+i].GetInt32();
|
||||
ReqCreatureOrGOId[i] = questRecord[59+i].GetInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqCreatureOrGOCount[i] = questRecord[59+i].GetUInt32();
|
||||
ReqCreatureOrGOCount[i] = questRecord[63+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqSpell[i] = questRecord[63+i].GetUInt32();
|
||||
ReqSpell[i] = questRecord[67+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
RewChoiceItemId[i] = questRecord[67+i].GetUInt32();
|
||||
RewChoiceItemId[i] = questRecord[71+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
RewChoiceItemCount[i] = questRecord[73+i].GetUInt32();
|
||||
RewChoiceItemCount[i] = questRecord[77+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||
RewItemId[i] = questRecord[79+i].GetUInt32();
|
||||
RewItemId[i] = questRecord[83+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||
RewItemCount[i] = questRecord[83+i].GetUInt32();
|
||||
RewItemCount[i] = questRecord[87+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
RewRepFaction[i] = questRecord[87+i].GetUInt32();
|
||||
RewRepFaction[i] = questRecord[91+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
RewRepValue[i] = questRecord[92+i].GetInt32();
|
||||
RewRepValue[i] = questRecord[96+i].GetInt32();
|
||||
|
||||
RewHonorableKills = questRecord[97].GetUInt32();
|
||||
RewOrReqMoney = questRecord[98].GetInt32();
|
||||
RewMoneyMaxLevel = questRecord[99].GetUInt32();
|
||||
RewSpell = questRecord[100].GetUInt32();
|
||||
RewSpellCast = questRecord[101].GetUInt32();
|
||||
RewMailTemplateId = questRecord[102].GetUInt32();
|
||||
RewMailDelaySecs = questRecord[103].GetUInt32();
|
||||
PointMapId = questRecord[104].GetUInt32();
|
||||
PointX = questRecord[105].GetFloat();
|
||||
PointY = questRecord[106].GetFloat();
|
||||
PointOpt = questRecord[107].GetUInt32();
|
||||
RewHonorableKills = questRecord[101].GetUInt32();
|
||||
RewOrReqMoney = questRecord[102].GetInt32();
|
||||
RewMoneyMaxLevel = questRecord[103].GetUInt32();
|
||||
RewSpell = questRecord[104].GetUInt32();
|
||||
RewSpellCast = questRecord[105].GetUInt32();
|
||||
RewMailTemplateId = questRecord[106].GetUInt32();
|
||||
RewMailDelaySecs = questRecord[107].GetUInt32();
|
||||
PointMapId = questRecord[108].GetUInt32();
|
||||
PointX = questRecord[109].GetFloat();
|
||||
PointY = questRecord[110].GetFloat();
|
||||
PointOpt = questRecord[111].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
DetailsEmote[i] = questRecord[108+i].GetUInt32();
|
||||
DetailsEmote[i] = questRecord[112+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
DetailsEmoteDelay[i] = questRecord[112+i].GetUInt32();
|
||||
DetailsEmoteDelay[i] = questRecord[116+i].GetUInt32();
|
||||
|
||||
IncompleteEmote = questRecord[116].GetUInt32();
|
||||
CompleteEmote = questRecord[117].GetUInt32();
|
||||
IncompleteEmote = questRecord[120].GetUInt32();
|
||||
CompleteEmote = questRecord[121].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
OfferRewardEmote[i] = questRecord[118+i].GetInt32();
|
||||
OfferRewardEmote[i] = questRecord[122+i].GetInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
OfferRewardEmoteDelay[i] = questRecord[122+i].GetInt32();
|
||||
OfferRewardEmoteDelay[i] = questRecord[126+i].GetInt32();
|
||||
|
||||
QuestStartScript = questRecord[126].GetUInt32();
|
||||
QuestCompleteScript = questRecord[127].GetUInt32();
|
||||
QuestStartScript = questRecord[130].GetUInt32();
|
||||
QuestCompleteScript = questRecord[131].GetUInt32();
|
||||
|
||||
QuestFlags |= SpecialFlags << 16;
|
||||
|
||||
|
|
@ -137,10 +137,14 @@ Quest::Quest(Field * questRecord)
|
|||
m_rewitemscount = 0;
|
||||
m_rewchoiceitemscount = 0;
|
||||
|
||||
for (int i=0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for (int i=0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if ( ReqItemId[i] )
|
||||
++m_reqitemscount;
|
||||
}
|
||||
|
||||
for (int i=0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if ( ReqCreatureOrGOId[i] )
|
||||
++m_reqCreatureOrGOcount;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class ObjectMgr;
|
|||
#define MAX_QUEST_LOG_SIZE 25
|
||||
|
||||
#define QUEST_OBJECTIVES_COUNT 4
|
||||
#define QUEST_ITEM_OBJECTIVES_COUNT 6
|
||||
#define QUEST_SOURCE_ITEM_IDS_COUNT 4
|
||||
#define QUEST_REWARD_CHOICES_COUNT 6
|
||||
#define QUEST_REWARDS_COUNT 4
|
||||
|
|
@ -231,8 +232,8 @@ class Quest
|
|||
|
||||
// multiple values
|
||||
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
|
||||
uint32 ReqItemId[QUEST_OBJECTIVES_COUNT];
|
||||
uint32 ReqItemCount[QUEST_OBJECTIVES_COUNT];
|
||||
uint32 ReqItemId[QUEST_ITEM_OBJECTIVES_COUNT];
|
||||
uint32 ReqItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
|
||||
uint32 ReqSourceId[QUEST_SOURCE_ITEM_IDS_COUNT];
|
||||
uint32 ReqSourceCount[QUEST_SOURCE_ITEM_IDS_COUNT];
|
||||
int32 ReqCreatureOrGOId[QUEST_OBJECTIVES_COUNT]; // >0 Creature <0 Gameobject
|
||||
|
|
@ -332,7 +333,7 @@ struct QuestStatusData
|
|||
: m_status(QUEST_STATUS_NONE),m_rewarded(false),
|
||||
m_explored(false), m_timer(0), uState(QUEST_NEW)
|
||||
{
|
||||
memset(m_itemcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint32));
|
||||
memset(m_itemcount, 0, QUEST_ITEM_OBJECTIVES_COUNT * sizeof(uint32));
|
||||
memset(m_creatureOrGOcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint32));
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +343,7 @@ struct QuestStatusData
|
|||
uint32 m_timer;
|
||||
QuestUpdateState uState;
|
||||
|
||||
uint32 m_itemcount[ QUEST_OBJECTIVES_COUNT ];
|
||||
uint32 m_itemcount[ QUEST_ITEM_OBJECTIVES_COUNT ];
|
||||
uint32 m_creatureOrGOcount[ QUEST_OBJECTIVES_COUNT ];
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
|||
|
||||
// destroy not required for quest finish quest starting item
|
||||
bool destroyItem = true;
|
||||
for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
for(int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
if ((qInfo->ReqItemId[i] == ((Item*)pObject)->GetEntry()) && (((Item*)pObject)->GetProto()->MaxCount > 0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8719"
|
||||
#define REVISION_NR "8720"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef __REVISION_SQL_H__
|
||||
#define __REVISION_SQL_H__
|
||||
#define REVISION_DB_CHARACTERS "required_8702_01_characters_character_reputation"
|
||||
#define REVISION_DB_MANGOS "required_8693_01_mangos_spell_proc_event"
|
||||
#define REVISION_DB_MANGOS "required_8720_01_mangos_quest_template"
|
||||
#define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters"
|
||||
#endif // __REVISION_SQL_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue