Added new quest template fields, updated some enums and opcodes

This commit is contained in:
tomrus88 2008-11-03 14:03:09 +03:00
parent 8d54103456
commit 81693c4c15
8 changed files with 109 additions and 107 deletions

View file

@ -0,0 +1,3 @@
alter table `quest_template`
add column `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`,
add column `BonusTalents` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `PlayersSlain`;

View file

@ -466,7 +466,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0) data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(pQuest->GetRewSpellCast()); // casted spell data << uint32(pQuest->GetRewSpellCast()); // casted spell
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles) data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
data << uint32(0); // new wotlk data << uint32(pQuest->GetBonusTalents()); // bonus talents
data << uint32(QUEST_EMOTE_COUNT); data << uint32(QUEST_EMOTE_COUNT);
for (uint32 i=0; i < QUEST_EMOTE_COUNT; i++) for (uint32 i=0; i < QUEST_EMOTE_COUNT; i++)
@ -543,8 +543,8 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << uint32(pQuest->GetSrcItemId()); data << uint32(pQuest->GetSrcItemId());
data << uint32(pQuest->GetFlags() & 0xFFFF); data << uint32(pQuest->GetFlags() & 0xFFFF);
data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles) data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
data << uint32(0); // added in WotLK, dunno if it's correct offset (build 8391) data << uint32(pQuest->GetPlayersSlain()); // players slain
data << uint32(0); // added in WotLK, dunno if it's correct offset (build 8471) data << uint32(pQuest->GetBonusTalents()); // bonus talents
int iI; int iI;
@ -683,7 +683,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0) data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast==0)
data << uint32(pQuest->GetRewSpellCast()); // casted spell data << uint32(pQuest->GetRewSpellCast()); // casted spell
data << uint32(0); // Honor points reward, not implemented data << uint32(0); // Honor points reward, not implemented
data << uint32(0); // new wotlk data << uint32(pQuest->GetBonusTalents()); // new wotlk
pSession->SendPacket( &data ); pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() ); sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
} }

View file

@ -2835,31 +2835,31 @@ void ObjectMgr::LoadQuests()
QueryResult *result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue," QueryResult *result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
// 9 10 11 12 13 14 15 16 // 9 10 11 12 13 14 15 16
"RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime," "RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime,"
// 17 18 19 20 21 22 23 24 25 26 // 17 18 19 20 21 22 23 24 25 26 27 28
"QuestFlags, SpecialFlags, CharTitleId, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell," "QuestFlags, SpecialFlags, CharTitleId, PlayersSlain, BonusTalents, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell,"
// 27 28 29 30 31 32 33 34 35 36 // 29 30 31 32 33 34 35 36 37 38
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4," "Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
// 37 38 39 40 41 42 43 44 // 39 40 41 42 43 44 45 46
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4," "ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4,"
// 45 46 47 48 49 50 51 52 53 54 54 55 // 47 48 49 50 51 52 53 54 55 56 57 58
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4, ReqSourceRef1, ReqSourceRef2, ReqSourceRef3, ReqSourceRef4," "ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4, ReqSourceRef1, ReqSourceRef2, ReqSourceRef3, ReqSourceRef4,"
// 57 58 59 60 61 62 63 64 // 59 60 61 62 63 64 65 66
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4," "ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
// 65 66 67 68 // 67 68 69 70
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4," "ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
// 69 70 71 72 73 74 // 71 72 73 74 75 76
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6," "RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
// 75 76 77 78 79 80 // 77 78 79 80 81 82
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6," "RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
// 81 82 83 84 85 86 87 88 // 83 84 85 86 87 88 89 90
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4," "RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
// 89 90 91 92 93 94 95 96 97 98 // 91 92 93 94 95 96 97 98 99 100
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5," "RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
// 99 100 101 102 103 104 105 106 107 108 109 // 101 102 103 104 105 106 107 108 109 110 111
"RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt," "RewHonorableKills, RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
// 110 111 112 113 114 115 116 117 118 119 // 112 113 114 115 116 117 118 119 120 121
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4,IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4," "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4,IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
// 120 121 // 122 123
"StartScript, CompleteScript" "StartScript, CompleteScript"
" FROM quest_template"); " FROM quest_template");
if(result == NULL) if(result == NULL)

View file

@ -1121,7 +1121,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x444*/ { "SMSG_CALENDAR_EVENT_UPDATED_ALERT",STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x444*/ { "SMSG_CALENDAR_EVENT_UPDATED_ALERT",STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x445*/ { "SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT",STATUS_NEVER,&WorldSession::Handle_ServerSide }, /*0x445*/ { "SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT",STATUS_NEVER,&WorldSession::Handle_ServerSide },
/*0x446*/ { "CMSG_CALENDAR_COMPLAIN", STATUS_LOGGEDIN, &WorldSession::HandleCalendarComplain }, /*0x446*/ { "CMSG_CALENDAR_COMPLAIN", STATUS_LOGGEDIN, &WorldSession::HandleCalendarComplain },
/*0x447*/ { "SMSG_CALENDAR_EVENT_RESERVED_2", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x447*/ { "CMSG_CALENDAR_GET_CALENDAR_ON_LOGIN",STATUS_LOGGEDIN,&WorldSession::HandleCalendarGetCalendar },
/*0x448*/ { "SMSG_CALENDAR_EVENT_RESERVED_3", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x448*/ { "SMSG_CALENDAR_EVENT_RESERVED_3", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x449*/ { "CMSG_SAVE_DANCE", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x449*/ { "CMSG_SAVE_DANCE", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x44A*/ { "SMSG_NOTIFY_DANCE", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x44A*/ { "SMSG_NOTIFY_DANCE", STATUS_NEVER, &WorldSession::Handle_ServerSide },

View file

@ -1123,7 +1123,7 @@ enum Opcodes
SMSG_CALENDAR_EVENT_UPDATED_ALERT = 0x444, SMSG_CALENDAR_EVENT_UPDATED_ALERT = 0x444,
SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT = 0x445, SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT = 0x445,
CMSG_CALENDAR_COMPLAIN = 0x446, CMSG_CALENDAR_COMPLAIN = 0x446,
SMSG_CALENDAR_EVENT_RESERVED_2 = 0x447, // CMSG_CALENDAR_GET_CALENDAR in 9155 CMSG_CALENDAR_GET_CALENDAR_ON_LOGIN = 0x447,
SMSG_CALENDAR_EVENT_RESERVED_3 = 0x448, SMSG_CALENDAR_EVENT_RESERVED_3 = 0x448,
CMSG_SAVE_DANCE = 0x449, CMSG_SAVE_DANCE = 0x449,
SMSG_NOTIFY_DANCE = 0x44A, SMSG_NOTIFY_DANCE = 0x44A,

View file

@ -13392,7 +13392,7 @@ void Player::SendQuestComplete( uint32 quest_id )
if( quest_id ) if( quest_id )
{ {
WorldPacket data( SMSG_QUESTUPDATE_COMPLETE, 4 ); WorldPacket data( SMSG_QUESTUPDATE_COMPLETE, 4 );
data << quest_id; data << uint32(quest_id);
GetSession()->SendPacket( &data ); GetSession()->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id ); sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id );
} }
@ -13400,16 +13400,14 @@ void Player::SendQuestComplete( uint32 quest_id )
void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGiver ) void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGiver )
{ {
// TODO: something really wrong here (there is only 5 x uint32 in client)
uint32 questid = pQuest->GetQuestId(); uint32 questid = pQuest->GetQuestId();
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid ); sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid );
WorldPacket data( SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4+4+pQuest->GetRewItemsCount()*8) ); WorldPacket data( SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4) );
data << questid; data << uint32(questid);
data << uint32(0x03);
if ( getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ) if ( getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) )
{ {
data << XP; data << uint32(XP);
data << uint32(pQuest->GetRewOrReqMoney()); data << uint32(pQuest->GetRewOrReqMoney());
} }
else else
@ -13417,17 +13415,9 @@ void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGive
data << uint32(0); data << uint32(0);
data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY))); data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY)));
} }
data << uint32(0); // new 2.3.0, HonorPoints, HONORAWARD
data << uint32(0); // added in WotLK, LEVEL_UP_CHAR_POINTS
data << uint32( pQuest->GetRewItemsCount() ); // max is 5
for (uint32 i = 0; i < pQuest->GetRewItemsCount(); ++i) data << uint32(10*MaNGOS::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
{ data << uint32(pQuest->GetBonusTalents()); // bonus talents
if ( pQuest->RewItemId[i] > 0 )
data << pQuest->RewItemId[i] << pQuest->RewItemCount[i];
else
data << uint32(0) << uint32(0);
}
GetSession()->SendPacket( &data ); GetSession()->SendPacket( &data );
if (pQuest->GetQuestCompleteScript() != 0) if (pQuest->GetQuestCompleteScript() != 0)
@ -13440,7 +13430,7 @@ void Player::SendQuestFailed( uint32 quest_id )
{ {
WorldPacket data( SMSG_QUESTGIVER_QUEST_FAILED, 4+4 ); WorldPacket data( SMSG_QUESTGIVER_QUEST_FAILED, 4+4 );
data << quest_id; data << quest_id;
data << uint32(0); // added in WotLK? data << uint32(0); // failed reason (4 for inventory is full)
GetSession()->SendPacket( &data ); GetSession()->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED"); sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
} }
@ -13479,10 +13469,10 @@ void Player::SendPushToPartyResponse( Player *pPlayer, uint32 msg )
void Player::SendQuestUpdateAddItem( Quest const* pQuest, uint32 item_idx, uint32 count ) void Player::SendQuestUpdateAddItem( Quest const* pQuest, uint32 item_idx, uint32 count )
{ {
WorldPacket data( SMSG_QUESTUPDATE_ADD_ITEM, (4+4) ); WorldPacket data( SMSG_QUESTUPDATE_ADD_ITEM, 0 );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM" ); sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM" );
data << pQuest->ReqItemId[item_idx]; //data << pQuest->ReqItemId[item_idx];
data << count; //data << count;
GetSession()->SendPacket( &data ); GetSession()->SendPacket( &data );
} }

View file

@ -42,88 +42,90 @@ Quest::Quest(Field * questRecord)
QuestFlags = questRecord[17].GetUInt16(); QuestFlags = questRecord[17].GetUInt16();
uint32 SpecialFlags = questRecord[18].GetUInt16(); uint32 SpecialFlags = questRecord[18].GetUInt16();
CharTitleId = questRecord[19].GetUInt32(); CharTitleId = questRecord[19].GetUInt32();
PrevQuestId = questRecord[20].GetInt32(); PlayersSlain = questRecord[20].GetUInt32();
NextQuestId = questRecord[21].GetInt32(); BonusTalents = questRecord[21].GetUInt32();
ExclusiveGroup = questRecord[22].GetInt32(); PrevQuestId = questRecord[22].GetInt32();
NextQuestInChain = questRecord[23].GetUInt32(); NextQuestId = questRecord[23].GetInt32();
SrcItemId = questRecord[24].GetUInt32(); ExclusiveGroup = questRecord[24].GetInt32();
SrcItemCount = questRecord[25].GetUInt32(); NextQuestInChain = questRecord[25].GetUInt32();
SrcSpell = questRecord[26].GetUInt32(); SrcItemId = questRecord[26].GetUInt32();
Title = questRecord[27].GetCppString(); SrcItemCount = questRecord[27].GetUInt32();
Details = questRecord[28].GetCppString(); SrcSpell = questRecord[28].GetUInt32();
Objectives = questRecord[29].GetCppString(); Title = questRecord[29].GetCppString();
OfferRewardText = questRecord[30].GetCppString(); Details = questRecord[30].GetCppString();
RequestItemsText = questRecord[31].GetCppString(); Objectives = questRecord[31].GetCppString();
EndText = questRecord[32].GetCppString(); OfferRewardText = questRecord[32].GetCppString();
RequestItemsText = questRecord[33].GetCppString();
EndText = questRecord[34].GetCppString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ObjectiveText[i] = questRecord[33+i].GetCppString(); ObjectiveText[i] = questRecord[35+i].GetCppString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqItemId[i] = questRecord[37+i].GetUInt32(); ReqItemId[i] = questRecord[39+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqItemCount[i] = questRecord[41+i].GetUInt32(); ReqItemCount[i] = questRecord[42+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceId[i] = questRecord[45+i].GetUInt32(); ReqSourceId[i] = questRecord[47+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceCount[i] = questRecord[49+i].GetUInt32(); ReqSourceCount[i] = questRecord[51+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceRef[i] = questRecord[53+i].GetUInt32(); ReqSourceRef[i] = questRecord[55+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOId[i] = questRecord[57+i].GetInt32(); ReqCreatureOrGOId[i] = questRecord[59+i].GetInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOCount[i] = questRecord[61+i].GetUInt32(); ReqCreatureOrGOCount[i] = questRecord[63+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqSpell[i] = questRecord[65+i].GetUInt32(); ReqSpell[i] = questRecord[67+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemId[i] = questRecord[69+i].GetUInt32(); RewChoiceItemId[i] = questRecord[71+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i) for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemCount[i] = questRecord[75+i].GetUInt32(); RewChoiceItemCount[i] = questRecord[77+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemId[i] = questRecord[81+i].GetUInt32(); RewItemId[i] = questRecord[83+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i) for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemCount[i] = questRecord[85+i].GetUInt32(); RewItemCount[i] = questRecord[87+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepFaction[i] = questRecord[89+i].GetUInt32(); RewRepFaction[i] = questRecord[91+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i) for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepValue[i] = questRecord[94+i].GetInt32(); RewRepValue[i] = questRecord[96+i].GetInt32();
RewHonorableKills = questRecord[99].GetUInt32(); RewHonorableKills = questRecord[101].GetUInt32();
RewOrReqMoney = questRecord[100].GetInt32(); RewOrReqMoney = questRecord[102].GetInt32();
RewMoneyMaxLevel = questRecord[101].GetUInt32(); RewMoneyMaxLevel = questRecord[103].GetUInt32();
RewSpell = questRecord[102].GetUInt32(); RewSpell = questRecord[104].GetUInt32();
RewSpellCast = questRecord[103].GetUInt32(); RewSpellCast = questRecord[105].GetUInt32();
RewMailTemplateId = questRecord[104].GetUInt32(); RewMailTemplateId = questRecord[106].GetUInt32();
RewMailDelaySecs = questRecord[105].GetUInt32(); RewMailDelaySecs = questRecord[107].GetUInt32();
PointMapId = questRecord[106].GetUInt32(); PointMapId = questRecord[108].GetUInt32();
PointX = questRecord[107].GetFloat(); PointX = questRecord[109].GetFloat();
PointY = questRecord[108].GetFloat(); PointY = questRecord[110].GetFloat();
PointOpt = questRecord[109].GetUInt32(); PointOpt = questRecord[111].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
DetailsEmote[i] = questRecord[110+i].GetUInt32(); DetailsEmote[i] = questRecord[112+i].GetUInt32();
IncompleteEmote = questRecord[114].GetUInt32(); IncompleteEmote = questRecord[116].GetUInt32();
CompleteEmote = questRecord[115].GetUInt32(); CompleteEmote = questRecord[117].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmote[i] = questRecord[116+i].GetInt32(); OfferRewardEmote[i] = questRecord[118+i].GetInt32();
QuestStartScript = questRecord[120].GetUInt32(); QuestStartScript = questRecord[122].GetUInt32();
QuestCompleteScript = questRecord[121].GetUInt32(); QuestCompleteScript = questRecord[123].GetUInt32();
QuestFlags |= SpecialFlags << 16; QuestFlags |= SpecialFlags << 16;

View file

@ -42,17 +42,18 @@ class ObjectMgr;
enum QuestFailedReasons enum QuestFailedReasons
{ {
INVALIDREASON_DONT_HAVE_REQ = 0, INVALIDREASON_DONT_HAVE_REQ = 0,
INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, //You are not high enough level for that quest. INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, // You are not high enough level for that quest.
INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, //That quest is not available to your race. INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, // That quest is not available to your race.
INVALIDREASON_QUEST_ALREADY_DONE = 7, //You have completed that quest. INVALIDREASON_QUEST_ALREADY_DONE = 7, // You have completed that quest.
INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, //You can only be on one timed quest at a time. INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, // You can only be on one timed quest at a time.
INVALIDREASON_QUEST_ALREADY_ON = 13, //You are already on that quest INVALIDREASON_QUEST_ALREADY_ON = 13, // You are already on that quest.
INVALIDREASON_QUEST_FAILED_EXPANSION = 16, //This quest requires an expansion enabled account. INVALIDREASON_QUEST_FAILED_EXPANSION = 16, // This quest requires an expansion enabled account.
INVALIDREASON_QUEST_ALREADY_ON2 = 18, //You are already on that quest INVALIDREASON_QUEST_ALREADY_ON2 = 18, // You are already on that quest.
INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, //You don't have the required items with you. Check storage. INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, // You don't have the required items with you. Check storage.
INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, //You don't have enough money for that quest. INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, // You don't have enough money for that quest.
INVALIDREASON_DAILY_QUESTS_REMAINING = 26, //You have already completed 10 daily quests today INVALIDREASON_DAILY_QUESTS_REMAINING = 26, // You have already completed 25 daily quests today.
INVALIDREASON_QUEST_FAILED_CAIS = 27, //You cannot complete quests once you have reached tired time INVALIDREASON_QUEST_FAILED_CAIS = 27, // You cannot complete quests once you have reached tired time.
INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY = 29 // You have completed that daily quest today.
}; };
enum QuestShareMessages enum QuestShareMessages
@ -60,12 +61,14 @@ enum QuestShareMessages
QUEST_PARTY_MSG_SHARING_QUEST = 0, QUEST_PARTY_MSG_SHARING_QUEST = 0,
QUEST_PARTY_MSG_CANT_TAKE_QUEST = 1, QUEST_PARTY_MSG_CANT_TAKE_QUEST = 1,
QUEST_PARTY_MSG_ACCEPT_QUEST = 2, QUEST_PARTY_MSG_ACCEPT_QUEST = 2,
QUEST_PARTY_MSG_REFUSE_QUEST = 3, QUEST_PARTY_MSG_DECLINE_QUEST = 3,
QUEST_PARTY_MSG_TOO_FAR = 4, QUEST_PARTY_MSG_BUSY = 4,
QUEST_PARTY_MSG_BUSY = 5, QUEST_PARTY_MSG_LOG_FULL = 5,
QUEST_PARTY_MSG_LOG_FULL = 6, QUEST_PARTY_MSG_HAVE_QUEST = 6,
QUEST_PARTY_MSG_HAVE_QUEST = 7, QUEST_PARTY_MSG_FINISH_QUEST = 7,
QUEST_PARTY_MSG_FINISH_QUEST = 8, QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY = 8,
QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED = 9,
QUEST_PARTY_MSG_NOT_IN_PARTY = 10
}; };
enum __QuestTradeSkill enum __QuestTradeSkill
@ -188,6 +191,8 @@ class Quest
int32 GetExclusiveGroup() const { return ExclusiveGroup; } int32 GetExclusiveGroup() const { return ExclusiveGroup; }
uint32 GetNextQuestInChain() const { return NextQuestInChain; } uint32 GetNextQuestInChain() const { return NextQuestInChain; }
uint32 GetCharTitleId() const { return CharTitleId; } uint32 GetCharTitleId() const { return CharTitleId; }
uint32 GetPlayersSlain() const { return PlayersSlain; }
uint32 GetBonusTalents() const { return BonusTalents; }
uint32 GetSrcItemId() const { return SrcItemId; } uint32 GetSrcItemId() const { return SrcItemId; }
uint32 GetSrcItemCount() const { return SrcItemCount; } uint32 GetSrcItemCount() const { return SrcItemCount; }
uint32 GetSrcSpell() const { return SrcSpell; } uint32 GetSrcSpell() const { return SrcSpell; }
@ -275,6 +280,8 @@ class Quest
uint32 LimitTime; uint32 LimitTime;
uint32 QuestFlags; uint32 QuestFlags;
uint32 CharTitleId; uint32 CharTitleId;
uint32 PlayersSlain;
uint32 BonusTalents;
int32 PrevQuestId; int32 PrevQuestId;
int32 NextQuestId; int32 NextQuestId;
int32 ExclusiveGroup; int32 ExclusiveGroup;