aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-11-09 13:13:45 +0100
committerSpp <spp@jorge.gr>2012-11-09 13:13:45 +0100
commit333b8e5159ada2f1b8cbfd1dd8eb9072754477d7 (patch)
treeb73ed1ddf75c9cb691178f0fc409a5e86d3797ce /src/server/scripts
parent90c95806a7bd54c8011e08ed74ff00198d206278 (diff)
Core/Build: Enable Clang PCH support and OS X specific features
Core: Fix warnings here and there
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/CMakeLists.txt28
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp4
-rw-r--r--src/server/scripts/Northrend/wintergrasp.cpp2
4 files changed, 14 insertions, 22 deletions
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index 59dfc0f990f..8e636ee1208 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -9,18 +9,11 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Enable precompiled headers when using the GCC compiler.
-if( USE_SCRIPTPCH )
- include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- )
-endif()
-if( USE_SCRIPTPCH AND MSVC )
- set(scripts_STAT_SRCS
- PrecompiledHeaders/ScriptPCH.cpp
- PrecompiledHeaders/ScriptPCH.h
- )
-endif()
+if (USE_SCRIPTPCH)
+ set(scripts_STAT_PCH_HDR PrecompiledHeaders/ScriptPCH.h)
+ set(scripts_STAT_PCH_SRC PrecompiledHeaders/ScriptPCH.cpp)
+endif ()
message(STATUS "SCRIPT PREPARATIONS")
include(Spells/CMakeLists.txt)
@@ -148,15 +141,14 @@ include_directories(
${MYSQL_INCLUDE_DIR}
)
-add_library(scripts STATIC ${scripts_STAT_SRCS})
+add_library(scripts STATIC
+ ${scripts_STAT_SRCS}
+ ${scripts_STAT_PCH_SRC}
+)
add_dependencies(scripts revision.h)
# Generate precompiled header
-if( USE_SCRIPTPCH )
- if(CMAKE_COMPILER_IS_GNUCXX)
- add_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH.h)
- elseif(MSVC)
- add_native_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH)
- endif()
+if (USE_SCRIPTPCH)
+ add_cxx_pch(scripts ${scripts_STAT_PCH_HDR} ${scripts_STAT_PCH_SRC})
endif()
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index e3cd185e4a3..10a18c3ed36 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -941,7 +941,7 @@ public:
{
wpCreature->SetDisplayId(target->GetDisplayId());
wpCreature->SetObjectScale(0.5f);
- wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
+ wpCreature->SetLevel(std::min<uint32>(point, STRONG_MAX_LEVEL));
}
}
while (result->NextRow());
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 82739c0026a..1d0b0fd6ee6 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1375,7 +1375,7 @@ class spell_halion_combustion_consumption : public SpellScriptLoader
public:
spell_halion_combustion_consumption_AuraScript(uint32 spellID) : AuraScript(), _markSpell(spellID) { }
- bool Validate(SpellEntry const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(_markSpell))
return false;
@@ -1434,7 +1434,7 @@ class spell_halion_marks : public SpellScriptLoader
spell_halion_marks_AuraScript(uint32 summonSpell, uint32 removeSpell) : AuraScript(),
_summonSpellId(summonSpell), _removeSpellId(removeSpell) { }
- bool Validate(SpellEntry const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(_summonSpellId))
return false;
diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp
index d4a3f83ab70..b7901f1a44a 100644
--- a/src/server/scripts/Northrend/wintergrasp.cpp
+++ b/src/server/scripts/Northrend/wintergrasp.cpp
@@ -560,7 +560,7 @@ public:
if (Battlefield* wg = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
if (Player* target = GetExplTargetUnit()->ToPlayer())
// check if we are in Wintergrasp at all, SotA uses same teleport spells
- if ((target->GetZoneId() == 4197) && target->GetTeamId() != wg->GetDefenderTeam() || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER))
+ if ((target->GetZoneId() == 4197 && target->GetTeamId() != wg->GetDefenderTeam()) || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER))
return SPELL_FAILED_BAD_TARGETS;
return SPELL_CAST_OK;
}