View Single Post
  #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