Merge commit 'origin/master' into 303

Conflicts:
	src/game/SpellEffects.cpp
	src/game/World.cpp
This commit is contained in:
tomrus88 2008-11-01 08:10:24 +03:00
commit cffc766fb6
31 changed files with 415 additions and 168 deletions

View file

@ -3569,12 +3569,8 @@ uint8 Spell::CanCast(bool strict)
if (m_targets.getUnitTarget()->getLevel() > m_caster->getLevel())
return SPELL_FAILED_HIGHLEVEL;
CreatureInfo const *cinfo = ((Creature*)m_targets.getUnitTarget())->GetCreatureInfo();
if( cinfo->type != CREATURE_TYPE_BEAST )
return SPELL_FAILED_BAD_TARGETS;
// use SMSG_PET_TAME_FAILURE?
if( !(cinfo->flag1 & 1) || !(cinfo->family) )
if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ())
return SPELL_FAILED_BAD_TARGETS;
if(m_caster->GetPetGUID())
@ -3674,13 +3670,7 @@ uint8 Spell::CanCast(bool strict)
return SPELL_FAILED_TARGET_NOT_LOOTED;
}
uint32 skill;
if(creature->GetCreatureInfo()->flag1 & 256)
skill = SKILL_HERBALISM; // special case
else if(creature->GetCreatureInfo()->flag1 & 512)
skill = SKILL_MINING; // special case
else
skill = SKILL_SKINNING; // normal case
uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill();
int32 skillValue = ((Player*)m_caster)->GetSkillValue(skill);
int32 TargetLevel = m_targets.getUnitTarget()->getLevel();