Yes. Dire charm steals some portion of exp depending on damage dealt I think? I’m not sure the exact formula though. Or how it behaves with 2+ dire charmed pets in a group
DC can take up to 50% iirc. And i dunno I loved the kill speed (in luclin era in chardok mostly) with 2 DC pets.
from the code: https://github.com/EQMacEmu/Server/blob/main/zone/exp.cpp Code: [ Only registered users can see the bbcode. Click Here To Register... ]
This is what Chat GPT tells me the code does: Checking if the damage done by a pet is greater than zero: This if condition verifies if the damage inflicted by a pet (referred to as dire_pet_damage) is greater than zero. If it is, then it proceeds with the calculation. Calculating the percentage of damage done by the pet: The percentage of damage done by the pet (pet_dmg_pct) is calculated by dividing the damage done by the pet (dire_pet_damage) by the total damage (total_damage) inflicted in the scenario. Adjusting experience gained based on pet damage: Depending on the percentage of damage done by the pet, the experience gained (exp) is adjusted. If the pet's damage percentage is equal to or greater than 100% (pet_dmg_pct >= 1.0f), the experience gained is reduced to 25% of the base experience (basexp). If the pet's damage percentage is greater than 50% but less than 100% (pet_dmg_pct > 0.5f), the experience gained is reduced gradually, with a minimum of 25%. Logging the information: Finally, the code logs the relevant information, including the name of the character (GetName()), the percentage of damage done by the pet, the actual damage done by the pet, the total damage, and the adjusted percentage of experience gained.
Your compsci degree is safe. Giving those instructions back to ChatGPT, and we get a pretty hard to identify bug, and exposes a different bug in the description of #3 above. It says: Which churns out the buggy line of code: "0.25f + 0.75f * (1.0f - pet_dmg_pct) * basexp" Code: [ Only registered users can see the bbcode. Click Here To Register... ] A better description of the original code would be: If the pet's damage percentage is greater than 50% but less than 100% (pet_dmg_pct > 0.5f), the experience gained is 50% plus half of pet's damage percentage points above 50%. When I change just that sentence, I get the following code, which looks correct, if not a little extra verbose. I'll also award points for writing a function rather than a whole class. Code: [ Only registered users can see the bbcode. Click Here To Register... ]
if pet does less than 50% damage, you get 100% exp if pet does 50% damage, you get 75% exp if pet does 99.9% damage, you get 50% exp (your exp % decreases linearly from 75% to 50% as pet damage increases from 50% to 99.9%) if pet does 100% damage, you get 25% exp
the interesting question is whether that code should apply to the damage done by each DC pet, or to the aggregate damage done by all DC pets controlled by all players in the group
i didn't dig much into it, but it looks like `dire_pet_damage` will be incremented any time any DC pet attacks the mob (even if controlling player is not in group)