Jump to content

Antonio593

Members
  • Posts

    2
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Antonio593

  1. The problem is that Mail heirloom armor is supposed to downgrade to Leather for Hunter/Shaman and Plate Mail downgrades to Mail for Paladins and Warriors. My code below accomplishes just that. My mangos version is 8407, but nothing has changed in this area recently as far as I can tell. Now, I have no idea how hacky or efficient this code is and would appreciate any help in improving it. Especially the part where I check to see if it's a heirloom item. Is there a better way to check? (I just copied the part from another section.) in player.cpp @@ -10128,20 +10128,31 @@ uint8 Player::CanUseItem( Item *pItem, bool not_loading ) const return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM; if (pItem->GetSkill() != 0) { if (GetSkillValue( pItem->GetSkill() ) == 0) - return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + { + ScalingStatDistributionEntry const *ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; + if (ssd) //This line and above checks to see if it's an heirloom item in a weird way + { + //Heirlooms: Mail downgrades to leather and Plate Mail to Mail for certain classes only. + if (pItem->GetSkill() == SKILL_MAIL && (getClass() == CLASS_HUNTER || getClass() == CLASS_SHAMAN)) + return EQUIP_ERR_OK; + if (pItem->GetSkill() == SKILL_PLATE_MAIL && (getClass() == CLASS_PALADIN || getClass() == CLASS_WARRIOR)) + return EQUIP_ERR_OK; + } + return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; + } } if (pProto->RequiredSkill != 0) { if (GetSkillValue( pProto->RequiredSkill ) == 0)
  2. mangos 8449 changed the spell bonus functions, so it should now look like this. Probably don't need the brackets anymore, but left them in for now. This is in player.cpp break; } } + // Apply Spell Power from ScalingStatValue if set + if (ssv) + { + if (int32 spellbonus = ssv->getSpellBonus(proto->ScalingStatValue)) + { + ApplySpellPowerBonus(spellbonus, apply); + } + } + // If set ScalingStatValue armor get it or use item armor uint32 armor = proto->Armor; if (ssv) { if (uint32 ssvarmor = ssv->getArmorMod(proto->ScalingStatValue))
×
×
  • 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