Fix build (gcc) and fix warnings

This commit is contained in:
Spp committed 2012-02-22 09:15:57 +01:00
1 parent 6870ee5848
commit 1e246cb66c
12 files changed
+44 -19

No files matched your search

+4
View File
@@ -221,10 +221,12 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader
{
Unit* caster = GetCaster();
if (Unit* target = GetHitUnit())
{
if (urand(0, 99) < 15)
caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
else
caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
}
}
void Register()
@@ -1290,10 +1292,12 @@ class spell_item_nigh_invulnerability : public SpellScriptLoader
{
Unit* caster = GetCaster();
if (Item* castItem = GetCastItem())
{
if (roll_chance_i(86)) // Nigh-Invulnerability - success
caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, true, castItem);
else // Complete Vulnerability - backfire in 14% casts
caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, true, castItem);
}
}
void Register()