diff options
| author | Meji <alvaro.megias@outlook.com> | 2023-05-29 00:01:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-29 00:01:23 +0200 |
| commit | 06d0b16f158e8793860d9edd11b990f20b1d0dac (patch) | |
| tree | 0ecc06eb8e5b9ba20c615030be816ffc59705f52 /src/server/scripts/Spells | |
| parent | 526b16fea41fb69a302fdebe8a727e175949f04b (diff) | |
Core/Creatures: Move creature difficulty specific data from creature_template table to creature_template_difficulty (#28931)
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 2da3be2e4b0..bd24a8fbf5c 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -548,7 +548,7 @@ class spell_hun_tame_beast : public SpellScript return SPELL_FAILED_HIGHLEVEL; // use SMSG_PET_TAME_FAILURE? - if (!target->GetCreatureTemplate()->IsTameable(caster->CanTameExoticPets())) + if (!target->GetCreatureTemplate()->IsTameable(caster->CanTameExoticPets(), target->GetCreatureDifficulty())) return SPELL_FAILED_BAD_TARGETS; if (PetStable const* petStable = caster->GetPetStable()) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 6c16d72b086..5a305ef0102 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1074,11 +1074,12 @@ class spell_item_extract_gas : public AuraScript { Player* player = GetCaster()->ToPlayer(); Creature* creature = GetTarget()->ToCreature(); + CreatureDifficulty const* creatureDifficulty = creature->GetCreatureDifficulty(); // missing lootid has been reported on startup - just return - if (!creature->GetCreatureTemplate()->SkinLootId) + if (!creatureDifficulty->SkinLootID) return; - player->AutoStoreLoot(creature->GetCreatureTemplate()->SkinLootId, LootTemplates_Skinning, ItemContext::NONE, true); + player->AutoStoreLoot(creatureDifficulty->SkinLootID, LootTemplates_Skinning, ItemContext::NONE, true); creature->DespawnOrUnsummon(); } } |
