mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7039] Implement mangosd.conf options Death.Bones.* 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.
This commit is contained in:
parent
1c5456324a
commit
7bae367084
8 changed files with 22 additions and 6 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include "Opcodes.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "MapInstanced.h"
|
||||
#include "World.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue