ArcEmu: Core Development: Quest System - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Read:

When submitting patches - READ: http://arcemu.org/fo...?showtopic=2355 -
  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Core Development: Quest System

#1 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

  Posted 27 February 2010 - 01:43 PM

Hi all, i started some job on quest system since 3.3.0 has some changes in it.

At first i wanna thanks to KFL for a lot of his researches and changes, included into this patch.

whats done
  • Redone BuildQuestQueryResponse, now it should send all dataz loaded from DB
  • Loading of QuestXP.dbc and QuestFactionReward.dbc
  • XP calculating from QuestXP.dbc (taken from mangos), i left column RewXP in DB for custom quests :)
  • Reward reputation calculating QuestFactionReward.dbc (taken from mangos)
  • implentation of autocomplete quests
  • MONSTERSAY_EVENT_ON_QUEST_STARTED and ON_QUEST_FINISHED (table npc_monstersay)
  • dropped table item_quest_association, core is now using right columns in quests table for it
  • added support for new kind of quest message, which appear in objectives, when u complete all objectives (like Return to blabla)
  • redone quest flags. New handled are:
    • QUEST_FLAG_PARTY_ACCEPT - if quest has this flag, all party members receive SMSG_QUEST_CONFIRM_ACCEPT (if they can accept this quest too), working fine
    • QUEST_FLAG_SHARABLE - not all quests are shareable, working fine
    • QUEST_FLAG_HIDDEN_REWARDS - some quests show their rewards only when quest giver offer these rewards (it means when u complete Q and return to him) - working fine
    • QUEST_FLAG_AUTO_REWARDED - these quests doesnt appear into Q log, just offer their reward - needs testing
    • QUEST_FLAG_DAILY - working fine, you dont need to use is_repeatable = 2 in quests
    • QUEST_FLAG_WEEKLY - seems working fine, added 1 new column into char table with finished weekly quests (working same as daily, just reset is weekly not daily :) )

  • redone special flags. New handled are:
    • QUEST_CUSTOM_FLAG_REPEATABLE - same usage as is_repeatable, column is_repeatable dropped
    • QUEST_CUSTOM_FLAG_TIMED - timed quests should has this flag, also with filled LimitedTime, seems that Timed quests now work
    • QUEST_CUSTOM_FLAG_SPEAKTO - speak to quests, automaticall ad reqmob = 1 and reqmobcount = 1, because spek to quests dont have any kind of requires in retail packets

  • Timed quests now work, but testing is needed because of there could be exploits
  • Added column srcspellid, this spell will be casted on player after accepting quest
  • Added column RequiredTitleId, you cant accept this quest if u dont have this title id, usable for argent tournaments quests
  • Mail sending (also with delay) after completing any quest, see SQL codes inside
  • support for column RequiredPlayerKillCount
  • RequiredSpells tweaked, works now same as requiredmobX, if requiredmobX is setted, its taken as needed target, if requiredmobX is 0, than spell casting can be completed without target
  • Daily quests are now not stored in Mutex, stored in player fields insted (blizzlike), this allows you to see how many dailies you completed today
  • Now you can see the time, when daily quests will be reseted (blizzlike!)
  • Corrected functions, which calculate and send quest status (like repetable, available, etc.)


Also I included a lot of other changes (posted in patch submission) because its so much hard to get only quest stuff from my core.

what needs to be done:
  • TESTING !!!


Do NOT forget to apply both char and world SQL changes

Attached File(s)


Posted Image
5

#2 User is offline   Hasbro 

  • Project Manager
  • PipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 2,526
  • Joined: 07-June 08
  • Gender:Male
  • Location:New York
  • Server OS:Windows

Posted 27 February 2010 - 02:30 PM

Dfighter would be proud Mesox :)
2

#3 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 27 February 2010 - 04:51 PM

they have full data for db for questxp and questrep dbcs on udb forums :) might want to check that
http://udbforums.kic...p?topic=15368.0 and
http://udbforums.kic...p?topic=15375.0

notes from my experience:
QMGR_QUEST_REPEATABLE_FINISHED is buggy for me, doesnt display minimap icon
calculating quest status always picks the higher value - QMGR_QUEST_REPEATABLE overrides it leading to wrong mark appearing over NPC head
also about SMSG_QUEST_QUERY_RESPONSE - we should remove all variables from there :) i may be wrong but... how do all players on retail get the same values in their caches? (its exactly that packet whats cached) sending variables like rewarded money/experience (thats what we calc atm) is fine only in other quest related packets
0

#4 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 27 February 2010 - 05:26 PM

View PostHasbro, on 27 February 2010 - 02:30 PM, said:

Dfighter would be proud Mesox :)

Not gonna happen. I'm working on tearing Object::DealDamage apart and making it OO finally.
"The demand for free goods is infinite."
0

#5 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 28 February 2010 - 04:45 AM

View PostShauren, on 27 February 2010 - 04:51 PM, said:

they have full data for db for questxp and questrep dbcs on udb forums :D might want to check that
http://udbforums.kic...p?topic=15368.0 and
http://udbforums.kic...p?topic=15375.0

notes from my experience:
QMGR_QUEST_REPEATABLE_FINISHED is buggy for me, doesnt display minimap icon
calculating quest status always picks the higher value - QMGR_QUEST_REPEATABLE overrides it leading to wrong mark appearing over NPC head
also about SMSG_QUEST_QUERY_RESPONSE - we should remove all variables from there :P i may be wrong but... how do all players on retail get the same values in their caches? (its exactly that packet whats cached) sending variables like rewarded money/experience (thats what we calc atm) is fine only in other quest related packets


I allready get full quest cache with all quests on 3.3.2 on my own, but thanks for the links.

about SMSG_QUEST_QUERY_RESPONSE, which are these variables u mean? I can't find any variables, there, since in this packet only base values are sended, nothing is calculated in it.

Edit: ya thanks poiting me out about QMGR_QUEST_REPEATABLE_FINISHED, added else if instead of basic if which override it :P
Posted Image
0

#6 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 28 February 2010 - 06:49 AM

	*data << uint32( sQuestMgr.GenerateRewardMoney( _player, qst ) );	// Copper reward
	*data << uint32(qst->reward_money<0 ? -qst->reward_money : 0);		// Required Money

these are the lines in WorldSession::BuildQuestQueryResponse(Quest *qst) i mean (and the req money is wrong, this field is rewmoneyatmaxlevel)

ps. wish quest table had a column that would do the same for gameobject_quest_item_binding and gameobject_quest_pickup_binding
0

#7 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 28 February 2010 - 09:10 AM

but gameobject_quest_item_binding and gameobject_quest_pickup_binding is used a bit else than item_quest_assoc :P

anyway this is that function with GenerateRewardMoney

uint32 QuestMgr::GenerateRewardMoney( Player * plr, Quest * qst )
{
   return qst->reward_money;
}


So its not variable.

And that second thing is not variable too, but you're right it should be

	*data << uint32(qst->reward_money < 0 ? -qst->reward_money : qst->reward_money );
	*data << uint32(qst->rew_money_at_max_level);

Posted Image
0

#8 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 28 February 2010 - 11:08 AM

lol then the whole "generate" function is a waste of time
0

#9 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 01 March 2010 - 06:41 AM

*data << uint32(qst->reward_money < 0 ? -qst->reward_money : qst->reward_money );


Why don't just make

*data << uint32(qst->reward_money);


?
Sorry for my english, I'm french.
0

#10 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 01 March 2010 - 12:14 PM

Ya it was just copy/paste from orig source to show that it was bad originally and to show that Shauren has true. Anyway KFL sent me his patch with nice additions so i will readd them and continue working on it.
Posted Image
0

#11 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 01 March 2010 - 02:22 PM

+		if( qst->quest_flags & QUEST_FLAG_HIDDEN_REWARDS)
+		{
+			*data << uint32(0);
+			*data << uint32(0);
+		}
+		else
+		{
+			*data << qst->reward_item[i];				// Forced Reward Item [i]
+			*data << qst->reward_itemcount[i];			// Forced Reward Item Count [i]
+		}


imo thats a variable.
0

#12 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 01 March 2010 - 02:54 PM

No, if a quest has flag QUEST_FLAG_HIDDEN_REWARDS it will always send 0 else it send value taken from DB, there is no variables.
Sorry for my english, I'm french.
0

#13 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 01 March 2010 - 04:20 PM

i need to confirm this with retail packet/cache (the case is only for SMSG_QUEST_QUERY_RESPONSE)
0

#14 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 02 March 2010 - 02:19 AM

see quest cache, its saved info from SMSG_QUEST_QUERY_RESPONSE. I allready checked, for example this quest has flag 512 included and has all RewChoiceItemIdX 0 in WDB
Posted Image
0

#15 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 02 March 2010 - 03:32 AM

k, thx for the info, i didnt have that quest in any cache i got
0

#16 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 03 March 2010 - 11:26 AM

Updated with KFL's research and changes and included many more new changes.

Btw thanks to all who helped me allready.
Posted Image
1

#17 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 03 March 2010 - 01:47 PM

question about QUEST_CUSTOM_FLAG_ONLY_ONE_REQUIRED: you said that will work same way as RequiredOneOfQuest and use data from RequiredQuestX but we only have 4 of RequiredQuest columns and if i remember correctly there is a DK quest that has a pre-req different for each character race (so there are 10 of them) - how is that going to be handled?
0

#18 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 03 March 2010 - 03:51 PM

i didnt droped RequiredOneOfQuest, that flag QUEST_CUSTOM_FLAG_ONLY_ONE_REQUIRED was there before RequiredOneOfQuest and is used in PlayerPacketWrapper, i just added its handling also in QuestMgr so u can use both of them
Posted Image
0

#19 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 03 March 2010 - 04:18 PM

i see it should be fine then
0

#20 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 03 March 2010 - 06:04 PM

Updated with corrected SQL file and some other crash related fixes.
Posted Image
1

Share this topic:


  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users