Page 1 of 1

Update: show usable item in active quest list

Posted: Sun Sep 10, 2017 1:08 pm
by Ememjr
this update will fix and allow this
usableitem.JPG
be sure to use the worldstruct.xml in the following post http://www.eq2emulator.net/phpBB3/viewt ... 297#p32297

in LuaFunctions.cpp

add the following line
int32 usableitemid = lua_interface->GetInt32Value(state, 8);
and modify this line
QuestStep* quest_step = quest->AddQuestStep(step, QUEST_STEP_TYPE_NORMAL, description, 0, quantity, taskgroup, 0, 0, percentage, usableitemid);
in the the following

Code: Select all

int EQ2Emu_lua_AddQuestStep(lua_State* state) {
	Quest* quest = lua_interface->GetQuest(state);
	if (quest) {
		int32 step = lua_interface->GetInt32Value(state, 2);
		string description = lua_interface->GetStringValue(state, 3);
		int32 quantity = lua_interface->GetInt32Value(state, 4);
		float percentage = lua_interface->GetFloatValue(state, 5);
		string str_taskgroup = lua_interface->GetStringValue(state, 6);
		int16 icon = lua_interface->GetInt16Value(state, 7);
		int32 usableitemid = lua_interface->GetInt32Value(state, 8);
		const char* taskgroup = 0;
		if(str_taskgroup.length() > 0)
			taskgroup = str_taskgroup.c_str();
		QuestStep* quest_step = quest->AddQuestStep(step, QUEST_STEP_TYPE_NORMAL, description, 0, quantity, taskgroup, 0, 0, percentage, usableitemid);
		if (quest_step && icon && quantity > 0)
			quest_step->SetIcon(icon);
	}
	return 0;
}

Re: Update: show usable item in active quest list

Posted: Sun Sep 10, 2017 1:11 pm
by Ememjr
WTF 90% of this post did not post