any one can help me for codes?
:handsdown:
:handsdown:
/delitembytype 1072010 /delitembytype 1072011 /delitembytype 1072012 /delitembytype 1072013 /delitembytype 1072014 /delitembytype 1072015 /delitembytype 1072016 /delitembytype 1072017 /delitembytype 1072018 /delitembytype 1072019
public foid drop(Client client)
{
foreach(Item in item items)
{
Packets.Dropitem((Item*)YOURITEMID,client);
}}
public void dropOre (MyChar character){
foreach(Object item: character.itemList.value().toArray()){
Packet drop = new Packet( DropItem.buildDropPacket(myTimer.getTimeStamp(), ((Item)item).ID, character.xcord, character.ycord) );
character.itemList.remove( ((Item)item).ID );
ClientPacketQueue.add(drop);
ClientQueueSize++;
}
}
You just made me dislike Java more than I thought was possibleQuote:
my implementation would be
Code:public void dropOre (MyChar character){ foreach(Object item: character.itemList.value().toArray()){ Packet drop = new Packet( DropItem.buildDropPacket(myTimer.getTimeStamp(), ((Item)item).ID, character.xcord, character.ycord) ); character.itemList.remove( ((Item)item).ID ); ClientPacketQueue.add(drop); ClientQueueSize++; } }
Are you talking about that for each loop, or the packet building? lol. I used a ConcurrentHashMap that can only map object to objects, have to do a series of casts to get what i want. Maybe my lack of proficiency has highlighted the downside of java, lol.Quote:
You just made me dislike Java more than I thought was possible
I'm not talking about your coding style or anything, just Java in general. EwwQuote:
Are you talking about that for each loop, or the packet building? lol. I used a ConcurrentHashMap that can only map object to objects, have to do a series of casts to get what i want. Maybe my lack of proficiency has highlighted the downside of java, lol.