diff options
author | megamage <none@none> | 2009-01-06 13:50:42 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-06 13:50:42 -0600 |
commit | 5b2c61e95e3c46fbeaef53f4651c8198b68e4d3d (patch) | |
tree | b2be63e5404d1b6ed35dde6e7ce11957c4cb85a6 /src/game/ObjectAccessor.cpp | |
parent | 8b876b08173f92062af449bccfb430b2b2f28bac (diff) |
*Mangos [7039] Implement mangosd.conf options Death.Bones. By VladimirMangos.
*for disable bones creating from corpse in world zones or in arena/bg.
*Note: in case apply insignia bones still created as required for looting.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r-- | src/game/ObjectAccessor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 45429824b9c..872cf8280f5 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -38,6 +38,7 @@ #include "Opcodes.h" #include "ObjectDefines.h" #include "MapInstanced.h" +#include "World.h" #include <cmath> @@ -432,7 +433,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) @@ -458,7 +459,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; |