Quote:
Originally Posted by U2_Caparzo
the for loop is doing
if(MyChar.Inventory.Contains(722000))
remove....
else if(MyCha......Contains(722001))
remove....
else if(MyChar.....Contains(722002))
remove....
u are doing 2-6 comparations when u need just 1-3
|
If(Player has any of the three items)
Iterate throught 722000-722000 (we dont know which of the three he has at this point
If(Player has item od given ID -> remove it and break the loop)
Are you sure you are not just interpreting the code wrong ?
And Wuscheli
This is pseudocode . Simply said , since we dont know what source you are using , we dont know whats the name of the required functions thus in the sample code the name i simply used plain english for naming (For example HasItem() is == to the InventoryContains() in your source .