${Me.Grouped}

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Vaft
a lesser mummy
a lesser mummy
Posts: 69
Joined: Fri Mar 07, 2003 6:39 am

${Me.Grouped}

Post by Vaft » Sat Aug 14, 2004 3:52 am

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.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sat Aug 14, 2004 4:38 am

Can't blame me for bad programming at SOE.

quixote398
orc pawn
orc pawn
Posts: 12
Joined: Mon Jul 19, 2004 12:47 am

Post by quixote398 » Sat Aug 14, 2004 5:10 am

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.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sat Aug 14, 2004 6:15 am

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.

quixote398
orc pawn
orc pawn
Posts: 12
Joined: Mon Jul 19, 2004 12:47 am

Post by quixote398 » Sat Aug 14, 2004 2:49 pm

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.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sat Aug 14, 2004 5:58 pm

I'll fix it here in a little while.

Vaft
a lesser mummy
a lesser mummy
Posts: 69
Joined: Fri Mar 07, 2003 6:39 am

Post by Vaft » Sat Aug 21, 2004 5:52 am

now it's always returning true even if im not grouped.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Sat Aug 21, 2004 1:14 pm

Even with the August 20 zip?

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sat Aug 21, 2004 6:28 pm

All better now Amadeus. Latest zip fixed it :)

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sat Aug 21, 2004 7:10 pm

won't just using ${Group} do the same? if there's no one in group, it returns zero