just confuse

05/31/2012 13:18 marlyandedsel#1
what is correct by doing this two option

PHP Code:
 for (int x 0items.Countx++)
            {
                
Interfaces.IConquerItem item = new Network.GamePackets.ConquerItem(true);
                
item.ID items[x].Id;
                
item.UID items[x].Uid;
                
item.Durability items[x].Durability
or this one
PHP Code:
 for (int x 0items.Count 1x++)
            {
                
Interfaces.IConquerItem item = new Network.GamePackets.ConquerItem(true);
                
item.ID items[x].Id;
                
item.UID items[x].Uid;
                
item.Durability items[x].Durability
This is loading items.....
I just have some issue of some missing items of character when they login but I dont get any error message in the console.... btw I am using the Impulse source
05/31/2012 15:41 Mr_PoP#2
why not ?
Code:
foreach(var item in items){
//do what u want!
}
05/31/2012 20:02 marlyandedsel#3
Thank You Mr.Pop..
can you give me clue on how to check the number og Team Group in a certain map? have use the impulse source.
06/01/2012 00:56 Mr_PoP#4
I have no clue how Impulse handling his source, cant help you sorry.
06/01/2012 03:28 Zeroxelli#5
Number of team group in a certain map ? You mean the number of teams in a map? You'd loop through each team in your team pool, then through the members, and up the count if that member is in the map ID you're checking for. To be more efficient, skip any other members for the team you already added a member from. There's most likely a more efficient way, but I don't know how that source is structured.

I wouldn't condone using too many loops in the long run, though.
06/01/2012 12:20 marlyandedsel#6
or I just check all player in the map if they are leader and count it... but condition is if the leader is out in the map hmmm.......
06/01/2012 12:36 I don't have a username#7
Code:
//pseudo
static List<Team> teams = new List<Team>();
static int TeamsInMap(ushort map) {
teams.Clear();
foreach (Player p in Kernel.Teams)
{
if (p.MapID == map && !teams.Contains(p.Team))
{
teams.Add(p.Team);
}
}
return teams.Count;
}
Something like that?
06/01/2012 12:47 marlyandedsel#8
exactly what i am looking for....