Core/Creatures: Move creature difficulty specific data from creature_template table to creature_template_difficulty
Port From (https://github.com/TrinityCore/TrinityCore/commit/06d0b16f158e8793860d9edd11b990f20b1d0dac)
This commit is contained in:
@@ -454,7 +454,7 @@ namespace Scripts.Spells.Hunter
|
||||
return SpellCastResult.Highlevel;
|
||||
|
||||
// use SMSG_PET_TAME_FAILURE?
|
||||
if (!target.GetCreatureTemplate().IsTameable(caster.CanTameExoticPets()))
|
||||
if (!target.GetCreatureTemplate().IsTameable(caster.CanTameExoticPets(), target.GetCreatureDifficulty()))
|
||||
return SpellCastResult.BadTargets;
|
||||
|
||||
PetStable petStable = caster.GetPetStable();
|
||||
|
||||
@@ -7,7 +7,6 @@ using Game.BattleGrounds;
|
||||
using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using Game.Loots;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Scripting;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
@@ -1322,11 +1321,12 @@ namespace Scripts.Spells.Items
|
||||
{
|
||||
Player player = GetCaster().ToPlayer();
|
||||
Creature creature = GetTarget().ToCreature();
|
||||
CreatureDifficulty creatureDifficulty = creature.GetCreatureDifficulty();
|
||||
// missing lootid has been reported on startup - just return
|
||||
if (creature.GetCreatureTemplate().SkinLootId == 0)
|
||||
if (creatureDifficulty.SkinLootID == 0)
|
||||
return;
|
||||
|
||||
player.AutoStoreLoot(creature.GetCreatureTemplate().SkinLootId, LootStorage.Skinning, ItemContext.None, true);
|
||||
player.AutoStoreLoot(creatureDifficulty.SkinLootID, LootStorage.Skinning, ItemContext.None, true);
|
||||
creature.DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user