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

[SOLVED] problem with Quest Requirements in Extended Costs

Status
Not open for further replies.

Diegito20

Member
Hello, Guys! i made a simple checks in player.cpp, in Extended costs to Require a Quest Completed to Buy items in the Vendor, but i have a problem, i cant use Quest_Status_Rewarded i don't know why doesnt work, but if i am use Quest_Status_Complete then it work, but only if you complete the objectives from the quest, not if you finisht the quest. i know i need Quest_Status_Rewarded, for it
maybe someone can help me to fix my simple problem, :p
here my edits.

Code:
                if (creature->GetScriptName() == "NPC_Season_10")
	      {
		if	(GetQuestStatus(108000)  ==  QUEST_STATUS_REWARDED)
	      {
		// ignore this	ChatHandler(GetSession()).PSendSysMessage("|cffff0000thanks for purchase.");
              }
		else
	      {
		  ChatHandler(GetSession()).PSendSysMessage("|cffff0000You need to complete the arena season 10 pre quest to buy items from this vendor.");
			return false;
		}
    }
 
Last edited by a moderator:

Rochet2

Moderator / Eluna Dev
have you tested to print what GetQuestStatus(108000) returns when the quest is rewarded and you assume QUEST_STATUS_REWARDED should work (but doesnt for some reason)?
You should debug in some way (with a debugger or with prints or something) to know what really happens and why.

If the quest status is not QUEST_STATUS_REWARDED or that part of the code cannot be reached then you need to find out that such things happen and then look for why they happen.
 

Diegito20

Member
Lel, nvm I've already fixed it the problem just was because, the quest has Flag QUEST_FLAGS_DAILY, and so then not saved in Character_Quest_status Rewarded, but now, i'm change the flag to unique a quest. and work fine But thanks Rochet for write it and for the idea to check my quest again, hehe
i missed 5 hours, yesterday to try find other quest_status for it, and the soluction was very simple jk :)
and also sorry, for my english, learn my english, playing WoW
thanks again! you or someone can close this little topic :p
 
Status
Not open for further replies.
Top