diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-06-26 22:01:55 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-06-26 22:01:55 +0200 |
| commit | 74850abcfc9e18a665e7d6fa5942e5b7ccc813ca (patch) | |
| tree | 9caf6a6a63db9fd4b65895bfd9d4c54f98dd9be3 /src/server/game/Handlers/LootHandler.cpp | |
| parent | 224b5c08dfecd3cd9981fc89bb96ae0e38b68889 (diff) | |
Core/Loot: Skinning improvements
* Set skinnable flag only after all loot was taken
* Creatures are skinnable only once - after skinning, the player only has to loot the creature again if he did not take all skinning loot
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/LootHandler.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 2464a5385a4..b9c6f349ac3 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -81,7 +81,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData) { Creature* creature = GetPlayer()->GetMap()->GetCreature(lguid); - bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed); + bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->loot.loot_type == LOOT_PICKPOCKETING); if (!lootAllowed || !creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) { @@ -148,7 +148,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/) case HIGHGUID_VEHICLE: { Creature* creature = player->GetMap()->GetCreature(guid); - bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed); + bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->loot.loot_type == LOOT_PICKPOCKETING); if (lootAllowed && creature->IsWithinDistInMap(player, INTERACTION_DISTANCE)) { loot = &creature->loot; @@ -348,7 +348,7 @@ void WorldSession::DoLootRelease(uint64 lguid) { Creature* creature = GetPlayer()->GetMap()->GetCreature(lguid); - bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed); + bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->loot.loot_type == LOOT_PICKPOCKETING); if (!lootAllowed || !creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) return; @@ -356,9 +356,6 @@ void WorldSession::DoLootRelease(uint64 lguid) if (loot->isLooted()) { creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); - - if (loot->loot_type == LOOT_SKINNING) - creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // skip pickpocketing loot for speed, skinning timer reduction is no-op in fact if (!creature->IsAlive()) |
