diff options
author | kandera <kanderacutie@hotmail.com> | 2012-03-14 14:05:39 -0300 |
---|---|---|
committer | kandera <kanderacutie@hotmail.com> | 2012-03-14 14:05:39 -0300 |
commit | b02a012b4784e2073593a75315616e093327e738 (patch) | |
tree | fd12e3bab9924a6447ee45e771e01ecbceedd6a2 /src | |
parent | fedb27b601553ef7837ff3d15980493f827fb38f (diff) |
Core/SpellScripts: fix crash caused my spell_gen_vehicle_scaling. closes #5703 (thx vincent-michael)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index f2a48b0f9d2..929206dec05 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1312,6 +1312,11 @@ class spell_gen_launch : public SpellScriptLoader } }; +enum VehicleScaling +{ + SPELL_GEAR_SCALING = 66668, +}; + class spell_gen_vehicle_scaling : public SpellScriptLoader { public: @@ -1323,7 +1328,7 @@ class spell_gen_vehicle_scaling : public SpellScriptLoader bool Load() { - return GetCaster()->GetTypeId() == TYPEID_PLAYER; + return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER; } void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) @@ -1335,7 +1340,7 @@ class spell_gen_vehicle_scaling : public SpellScriptLoader // TODO: Reserach coeffs for different vehicles switch (GetId()) { - case 66668: + case SPELL_GEAR_SCALING: factor = 1.0f; baseItemLevel = 205; break; |