I don't often post for help here, but I've lost all my hope and for what is probably a seriously easy fix, and I have nowhere else to turn, so I choose the best minds I can think of.
Here's the situation.. I am working on a server where I need a haste cap of 1577 where then, and only then is your attack speed 0.00/0.00. I've been through the player.cpp many, many times and I am currently working with these values:
Code:
SetBaseAttackTime(MELEE, (uint32)((float) speed / (m_attack_speed[ MOD_MELEE ] * (0.00f + CalcRating(PLAYER_RATING_MODIFIER_MELEE_HASTE) / 38.61f))));
weap = GetItemInterface()->GetInventoryItem(EQUIPMENT_SLOT_OFFHAND);
if(weap != NULL && weap->GetProto()->Class == ITEM_CLASS_WEAPON)
{
speed = weap->GetProto()->Delay;
SetBaseAttackTime(OFFHAND,
(uint32)((float) speed / (m_attack_speed[ MOD_MELEE ] * (0.00f + CalcRating(PLAYER_RATING_MODIFIER_MELEE_HASTE) / 38.61f))));
}
weap = GetItemInterface()->GetInventoryItem(EQUIPMENT_SLOT_RANGED);
if(weap != NULL)
{
speed = weap->GetProto()->Delay;
SetBaseAttackTime(RANGED,
(uint32)((float) speed / (m_attack_speed[ MOD_RANGED ] * (0.00f + CalcRating(PLAYER_RATING_MODIFIER_RANGED_HASTE) / 38.61f))));
}
}
-- and --
Code:
// Spell haste rating float haste = 0.00f + CalcRating(PLAYER_RATING_MODIFIER_SPELL_HASTE) / 38.61f;
if(haste != SpellHasteRatingBonus)
{
float value = GetCastSpeedMod() * SpellHasteRatingBonus / haste; // remove previous mod and apply current
SetCastSpeedMod(value);
SpellHasteRatingBonus = haste; // keep value for next run
}
If someone could point me in the right direction for this, I would be incredibly happy, and of course the rep will always be given for any assistance. It's beginning to bother me that I cannot figure this out, after I've looked for what feels like forever. Thank you in advance.