魔兽私服单机版WOTLK335的服务端是否允许在外域使用飞行技能
diff -r 2b0166ab9417 src/game/Spell.cpp--- a/src/game/Spell.cpp Tue Dec 30 01:50:43 2008 +0100
+++ b/src/game/Spell.cpp Tue Dec 30 15:21:59 2008 +0100
@@ -4151,9 +4151,33 @@
// not allow cast fly spells at old maps by players (all spells is self target)
if(m_caster->GetTypeId()==TYPEID_PLAYER)
{
- if( !((Player*)m_caster)->isGameMaster() &&
- GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530)
- return SPELL_FAILED_NOT_HERE;
+ if(!((Player*)m_caster)->isGameMaster())
+ {
+ uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId());
+ switch(v_map)
+ {
+ case 0:
+ case 1:
+ {
+ if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH))
+ return SPELL_FAILED_NOT_HERE;
+ } break;
+ case 530:
+ {
+ if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND))
+ return SPELL_FAILED_NOT_HERE;
+ } break;
+ default:
+ {
+ if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS))
+ return SPELL_FAILED_NOT_HERE;
+ } break;
+ }
+ }
}
break;
diff -r 2b0166ab9417 src/game/World.cpp
--- a/src/game/World.cpp Tue Dec 30 01:50:43 2008 +0100
+++ b/src/game/World.cpp Tue Dec 30 15:21:59 2008 +0100
@@ -515,6 +521,11 @@
}
///- Read other configuration items from the config file
+
+ ///- Do we allow flying mounts in Azeroth/Outland and others (others being instances, BGs, arenas)?
+ m_configs[CONFIG_FLYING_MOUNTS_AZEROTH] = sConfig.GetBoolDefault("FlyingMounts.Azeroth", false);
+ m_configs[CONFIG_FLYING_MOUNTS_OUTLAND] = sConfig.GetBoolDefault("FlyingMounts.Outland", true);
+ m_configs[CONFIG_FLYING_MOUNTS_OTHERS] = sConfig.GetBoolDefault("FlyingMounts.Others", false);
m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1);
if(m_configs[CONFIG_COMPRESSION] < 1 || m_configs[CONFIG_COMPRESSION] > 9)
diff -r 2b0166ab9417 src/game/World.h
--- a/src/game/World.h Tue Dec 30 01:50:43 2008 +0100
+++ b/src/game/World.h Tue Dec 30 15:21:59 2008 +0100
@@ -184,6 +184,10 @@
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER,
+ CONFIG_FLYING_MOUNTS_AZEROTH,
+ CONFIG_FLYING_MOUNTS_OUTLAND,
+ CONFIG_FLYING_MOUNTS_OTHERS,
+
CONFIG_MAX_WHO,
CONFIG_BG_START_MUSIC,
CONFIG_START_ALL_SPELLS,
diff -r 2b0166ab9417 src/trinitycore/trinitycore.conf.dist
--- a/src/trinitycore/trinitycore.conf.dist Tue Dec 30 01:50:43 2008 +0100
+++ b/src/trinitycore/trinitycore.conf.dist Tue Dec 30 15:21:59 2008 +0100
@@ -502,6 +502,21 @@
# Default: 0 (false)
# 1 (true)
#
+# FlyingMounts.Azeroth
+# Enable/disable flying mounts in Azeroth (map 0 and 1).
+# Default: 0 - off
+# 1 - on (may be crashy)
+#
+# FlyingMounts.Outland
+# Enable/disable flying mounts in Outland (map 530).
+# Default: 1 - on
+# 0 - off
+#
+# FlyingMounts.Others
+# Enable/disable flying mounts in other maps (instances, arenas, BGs, etc).
+# Default: 0 - off
+# 1 - on (may be crashy)
+#
# CastUnstuck
# Allow cast or not Unstuck spell at .start or client Help option use
# Default: 1 (true)
@@ -602,6 +622,9 @@
Battleground.CastDeserter = 1
Battleground.QueueAnnouncer.Enable = 1
Battleground.QueueAnnouncer.PlayerOnly = 0
+FlyingMounts.Azeroth = 0
+FlyingMounts.Outland = 1
+FlyingMounts.Others = 0
CastUnstuck = 1
Instance.IgnoreLevel = 0
Instance.IgnoreRaid = 0
|