Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
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
 

Thread Tools
Display Modes

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 06:46 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