aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2012-02-16 11:56:12 -0330
committerMalcrom <malcromdev@gmail.com>2012-02-16 11:56:12 -0330
commitf39724b5f3b265dd77cf662751aab3cd7df24a3d (patch)
tree5bae802e3f9c1d0fab8e9bdc35d64e78ec346e72 /src/server/scripts
parentbe5715bb60f4fb93d5b8082288ffcdd30649210d (diff)
parentba4d1c36f1b947f17ffc394afac11e9fb42d0b9b (diff)
Merge branch 'master' of git://github.com/TrinityCore/TrinityCore
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp2
-rw-r--r--src/server/scripts/Outland/blades_edge_mountains.cpp6
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp13
5 files changed, 18 insertions, 15 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 73e6b0ac8a5..3de1181f764 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1042,7 +1042,7 @@ public:
return true;
}
- static bool HandleDebugLoSCommand(ChatHandler* handler, char const* args)
+ static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
{
if (Unit* unit = handler->getSelectedUnit())
handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index c1009963df0..242b2f2f0ea 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -308,7 +308,7 @@ struct boss_twin_baseAI : public ScriptedAI
void EnableDualWield(bool mode = true)
{
- SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : EQUIP_UNEQUIP, EQUIP_UNEQUIP);
+ SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
me->SetCanDualWield(mode);
me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK);
}
@@ -562,11 +562,13 @@ struct mob_unleashed_ballAI : public ScriptedAI
{
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
float y = y0;
- float x = float(urand(uint32(x0 - r), uint32(x0 + r)));
+ float x = frand(x0 - r, x0 + r);
+ float sq = pow(r, 2) - pow(x - x0, 2);
+ float rt = sqrtf(fabs(sq));
if (urand(0, 1))
- y = y0 + sqrt(pow(r, 2) - pow((x-x0), 2));
+ y = y0 + rt;
else
- y = y0 - sqrt(pow(r, 2) - pow((x-x0), 2));
+ y = y0 - rt;
me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
index 25cd292d390..a91951ca25e 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
@@ -289,7 +289,7 @@ class spell_trash_mob_glacial_strike : public SpellScriptLoader
{
if (GetTarget()->IsFullHealth())
{
- GetTarget()->RemoveAura(GetId(), AURA_REMOVE_BY_ENEMY_SPELL);
+ GetTarget()->RemoveAura(GetId(), 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
PreventDefaultAction();
}
}
diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
index 97ce9f45430..c9fdd0f65ff 100644
--- a/src/server/scripts/Outland/blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
@@ -739,7 +739,7 @@ class npc_simon_bunny : public CreatureScript
if (!listening)
return;
- uint8 pressedColor;
+ uint8 pressedColor = SIMON_MAX_COLORS;
if (type == clusterIds[SIMON_RED])
pressedColor = SIMON_RED;
@@ -974,7 +974,7 @@ class npc_simon_bunny : public CreatureScript
// Handles the spell rewards. The spells also have the QuestCompleteEffect, so quests credits are working.
void GiveRewardForLevel(uint8 level)
{
- uint32 rewSpell;
+ uint32 rewSpell = 0;
switch (level)
{
case 6:
@@ -989,8 +989,6 @@ class npc_simon_bunny : public CreatureScript
case 10:
rewSpell = SPELL_REWARD_BUFF_3;
break;
- default:
- rewSpell = 0;
}
if (rewSpell)
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 9899e50cd28..4529e7b049d 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1507,7 +1507,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
const LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID());
LfgDungeonSet::const_iterator itr = dungeons.begin();
-
+
if (itr == dungeons.end())
{
Remove(AURA_REMOVE_BY_DEFAULT);
@@ -1521,7 +1521,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
if (group && group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
- if (dungeon->map == map->GetId() && dungeon->difficulty == map->GetDifficulty())
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon
@@ -1706,6 +1706,8 @@ class spell_gen_break_shield: public SpellScriptLoader
}
break;
}
+ default:
+ break;
}
}
@@ -1794,6 +1796,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
{
case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION:
spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1;
+ break;
case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS:
spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5;
break;
@@ -1834,7 +1837,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
}
}
- void HandleChargeEffect(SpellEffIndex effIndex)
+ void HandleChargeEffect(SpellEffIndex /*effIndex*/)
{
uint32 spellId;
@@ -1908,7 +1911,7 @@ class spell_gen_defend : public SpellScriptLoader
void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
- if (Unit* caster = GetCaster())
+ if (GetCaster())
{
Unit* target = GetTarget();
@@ -1989,7 +1992,7 @@ class spell_gen_tournament_duel : public SpellScriptLoader
return true;
}
- void HandleScriptEffect(SpellEffIndex effIndex)
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* rider = GetCaster()->GetCharmer())
{