Advertisement
Guest User

Untitled

a guest
May 15th, 2011
654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. diff -r be04526db5b8 -r edaf23fcc0d2 src/game/Spell.cpp
  2. --- a/src/game/Spell.cpp Sun Jan 18 17:46:33 2009 +0100
  3. +++ b/src/game/Spell.cpp Sun Jan 18 18:29:55 2009 +0100
  4. @@ -4168,9 +4168,29 @@
  5. // not allow cast fly spells at old maps by players (all spells is self target)
  6. if(m_caster->GetTypeId()==TYPEID_PLAYER)
  7. {
  8. - if( !((Player*)m_caster)->isGameMaster() &&
  9. - GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530)
  10. - return SPELL_FAILED_NOT_HERE;
  11. + if(!((Player*)m_caster)->isGameMaster())
  12. + {
  13. + uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId());
  14. + switch(v_map)
  15. + {
  16. + case 0:
  17. + case 1:
  18. + {
  19. + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH))
  20. + return SPELL_FAILED_NOT_HERE;
  21. + } break;
  22. + case 530:
  23. + {
  24. + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND))
  25. + return SPELL_FAILED_NOT_HERE;
  26. + } break;
  27. + default:
  28. + {
  29. + if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS))
  30. + return SPELL_FAILED_NOT_HERE;
  31. + } break;
  32. + }
  33. + }
  34. }
  35.  
  36. break;
  37. diff -r be04526db5b8 -r edaf23fcc0d2 src/game/World.cpp
  38. --- a/src/game/World.cpp Sun Jan 18 17:46:33 2009 +0100
  39. +++ b/src/game/World.cpp Sun Jan 18 18:29:55 2009 +0100
  40. @@ -526,6 +526,11 @@
  41.  
  42. ///- Read other configuration items from the config file
  43.  
  44. + ///- Do we allow flying mounts in Azeroth/Outland and others (others being instances, BGs, arenas)?
  45. + m_configs[CONFIG_FLYING_MOUNTS_AZEROTH] = sConfig.GetBoolDefault("FlyingMounts.Azeroth", false);
  46. + m_configs[CONFIG_FLYING_MOUNTS_OUTLAND] = sConfig.GetBoolDefault("FlyingMounts.Outland", true);
  47. + m_configs[CONFIG_FLYING_MOUNTS_OTHERS] = sConfig.GetBoolDefault("FlyingMounts.Others", false);
  48. +
  49. m_configs[CONFIG_COMPRESSION] = sConfig.GetIntDefault("Compression", 1);
  50. if(m_configs[CONFIG_COMPRESSION] < 1 || m_configs[CONFIG_COMPRESSION] > 9)
  51. {
  52. diff -r be04526db5b8 -r edaf23fcc0d2 src/game/World.h
  53. --- a/src/game/World.h Sun Jan 18 17:46:33 2009 +0100
  54. +++ b/src/game/World.h Sun Jan 18 18:29:55 2009 +0100
  55. @@ -184,6 +184,10 @@
  56. CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
  57. CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER,
  58.  
  59. + CONFIG_FLYING_MOUNTS_AZEROTH,
  60. + CONFIG_FLYING_MOUNTS_OUTLAND,
  61. + CONFIG_FLYING_MOUNTS_OTHERS,
  62. +
  63. CONFIG_MAX_WHO,
  64. CONFIG_BG_START_MUSIC,
  65. CONFIG_START_ALL_SPELLS,
  66. diff -r be04526db5b8 -r edaf23fcc0d2 src/trinitycore/trinitycore.conf.dist
  67. --- a/src/trinitycore/trinitycore.conf.dist Sun Jan 18 17:46:33 2009 +0100
  68. +++ b/src/trinitycore/trinitycore.conf.dist Sun Jan 18 18:29:55 2009 +0100
  69. @@ -502,6 +502,21 @@
  70. # Default: 0 (false)
  71. # 1 (true)
  72. #
  73. +# FlyingMounts.Azeroth
  74. +# Enable/disable flying mounts in Azeroth (map 0 and 1).
  75. +# Default: 0 - off
  76. +# 1 - on (may be crashy)
  77. +#
  78. +# FlyingMounts.Outland
  79. +# Enable/disable flying mounts in Outland (map 530).
  80. +# Default: 1 - on
  81. +# 0 - off
  82. +#
  83. +# FlyingMounts.Others
  84. +# Enable/disable flying mounts in other maps (instances, arenas, BGs, etc).
  85. +# Default: 0 - off
  86. +# 1 - on (may be crashy)
  87. +#
  88. # CastUnstuck
  89. # Allow cast or not Unstuck spell at .start or client Help option use
  90. # Default: 1 (true)
  91. @@ -607,6 +622,9 @@
  92. Battleground.CastDeserter = 1
  93. Battleground.QueueAnnouncer.Enable = 1
  94. Battleground.QueueAnnouncer.PlayerOnly = 0
  95. +FlyingMounts.Azeroth = 0
  96. +FlyingMounts.Outland = 1
  97. +FlyingMounts.Others = 0
  98. CastUnstuck = 1
  99. Instance.IgnoreLevel = 0
  100. Instance.IgnoreRaid = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement