Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #28  
Old 10-29-2006, 12:32 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

For 6.2

Code:
OP_GroupInvite2=0x1f27
I wasn't able to find the OP_GroupFollow2 for 6.2, but the client appears to only send a OP_GroupFollow2 on accepting a group they were invited to with OP_GroupInvite2. So I made a little work around in Handle_OP_GroupInvite2 that recreates the incoming packet but always sets it to a GroupInvite opcode before sending it to the target.

Code:
void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app)
{
	if (app->size != sizeof(GroupInvite_Struct)) {
		LogFile->write(EQEMuLog::Error, "Invalid size for OP_GroupInvite: Expected: %i, Got: %i",
			sizeof(GroupInvite_Struct), app->size);
		return;
	}

	if(this->GetTarget() != 0 && this->GetTarget()->IsClient()) {
		//Make a new packet using all the same information but make sure it's a fixed GroupInvite opcode so we
		//Don't have to deal with GroupFollow2 crap.
		EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupInvite, sizeof(GroupInvite_Struct));
		memcpy(outapp->pBuffer, app->pBuffer, outapp->size);
		this->GetTarget()->CastToClient()->QueuePacket(outapp);
		safe_delete(outapp);
		return;
	}
	/*if(this->GetTarget() != 0 && this->GetTarget()->IsNPC() && this->GetTarget()->CastToNPC()->IsInteractive()) {
		if(!this->GetTarget()->CastToNPC()->IsGrouped()) {
			EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupUpdate,sizeof(GroupUpdate_Struct));
			GroupUpdate_Struct* gu = (GroupUpdate_Struct*) outapp->pBuffer;
			gu->action = 9;
			strcpy(gu->membername,GetName());
			strcpy(gu->yourname,GetTarget()->CastToNPC()->GetName());
			FastQueuePacket(&outapp);
			if (!isgrouped){
				Group* ng = new Group(this);
				entity_list.AddGroup(ng);
			}
			entity_list.GetGroupByClient(this->CastToClient())->AddMember(GetTarget());
			this->GetTarget()->CastToNPC()->TakenAction(22,this->CastToMob());
		}
		else {
			    LogFile->write(EQEMuLog::Debug, "IPC: %s already grouped.", this->GetTarget()->GetName());
		}
	}*/
	return;
}
Tested on 6.2 earlier and it worked fine, will need to go test on titanium tonight but don't see why it shouldn't work.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:34 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3