aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectAccessor.cpp
diff options
context:
space:
mode:
authorDisassembler <none@none>2009-05-04 16:54:35 +0200
committerDisassembler <none@none>2009-05-04 16:54:35 +0200
commit92cfbad2b2f1bcf4e3cbf68b508d62e595eca566 (patch)
tree2afc13b0bafa7adcdd5f3756e664e6b62595acd2 /src/game/ObjectAccessor.cpp
parent2797d699363396c215cf5ecd603f7fae56cbc39d (diff)
Backport from TC2 (resp. Mangos) conf options Death.Bones.* for disable bones
creating from corpse in world zones or in arena/bg. --HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r--src/game/ObjectAccessor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index 0608408cf5e..2182af0b751 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>
@@ -423,7 +424,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)
@@ -449,7 +450,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;