diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index 91baf42..953144b 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -30,6 +30,7 @@ #include "Group.h" #include "World.h" #include "Util.h" +#include "ObjectAccessor.h" void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data ) { @@ -76,6 +77,16 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data ) } loot = &bones->loot; } + else if (IS_CORPSE_GUID(lguid)) + { + Corpse *bones = player->GetMap()->GetCorpse(lguid); + if (!bones) + { + player->SendLootRelease(lguid); + return; + } + loot = &bones->loot; + } else { Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lguid); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8f698af..b9d6d10 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -4329,7 +4329,7 @@ void Player::CreateCorpse() flags |= CORPSE_FLAG_HIDE_HELM; if(HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK)) flags |= CORPSE_FLAG_HIDE_CLOAK; - if(InBattleGround() && !InArena()) +// if(InBattleGround() && !InArena()) // commented for playerloot patch flags |= CORPSE_FLAG_LOOTABLE; // to be able to remove insignia corpse->SetUInt32Value( CORPSE_FIELD_FLAGS, flags ); @@ -7501,8 +7501,8 @@ bool Player::CheckAmmoCompatibility(const ItemPrototype *ammo_proto) const Called by remove insignia spell effect */ void Player::RemovedInsignia(Player* looterPlr) { - if (!GetBattleGroundId()) - return; +// if (!GetBattleGroundId()) because we want lootable players everywhere +// return; // If not released spirit, do it ! if(m_deathTimer > 0) @@ -7639,7 +7639,8 @@ void Player::SendLoot(uint64 guid, LootType loot_type) { bones->lootForBody = true; uint32 pLevel = bones->loot.gold; - bones->loot.clear(); + bones->loot.clear(); + loot->FillLoot(88888, LootTemplates_Creature, this, true); // for playerloot patch - 88888 is the id in creature_template if (GetBattleGround()->GetTypeID() == BATTLEGROUND_AV) loot->FillLoot(0, LootTemplates_Creature, this, false); // It may need a better formula