Hi all.
What would be the difference between these two functions existing in ginc_companion?
I'll post them here so that people won't have to go searching.
int GetIsRosterNameInParty(object oPC, string sRosterName)
{
object oCompanion = GetObjectFromRosterName(sRosterName);
return (GetFactionEqual(oPC, oCompanion));
}
// This function should only be used to check if roster members are in the party
// This function is unfortunately named (generic name for a specific funtion),
// but is to entrenched to rename.
int IsInParty(string sRosterName)
{
object oPC = GetFirstPC();
return (GetIsRosterNameInParty(oPC, sRosterName));
/*
object oFM = GetFirstFactionMember(oPC, FALSE);
object oCompanion = GetObjectFromRosterName(sRosterName);
while(GetIsObjectValid(oFM))
{
if(oFM == oCompanion)
{
return 1;
}
oFM = GetNextFactionMember(oPC, FALSE);
}
return 0;
*/
}
I can see that the IsInParty actually uses the GetIsRosterNameInParty, but I wonder why it even exists if the GetIsRosterNameInParty could do the job on its own, and which of these two would be better to use.
Thanks.





Retour en haut






