mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Add a config option for .die command behavior
--HG-- branch : trunk
This commit is contained in:
@@ -4223,8 +4223,11 @@ bool ChatHandler::HandleDieCommand(const char* /*args*/)
|
||||
|
||||
if( target->isAlive() )
|
||||
{
|
||||
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
if(sWorld.getConfig(CONFIG_DIE_COMMAND_MODE))
|
||||
m_session->GetPlayer()->Kill(target);
|
||||
else
|
||||
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -990,6 +990,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_configs[CONFIG_DEATH_BONES_WORLD] = sConfig.GetBoolDefault("Death.Bones.World", true);
|
||||
m_configs[CONFIG_DEATH_BONES_BG_OR_ARENA] = sConfig.GetBoolDefault("Death.Bones.BattlegroundOrArena", true);
|
||||
|
||||
m_configs[CONFIG_DIE_COMMAND_MODE] = sConfig.GetBoolDefault("Die.Command.Mode", true);
|
||||
|
||||
m_configs[CONFIG_THREAT_RADIUS] = sConfig.GetIntDefault("ThreatRadius", 60);
|
||||
|
||||
// always use declined names in the russian client
|
||||
|
||||
@@ -199,6 +199,7 @@ enum WorldConfigs
|
||||
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE,
|
||||
CONFIG_DEATH_BONES_WORLD,
|
||||
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
||||
CONFIG_DIE_COMMAND_MODE,
|
||||
CONFIG_THREAT_RADIUS,
|
||||
CONFIG_INSTANT_LOGOUT,
|
||||
CONFIG_DISABLE_BREATHING,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##########################################
|
||||
# Trinity Core worldd configuration file #
|
||||
##########################################
|
||||
ConfVersion=2009081702
|
||||
ConfVersion=2009082013
|
||||
|
||||
###################################################################################################################
|
||||
# CONNECTIONS AND DIRECTORIES
|
||||
@@ -1295,6 +1295,13 @@ Visibility.Distance.Grey.Object = 10
|
||||
# Default: 1 (enabled)
|
||||
# 0 (disabled)
|
||||
#
|
||||
# Die.Command.Mode
|
||||
# Switch between two possible .die modes, where mode 1 kills
|
||||
# and does not trigger anything such as loot, and mode 0 does
|
||||
# damage and does trigger things such as loot
|
||||
# Default: 1
|
||||
# 0
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
Rate.Health = 1
|
||||
@@ -1356,6 +1363,7 @@ Death.CorpseReclaimDelay.PvP = 1
|
||||
Death.CorpseReclaimDelay.PvE = 0
|
||||
Death.Bones.World = 1
|
||||
Death.Bones.BattlegroundOrArena = 1
|
||||
Die.Command.Mode = 1
|
||||
|
||||
###################################################################################################################
|
||||
# AUTO BROADCAST
|
||||
|
||||
Reference in New Issue
Block a user