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

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2003, 02:11 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default /targetgroupbuff snippet

Add this to client.h

Code:
bool	TGB() {return tgb;}
protected:
bool tgb;
Add this to EQ_Opcodes.h

Code:
#define	OP_TargetGroupBuff 0x2042
NOTE: 0x2042 seems to be used for other purposes too, with the information 2... it also sends this opcode twice every time you type /tgb, with the information 2 being sent in the second packet. The purpose I don't know.

In client_process.cpp, find case 0x2042: and replace that section with this:

Code:
					case OP_TargetGroupBuff: {
						GlobalID_Struct* tgbs = (GlobalID_Struct*)app->pBuffer;
						int16 tgbid = tgbs->entity_id ;
						if (tgbid == 1)
						{
							if (!tgb)
								Message(0,"Target Group Buff now ON");
							tgb = true;
						}
						else if (tgbid == 0)
						{
							if (tgb)
								Message(0,"Target Group Buff now OFF");
							tgb = false;
						}
						break;
					}
In spells.cpp, find: case ST_Group: case 0x3: and replace the section with:

Code:
			case ST_Group:
			case 0x3:
			{
				Mob* trg = this;
				if (IsClient() && CastToClient()->TGB() && target && target->IsClient() && target->CastToClient()->isgrouped)
				{
					trg = target;
					SpellOnTarget(spell_id,this);
				}
				if (trg->IsClient() && trg->CastToClient()->isgrouped && entity_list.GetGroupByClient(trg->CastToClient()) != 0)
					entity_list.GetGroupByClient(trg->CastToClient())->CastGroupSpell(this->CastToClient(),spell_id);
				else
					SpellOnTarget(spell_id,this);
				break;
			}
Reply With Quote
  #2  
Old 06-04-2003, 02:20 AM
haloboycs
Sarnak
 
Join Date: Jan 2003
Posts: 94
Default

it works great on his WR server.

but one small problem, up on login, it shows 'Target Group Buff *ON*' .. eq live doesnt do that.
Reply With Quote
  #3  
Old 06-04-2003, 03:34 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Why is it a problem? Because Live doesnt do it? I wouldnt say thats a problem, I would call that a difference...
Thanks Wiz!
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #4  
Old 06-04-2003, 08:10 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

That's not a major problem, nice to update the players that it's on so they can decide to turn it off if need be.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #5  
Old 06-04-2003, 07:15 PM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

One minor thing I missed, bool tgb = true; needs to be declared in Client::Client, that's all.
Reply With Quote
  #6  
Old 06-06-2003, 02:58 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

I merged this in last night. Mind taking a look Wiz and verified I implemented it correctly? It will be out on CVS today.


Thanks
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #7  
Old 06-08-2003, 06:16 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

It's implemented almost verbatim, i made some small changes.
tgb defaults to false (it's stored client side)
and 2 is the tgb status requester.

Bugs:
Target can change while casting, (eg, tab)
Target doesn't get buffed if not grouped. (caster gets hit twice)
IPC can't cast group spells.
Reply With Quote
  #8  
Old 06-09-2003, 11:33 PM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

Quote:
Originally Posted by Bigpull
It's implemented almost verbatim, i made some small changes.
tgb defaults to false (it's stored client side)
and 2 is the tgb status requester.

Bugs:
Target can change while casting, (eg, tab)
Target doesn't get buffed if not grouped. (caster gets hit twice)
IPC can't cast group spells.
Target can change while casting is possible on live too, that's not a tgb bug, and shouldn't affect who gets hit by the spell.

Haven't implemented a fix for buffing someone ungrouped yet.

IPC?
Reply With Quote
  #9  
Old 06-09-2003, 11:47 PM
fnemo's Avatar
fnemo
Discordant
 
Join Date: Dec 2002
Posts: 354
Default

Interactive Player Character ... Bot
__________________
Nemo
Administrator and coder for the World Alkora Server
Reply With Quote
  #10  
Old 06-10-2003, 01:53 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

Quote:
Originally Posted by fnemo
Interactive Player Character ... Bot
Ah. I don't use those, so someone else will have to code in support.
Reply With Quote
  #11  
Old 06-10-2003, 01:56 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

This will fix the bug with ungrouped targets.

Code:
			case ST_Group:
			case 0x3:
			{
				Mob* trg = this;
				if (IsClient() && CastToClient()->TGB() && target && target != this && target->IsClient())
				{
					trg = target;
					SpellOnTarget(spell_id,this);
				}
				if (trg->IsClient() && entity_list.GetGroupByClient(trg->CastToClient()) != 0)
					entity_list.GetGroupByClient(trg->CastToClient())->CastGroupSpell(this->CastToClient(),spell_id);
				else
					SpellOnTarget(spell_id,trg);
				break;
			}
Reply With Quote
Reply


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 09:40 PM.


 

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