| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 11:49 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				/assist question
			 
			 
			
		
		
		
		Its been so long since I played on live, I'm not sure I remember accurately how /assist worked on live. I know that when you /assist a mob or player that has a target, you got their target. But what happened when you /assist a mob or player that does not have a target? Currently, the emu sets the target to yourself. This can be misleading since I have more than once thought, "now why does that mob have me targeted?" 
 
What I can't remember is when you /assist someone who doesn't have a target, does your target get cleared or does it just stay with the same target you had before the /assist command? I'd like to create patches to correct this, but I need to know what the proper behavior is before I do. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 02:47 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2003 
					Location: Recycle Bin 
					
					
						Posts: 90
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I seem to think that if the player / npc had no target when assisted, nothing would show on HoTT. 
		
	
		
		
		
		
		
		
			
				__________________ 
				I'll be back!
  
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 02:53 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		That may be true, but I'm trying to fix the /assist behavior. I hadn't been using HoTT because leadership abilities were not working. Now that group leadership is working, I do use it if the group leader has the ability, but that is not always the case. So I still want to fix /assist. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 02:56 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: California 
					
					
						Posts: 814
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		In my opinion, clearing the target when using /assist on a PC/NPC with nothing targeted is the only logical choice. 
 
Leaving it at the last thing you had targeted on a failed /assist is only going to make you wonder whether your PC/NPC actually had that last thing targeted, too, similar to the problem of targeting oneself upon failure. 
 
The only consistent and unambiguous choice is for /assist to always set your target to that of your target's target, even when that's nothing at all. 
 
The only question I have after that is whether /assist has a maximum range. /target has a maximum range, but once you do have something targeted, you can keep that target as long as you're in the zone and you're both alive. 
 
Can you then /assist something that's across the zone but that you still have targeted? Or, does /assist have a range limit like /target, which is the way I would assume it to work? 
 
- Shendare 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				06-12-2009, 03:30 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Shendare
					 
				 
				In my opinion, clearing the target when using /assist on a PC/NPC with nothing targeted is the only logical choice. 
 
Leaving it at the last thing you had targeted on a failed /assist is only going to make you wonder whether your PC/NPC actually had that last thing targeted, too, similar to the problem of targeting oneself upon failure. 
 
The only consistent and unambiguous choice is for /assist to always set your target to that of your target's target, even when that's nothing at all. 
			
		 | 
	 
	 
 I agree, but I want to try to match live, even if it doesn't follow the most logical choice. Although, I could easily make it a rule so the behavior is selectable.
 
However, I was unable to get the client to clear the target on an /assist so I would need someone to get a packet trace of that happening (if that is the behavior on live) so I know what packet to send the client.
 
	Quote: 
	
	
		
			
				
					Originally Posted by  Shendare
					 
				 
				The only question I have after that is whether /assist has a maximum range. /target has a maximum range, but once you do have something targeted, you can keep that target as long as you're in the zone and you're both alive. 
 
Can you then /assist something that's across the zone but that you still have targeted? Or, does /assist have a range limit like /target, which is the way I would assume it to work? 
 
- Shendare 
			
		 | 
	 
	 
 The emu code has range limits on /assist already. If you try to /assist beyond that range, you get the same behavior as if your target had no target.  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 05:02 PM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2006 
					Location: USA 
					
					
						Posts: 5,946
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I just checked Live and /assist on an NPC that is not aggro'd does nothing at all.  It keeps your target on the NPC you already have targeted. 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				06-12-2009, 05:27 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Thanks Trev. I'll code it and submit it. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				06-22-2009, 01:30 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		Made it a rule so people can choose the existing behavior or one that is more live like. 
	Code: 
	Index: common/ruletypes.h
===================================================================
--- common/ruletypes.h  (revision 701)
+++ common/ruletypes.h  (working copy)
@@ -189,6 +189,7 @@
 RULE_REAL ( Combat, AgiHitFactor, 0.01)
 RULE_INT ( Combat, MinRangedAttackDist, 25) //Minimum Distance to use Ranged Attacks
 RULE_REAL ( Combat, ArcheryStationaryPenalty, 1.0)     //Damage Penalty for moving or rooted targets.  1 = 50% penalty (Default), 2 = no penalty, 0 = 100% penalty
+RULE_BOOL ( Combat, AssistNoTargetSelf, true)  //when assisting a target that does not have a target true = target self, false = leave target as was before assist
 RULE_CATEGORY_END()
 RULE_CATEGORY( NPC )
Index: zone/client_packet.cpp
===================================================================
--- zone/client_packet.cpp      (revision 701)
+++ zone/client_packet.cpp      (working copy)
@@ -2058,7 +2058,7 @@
        EQApplicationPacket* outapp = app->Copy();
        eid = (EntityId_Struct*)outapp->pBuffer;
-       eid->entity_id = GetID();
+       if (RuleB(Combat, AssistNoTargetSelf)) eid->entity_id = GetID();
        if(entity && entity->IsMob())
        {
                Mob *assistee = entity->CastToMob();
 And the SQL for the rule:
 
	Code: 
	INSERT INTO `rule_values` VALUES ('1', 'Combat:AssistNoTargetSelf', 'true','When assisting a target without a target: true = target self, false = leave target as was before assist (this is the behavior on live)');
  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-01-2009, 02:58 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		This has been committed to svn. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-01-2009, 11:02 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Discordant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2004 
					Location: 127.0.0.1 
					
					
						Posts: 402
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Question: Why is this a sticky? 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-01-2009, 11:35 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		It was made a sticky so a dev would remember to commit it. I just recently got access to the SVN so committed it myself. However, I have no way to remove the sticky on this post so I'm waiting on someone else to do it. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-01-2009, 11:41 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Dragon 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2006 
					Location: Cincinnati, OH 
					
					
						Posts: 689
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		If ending up with no target is the Live-like behavior, why isn't that the default rule value? 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				07-01-2009, 02:42 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2009 
					Location: USA 
					
					
						Posts: 478
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		It's not ending up with no target. You end up with the target you had before the /assist. In any case, I wasn't sure if it would confuse people if the change happened unexpectedly so I took the safer default of the prior behavior. That can easily be changed. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is Off 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
All times are GMT -4. The time now is 11:10 PM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |