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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2009, 05:02 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 06-12-2009, 05:27 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Thanks Trev. I'll code it and submit it.
Reply With Quote
  #3  
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
  #4  
Old 07-01-2009, 02:58 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

This has been committed to svn.
Reply With Quote
  #5  
Old 07-01-2009, 11:02 AM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

Question: Why is this a sticky?
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
  #6  
Old 07-01-2009, 11:35 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

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.
Reply With Quote
  #7  
Old 07-01-2009, 11:41 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

If ending up with no target is the Live-like behavior, why isn't that the default rule value?
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 07:36 AM.


 

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