[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
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now