diff --git a/src/game/GlobalEvents.cpp b/src/game/GlobalEvents.cpp index 74199e56c..2a03c05f8 100644 --- a/src/game/GlobalEvents.cpp +++ b/src/game/GlobalEvents.cpp @@ -53,7 +53,7 @@ static void CorpsesEraseCallBack(QueryResult *result, bool bones) { if(!ObjectAccessor::Instance().ConvertCorpseForPlayer(player_guid)) { - sLog.outDebug("Corpse %u not found in world. Delete from DB.",guidlow); + sLog.outDebug("Corpse %u not found in world or bones creating forbidden. Delete from DB.",guidlow); CharacterDatabase.PExecute("DELETE FROM corpse WHERE guid = '%u'",guidlow); } } diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index bab108695..53b6c245f 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -36,6 +36,7 @@ #include "Opcodes.h" #include "ObjectDefines.h" #include "MapInstanced.h" +#include "World.h" #include @@ -430,7 +431,7 @@ ObjectAccessor::AddCorpsesToGrid(GridPair const& gridpair,GridType& grid,Map* ma } Corpse* -ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid) +ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia) { Corpse *corpse = GetCorpseForPlayerGUID(player_guid); if(!corpse) @@ -456,7 +457,10 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid) Corpse *bones = NULL; // create the bones only if the map and the grid is loaded at the corpse's location - if(map && !map->IsRemovalGrid(corpse->GetPositionX(), corpse->GetPositionY())) + // ignore bones creating option in case insignia + if (map && (insignia || + (map->IsBattleGroundOrArena() ? sWorld.getConfig(CONFIG_DEATH_BONES_BG_OR_ARENA) : sWorld.getConfig(CONFIG_DEATH_BONES_WORLD))) && + !map->IsRemovalGrid(corpse->GetPositionX(), corpse->GetPositionY())) { // Create bones, don't change Corpse bones = new Corpse; diff --git a/src/game/ObjectAccessor.h b/src/game/ObjectAccessor.h index 0c2a55079..eb09f6385 100644 --- a/src/game/ObjectAccessor.h +++ b/src/game/ObjectAccessor.h @@ -192,7 +192,7 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton