View Single Post
  #7  
Old 06-22-2009, 01:30 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

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)');
Reply With Quote