remove item from list
Posted: Fri Apr 14, 2017 8:03 am
in this routine in client.cpp
the items list which contains the loot items which will be displayed to the player in the loot window i added this bit of code in order to detect if an item is lore or not
what is the proper way/command to remove a specific item from the loot list, so it will not be included in the packet that in generate later in the code
** i do realize my code is not complete but i am trying to learn the system implemented. i will be adding checks the following checks and removeing item from list if neccessary
1. lore and you already have the item
2. lore, quest starter and you already started or finished the quest
3. room to grow if there are quest items in the spawn loot that a player should not receive
Code: Select all
void Client::Loot(int32 total_coins, vector<Item*>* items, Entity* entity)Code: Select all
LogWrite(PLAYER__DEBUG, 0, "Robert Lore", "Checking for Lore:%i Result: %i", item->generic_info.item_flags, item->generic_info.item_flags & LORE);
if ((item->generic_info.item_flags & LORE) >0){
LogWrite(PLAYER__DEBUG, 0, "Robert Lore", "Found a Lore Item Flag %i result: %i", item->generic_info.item_flags, item->generic_info.item_flags & LORE );
code to remove item from the list
}** i do realize my code is not complete but i am trying to learn the system implemented. i will be adding checks the following checks and removeing item from list if neccessary
1. lore and you already have the item
2. lore, quest starter and you already started or finished the quest
3. room to grow if there are quest items in the spawn loot that a player should not receive