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:
@@ -1402,7 +1402,7 @@ namespace Game.Spells
|
||||
Creature creatureTarget = unitTarget.ToCreature();
|
||||
if (creatureTarget)
|
||||
{
|
||||
if (!creatureTarget.GetCreatureTemplate().TypeFlags.HasAnyFlag(CreatureTypeFlags.CollideWithMissiles))
|
||||
if (!creatureTarget.GetCreatureDifficulty().TypeFlags.HasFlag(CreatureTypeFlags.CollideWithMissiles))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -5405,10 +5405,11 @@ namespace Game.Spells
|
||||
if (info.Item1.Type == PetType.Hunter)
|
||||
{
|
||||
CreatureTemplate creatureInfo = Global.ObjectMgr.GetCreatureTemplate(info.Item1.CreatureId);
|
||||
if (creatureInfo == null || !creatureInfo.IsTameable(playerCaster.CanTameExoticPets()))
|
||||
CreatureDifficulty creatureDifficulty = creatureInfo.GetDifficulty(Difficulty.None);
|
||||
if (creatureInfo == null || !creatureInfo.IsTameable(playerCaster.CanTameExoticPets(), creatureDifficulty))
|
||||
{
|
||||
// if problem in exotic pet
|
||||
if (creatureInfo != null && creatureInfo.IsTameable(true))
|
||||
if (creatureInfo != null && creatureInfo.IsTameable(true, creatureDifficulty))
|
||||
playerCaster.SendTameFailure(PetTameResult.CantControlExotic);
|
||||
else
|
||||
playerCaster.SendTameFailure(PetTameResult.NoPetAvailable);
|
||||
|
||||
@@ -1819,7 +1819,7 @@ namespace Game.Spells
|
||||
creature.StartPickPocketRefillTimer();
|
||||
|
||||
creature._loot = new Loot(creature.GetMap(), creature.GetGUID(), LootType.Pickpocketing, null);
|
||||
uint lootid = creature.GetCreatureTemplate().PickPocketId;
|
||||
uint lootid = creature.GetCreatureDifficulty().PickPocketLootID;
|
||||
if (lootid != 0)
|
||||
creature._loot.FillLoot(lootid, LootStorage.Pickpocketing, player, true);
|
||||
|
||||
@@ -3442,13 +3442,13 @@ namespace Game.Spells
|
||||
Creature creature = unitTarget.ToCreature();
|
||||
int targetLevel = (int)creature.GetLevelForTarget(m_caster);
|
||||
|
||||
SkillType skill = creature.GetCreatureTemplate().GetRequiredLootSkill();
|
||||
SkillType skill = creature.GetCreatureDifficulty().GetRequiredLootSkill();
|
||||
|
||||
creature.SetUnitFlag3(UnitFlags3.AlreadySkinned);
|
||||
creature.SetDynamicFlag(UnitDynFlags.Lootable);
|
||||
Loot loot = new(creature.GetMap(), creature.GetGUID(), LootType.Skinning, null);
|
||||
creature.m_personalLoot[player.GetGUID()] = loot;
|
||||
loot.FillLoot(creature.GetCreatureTemplate().SkinLootId, LootStorage.Skinning, player, true);
|
||||
loot.FillLoot(creature.GetCreatureDifficulty().SkinLootID, LootStorage.Skinning, player, true);
|
||||
player.SendLoot(loot);
|
||||
|
||||
if (!Global.SpellMgr.IsPartOfSkillLine(skill, m_spellInfo.Id))
|
||||
|
||||
@@ -1032,7 +1032,7 @@ namespace Game.Spells
|
||||
if (targetCreature == null)
|
||||
return SpellCastResult.BadTargets;
|
||||
|
||||
if (!targetCreature.CanHaveLoot() || !Loots.LootStorage.Pickpocketing.HaveLootFor(targetCreature.GetCreatureTemplate().PickPocketId))
|
||||
if (!targetCreature.CanHaveLoot() || !Loots.LootStorage.Pickpocketing.HaveLootFor(targetCreature.GetCreatureDifficulty().PickPocketLootID))
|
||||
return SpellCastResult.TargetNoPockets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user