Guild Members

09/23/2010 09:28 ryuchetval#1
Hey guys...I've recently tried to search if a Character is in the guild with me...
I tried to search them with MyGuild.Members.contains(C.entityID) and obviously it didn't work...and started to search how are they added...and then i found that the members hashtable contains another hashtable in the values so I searched with
foreach (Hastable M in MyGuild.Members.Values) //a friend's ideea
if (H.Contains(C.entityID))
and obviosly it didn't work again because it will take somebody(even if it's not in my guild)

so anyone got any ideea how to check if a member is in my guild? ( i need this for public bool PKAble(PKMode PK, Character C))
09/23/2010 09:56 Fish*#2
Code:
C.MyGuild != this.MyGuild
just make a foreach for chars. (If it is not already there)
then cold be like this
Code:
if (C.MyGuild.Name != this.MyGuild.Name)
    return true;//not sure if is true or false needed.
else
    return;
09/23/2010 11:08 ryuchetval#3
there's no need for a foreach cuz it already takes every character and check if it can be pked...also i'll try your way but i'm pretty sure it won't work...

edit: nope it didn't work...
09/23/2010 11:48 Fish*#4
did u try from return true to return false?
09/23/2010 18:49 ryuchetval#5
lol ofcourse and i didn't use return true...i used return false so that i am not able to pk that character