Jump to content

Dedhal

Members
  • Posts

    12
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

About Dedhal

  • Birthday 01/01/1

Dedhal's Achievements

Member

Member (2/3)

0

Reputation

  1. [zero]Skinning fix ? Hi all ! I've found something on mangos zero, it appear that it's impossible to skin creatures who aren't critters, so, after a little search i've found this in the source: [quote]case SPELL_EFFECT_SKINNING: { if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT) { return SPELL_FAILED_BAD_TARGETS; } if (!m_targets.getUnitTarget()->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE)) { return SPELL_FAILED_TARGET_UNSKINNABLE; } Creature* creature = (Creature*)m_targets.getUnitTarget(); if (creature->GetCreatureType() != CREATURE_TYPE_CRITTER && (!creature->lootForBody || creature->lootForSkin || !creature->loot.empty())) { return SPELL_FAILED_TARGET_NOT_LOOTED; } uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill(); int32 skillValue = ((Player*)m_caster)->GetSkillValue(skill); int32 TargetLevel = m_targets.getUnitTarget()->getLevel(); int32 ReqValue = (skillValue < 100 ? (TargetLevel - 10) * 10 : TargetLevel * 5); if (ReqValue > skillValue) { return SPELL_FAILED_SKILL_NOT_HIGH_ENOUGH; } // chance for fail at orange skinning attempt if ((m_selfContainer && (*m_selfContainer) == this) && skillValue < sWorld.GetConfigMaxSkillValue() && (ReqValue < 0 ? 0 : ReqValue) > irand(skillValue - 25, skillValue + 37)) { return SPELL_FAILED_TRY_AGAIN; } break; }[/quote] That's in Spell.cpp, and i bet the error is here: [quote]Creature* creature = (Creature*)m_targets.getUnitTarget(); if (creature->GetCreatureType() != CREATURE_TYPE_CRITTER && (!creature->lootForBody || creature->lootForSkin || !creature->loot.empty())) { return SPELL_FAILED_TARGET_NOT_LOOTED; }[/quote] Because the player have always the message "you need to loot the mob before skin him" (don't know the exact error message in english but i hope u understand what i want to say) So, what's the correct value for this line ? Thx by advance
×
×
  • 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