Jump to content

Recommended Posts

Posted

Hello, i'm new to MaNGOS (Use to use it along time ago but want it now) I came from ArcEmu and there dodge caps you can set to a certain %, can you do this with mangos if so how I have the core compiled, please and thank you !

Posted

edit void Player::UpdateDodgePercentage() to look like this:

void Player::UpdateDodgePercentage()
{
   // Dodge from agility
   float value = GetDodgeFromAgility();
   // Modify value from defense skill
   value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
   // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
   value += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
   // Dodge from rating
   value += GetRatingBonusValue(CR_DODGE);
   value = value < 0.0f ? 0.0f : value;

   if (value > 0.50f)
       value = 0.50f

   SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}

edit this to fit your needs:

if (value > 0.50f)

value = 0.50f

(0.50f = 50%)

Posted
edit void Player::UpdateDodgePercentage() to look like this:

void Player::UpdateDodgePercentage()
{
   // Dodge from agility
   float value = GetDodgeFromAgility();
   // Modify value from defense skill
   value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
   // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
   value += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
   // Dodge from rating
   value += GetRatingBonusValue(CR_DODGE);
   value = value < 0.0f ? 0.0f : value;

   if (value > 0.50f)
       value = 0.50f

   SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}

edit this to fit your needs:

if (value > 0.50f)

value = 0.50f

(0.50f = 50%)

where did you find this at player.cpp doesnt have it

Posted
void Player::UpdateDodgePercentage()
{
   const float dodge_cap[MAX_CLASSES] =
   {
        88.129021f,  // Warrior
        88.129021f,  // Paladin
       145.560408f,  // Hunter
       145.560408f,  // Rogue
       150.375940f,  // Priest
        88.129021f,  // DK
       145.560408f,  // Shaman
       150.375940f,  // Mage
       150.375940f,  // Warlock
         0.0f,       // ??
       116.890707f   // Druid
   };

   float diminishing = 0.0f, nondiminishing = 0.0f;
   // Dodge from agility
   GetDodgeFromAgility(diminishing, nondiminishing);
   // Modify value from defense skill (only bonus from defense rating diminishes)
   nondiminishing += (GetSkillValue(SKILL_DEFENSE) - GetMaxSkillValueForLevel()) * 0.04f;
   diminishing += (int32(GetRatingBonusValue(CR_DEFENSE_SKILL))) * 0.04f;
   // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
   nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
   // Dodge from rating
   diminishing += GetRatingBonusValue(CR_DODGE);
   // apply diminishing formula to diminishing dodge chance
   uint32 pclass = getClass()-1;
   float value = nondiminishing + (diminishing * dodge_cap[pclass] /
                                   (diminishing + dodge_cap[pclass] * m_diminishing_k[pclass]));
   value = value < 0.0f ? 0.0f : value;

   if (value > 0.5f)
       value = 0.5f

   SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}

Posted

nice ty, now whenever I put the compiled Mangosd.exe over my repacked one it says on creature_template


2012-04-07 10:10:38 Loading Creature templates...
2012-04-07 10:10:38 ERROR:Error in creature_template table, probably sql file format was updated (there should be 85 fields in sql).

Im using http://www.ac-web.org/forums/showthread.php?t=140641 but i have a compiled MaNGOS core I compile the mangosd.exe and override the old one any help on that xD?

whenever i load the old one it goes fine i can go into the server but when i do the above i cant

Posted

Repacks are not supported here.

But if you are already able to compile your own core from the sources, the remaining step is only to set up a database server and fill in the required content.

You can do it :)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use