mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge commit 'origin/master' into 303
Conflicts: src/game/SpellEffects.cpp src/game/World.cpp
This commit is contained in:
commit
cffc766fb6
31 changed files with 415 additions and 168 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue