Anybody know how to use dnd in quests?
On martysama's site i found this usage, but not works: when itemvnum.dnd begin etc..
in char_item.cpp -> bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) I saw in the code, the item has to be have ITEM_FLAG_APPLICABLE, i've did add in item_proto ITEM_APPLICABLE, restarted the server and everything but still not works, any idea?
here is the code in UseItemEx:
#ifdef ENABLE_QUEST_DND_EVENT
if (IS_SET(item->GetFlag(), ITEM_FLAG_APPLICABLE))
{
LPITEM item2;
if (!GetItem(DestCell) || !(item2 = GetItem(DestCell)))
return false;
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
return false;
quest::CQuestManager::instance().DND(GetPlayerID(), item, item2, false);
return true;
}
#endif
On martysama's site i found this usage, but not works: when itemvnum.dnd begin etc..
in char_item.cpp -> bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) I saw in the code, the item has to be have ITEM_FLAG_APPLICABLE, i've did add in item_proto ITEM_APPLICABLE, restarted the server and everything but still not works, any idea?
here is the code in UseItemEx:
#ifdef ENABLE_QUEST_DND_EVENT
if (IS_SET(item->GetFlag(), ITEM_FLAG_APPLICABLE))
{
LPITEM item2;
if (!GetItem(DestCell) || !(item2 = GetItem(DestCell)))
return false;
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
return false;
quest::CQuestManager::instance().DND(GetPlayerID(), item, item2, false);
return true;
}
#endif
Last edited: