Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2019, 09:56 PM
dclarkpf
Fire Beetle
 
Join Date: Jul 2005
Location: Grants Pass, Or
Posts: 20
Default Cleric Mercs

Cleric mercs are a bit broken atm. They start healing the second someone takes any damage. I'm posting this here, because I've fixed them on my server. It's really easy. Here's how to do it.

Go in to the attack.cpp file. Find the
Mob::AddToHateList function.

Change the
Code:
    if (other->IsMerc()) {
        if (other->CastToMerc()->GetMercOwner() && other->CastToMerc()->GetMercOwner()->CastToClient()->GetFeigned()) {
            AddFeignMemory(other->CastToMerc()->GetMercOwner()->CastToClient());
        }
        else {
            if (!hate_list.IsEntOnHateList(other->CastToMerc()->GetMercOwner()))
                hate_list.AddEntToHateList(other->CastToMerc()->GetMercOwner(), 0, 0, false, true);
            // if mercs are reworked to include adding 'this' to owner's xtarget list, this should reflect bots code above
        }
    } //MERC
to

Code:
    // if other is a merc, add the merc client to the hate list
    if (other->IsMerc()) {
        if (other->CastToMerc()->GetMercOwner() && other->CastToMerc()->GetMercOwner()->CastToClient()->GetFeigned()) {
            AddFeignMemory(other->CastToMerc()->GetMercOwner()->CastToClient());
        }
        else {
            if (!hate_list.IsEntOnHateList(other->CastToMerc()->GetMercOwner()))
                hate_list.AddEntToHateList(other->CastToMerc()->GetMercOwner(), 0, 0, false, true);
            // if mercs are reworked to include adding 'this' to owner's xtarget list, this should reflect bots code above
        }
        AI_Event_Engaged(other, iYellForHelp);
    } //MERC
You are only adding one line there. The AI_Event_Engaged line. That's all there is to it.

You can also modify when they start healing in the merc.cpp file.
Code:
                                int8 numToHeal = g->GetNumberNeedingHealedInGroup(IsEngaged() ? 50 : 85, true);
                                int8 checkHPR = IsEngaged() ? 50 : 85;
                                int8 checkPetHPR = IsEngaged() ? 50 : 85;
As you can see I've got mine set to heal at 50% if they are in combat, and 85% if the group is out of combat. The first line finds out how many people in the group need heals. The second line sets at what health ratio to heal those people, and the last line sets the ratio to heal pets at. I hope this helps you guys...
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 09:25 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3