[9934] Skinning related fixes

* Show skinning tooltip only after creature loot
  (when creature can be explcitly skinned).
* Allow reopen skinning loot if still have not looted items.
This commit is contained in:
VladimirMangos 2010-05-19 14:40:20 +04:00
parent cad8693819
commit d4f1b510ae
7 changed files with 52 additions and 19 deletions

View file

@ -7886,8 +7886,16 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
// possible only if creature->lootForBody && loot->empty() at spell cast check
if (loot_type == LOOT_SKINNING)
{
loot->clear();
loot->FillLoot(creature->GetCreatureInfo()->SkinLootId, LootTemplates_Skinning, this, false);
if (!creature->lootForSkin)
{
creature->lootForSkin = true;
loot->clear();
loot->FillLoot(creature->GetCreatureInfo()->SkinLootId, LootTemplates_Skinning, this, false);
// let reopen skinning loot if will closed.
if (!loot->empty())
creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
}
// set group rights only for loot_type != LOOT_SKINNING
else