From dfb5ea40f3d4c63cc825d938b763732509aa1a9d Mon Sep 17 00:00:00 2001 From: sanctum32 Date: Mon, 21 Oct 2013 17:05:44 +0300 Subject: [PATCH] [12707] Fixed compilation error, thanks @Salja2012 and @mAd-DaWg for pointing --- src/game/SharedDefines.h | 23 ++++++++++++++--------- src/game/SpellEffects.cpp | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 698f0c1b4..b56c91231 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -164,10 +164,17 @@ enum Powers #define INVALID_POWER_INDEX 10000 #define INVALID_POWER MAX_POWERS +/** + * The different spell schools that are available, used in both damage calculation + * and spell casting to decide what should be affected, the SPELL_SCHOOL_NORMAL + * is the armor, others should be self explanatory. + * + * Note that these are the values to use for changing ie, the armor via a + * Modifier, and it is the Modifier::m_miscValue that should be set. + */ enum SpellSchools { - /// Physical, Armor - SPELL_SCHOOL_NORMAL = 0, + SPELL_SCHOOL_NORMAL = 0, // Physical, Armor SPELL_SCHOOL_HOLY = 1, SPELL_SCHOOL_FIRE = 2, SPELL_SCHOOL_NATURE = 3, @@ -1364,14 +1371,12 @@ enum SpellImmunity * The different types of attacks you can do with * weapons */ -enum WeaponAttackType +enum WeaponAttackType // The different weapon attack-types { - ///Main-hand weapon - BASE_ATTACK = 0, - ///Off-hand weapon - OFF_ATTACK = 1, - ///Ranged weapon, bow/wand etc. - RANGED_ATTACK = 2 + + BASE_ATTACK = 0, // Main-hand weapon + OFF_ATTACK = 1, // Off-hand weapon + RANGED_ATTACK = 2 ///Ranged weapon, bow/wand etc. }; #define MAX_ATTACK 3 diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 933cffbec..53d51ddd5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -10366,7 +10366,7 @@ void Spell::EffectBind(SpellEffectEntry const* effect) Player* player = (Player*)unitTarget; - uint32 area_id = m_spellInfo->EffectMiscValue[eff_idx]; + uint32 area_id = uint32(effect->EffectMiscValue); WorldLocation loc; if (effect->EffectImplicitTargetA == TARGET_TABLE_X_Y_Z_COORDINATES || effect->EffectImplicitTargetB == TARGET_TABLE_X_Y_Z_COORDINATES) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a6348d75e..6d58f43a7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12706" + #define REVISION_NR "12707" #endif // __REVISION_NR_H__