• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

C++ how to add a quest to player on gossip menu select?

Status
Not open for further replies.

Tommy

Founder
I tried something like Player->Addquest(questid,creaturequestgiver) but it doesn't work

Is the NPC a questGiver? I'm pretty sure when adding a quest the "questGiver" parameter requires the "Object" (npc) to be a quest giver.
 

darksoke

OnTop500
Is the NPC a questGiver? I'm pretty sure when adding a quest the "questGiver" parameter requires the "Object" (npc) to be a quest giver.

yes it is quest giver but i can't use it lol if i type player->addquest(50000,questgiverGUID) it say that quest id should be constant lol ... and i tried fetching data like this:
uint32 questsids = myresult[0].Getuint32() - not working again that constant shit
const * int questsids = myresult[0].Getuint32() - not working again that constant shit

tested fetched data in a chat message and the sql querry work so idk what the hell is wrong lol
 

Rochet2

Moderator / Eluna Dev
sorry i don't understand :| -> const * quest_id = 12345 <- isn't that the same shit (Quest const* quest) ?

Quest const* is a pointer to a Quest object.
quest_id is a number.
No, it is not the same.

You should probably try using sObjectMgr->GetQuestTemplate(questId)
 

darksoke

OnTop500
Quest const* is a pointer to a Quest object.
quest_id is a number.
No, it is not the same.

You should probably try using sObjectMgr->GetQuestTemplate(questId)
ok tried that but now i have a problem related to creature ID X( i mean quest giver

EDIT: lol just used NULL instead of quest_giver and it work perfectly , thank you guys , solved
 
Last edited:
Status
Not open for further replies.
Top