Page 1 of 1

${Me.Grouped}

Posted: Sat Aug 14, 2004 3:52 am
by Vaft
This sometimes gets flagged as false if the group leader changes or someone leaves the group or something, and then the only way to refresh it back to true is to disband and then rejoin.

Posted: Sat Aug 14, 2004 4:38 am
by Amadeus
Can't blame me for bad programming at SOE.

Posted: Sat Aug 14, 2004 5:10 am
by quixote398
couldn't line 1522 in MQ2DataTypes.cpp be changed from...

Code: Select all

		Dest.DWord=pChar->GroupMember1[0];
to...

Code: Select all

		Dest.DWord=(pChar->GroupMember1[0]|pChar->GroupMember2[0]|pChar->GroupMember3[0]|pChar->GroupMember4[0]|pChar->GroupMember5[0]);
?

basically just compare all the group members with an or operator, so if any one of them has data(is true), then the grouped datatype would return true.

Posted: Sat Aug 14, 2004 6:15 am
by Cr4zyb4rd
You *could* so something like that, just like you could hack around the many bugs in the item and spell databases, and the deal where Me.Casting clears itself all the time on a bard, even though you're casting, and...

The thing is, as I understand it, the MQ Data structs are meant to reflect the "true" contents of memory, as they'd appear just watching that location in a debugger. By all means use whatever methods you have to in your macros/plugins to make them work correctly, but changing MQ2's returns is a grey area...you kind of have to judge case-by-case whether it would be more intuitive to return the value unmolested or fudge it a bit.

Posted: Sat Aug 14, 2004 2:49 pm
by quixote398
Well, if you look at the original code, Grouped was never actually in the data structure. Originally it was thought it was, but later on it was discovered that it was actually the first character of the first group member's name. All five group member's names were being stored and only recently discovered.

The original code was actually just checking the first group member slot and returning true if there was a name there, or false if not. It'd make sense now to extend the "Grouped" check to see if any of the five group slots had someone in them.

Sony's code does not shift group members around. You can notice this in game when you invite a first person, and then a second person, first person leaves group, get a third person, and re-invite first person, the first and third persons have switched group slots. The code just fills in group slots on a first come, first serve basis. but it doesn't move the order of the slots if someone leaves.

So the "best" way to see if someone is grouped is to do a logical OR on the groupslots, so if any one of them has someone in it, return TRUE for grouped.

Posted: Sat Aug 14, 2004 5:58 pm
by Amadeus
I'll fix it here in a little while.

Posted: Sat Aug 21, 2004 5:52 am
by Vaft
now it's always returning true even if im not grouped.

Posted: Sat Aug 21, 2004 1:14 pm
by Amadeus
Even with the August 20 zip?

Posted: Sat Aug 21, 2004 6:28 pm
by Night Hawk
All better now Amadeus. Latest zip fixed it :)

Posted: Sat Aug 21, 2004 7:10 pm
by Rusty~
won't just using ${Group} do the same? if there's no one in group, it returns zero