Changeset 229 for trunk/src/game/SpellAuras.cpp
- Timestamp:
- 11/19/08 13:48:34 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/SpellAuras.cpp
r213 r229 216 216 &Aura::HandleShieldBlockValue, //158 SPELL_AURA_MOD_SHIELD_BLOCKVALUE 217 217 &Aura::HandleNoImmediateEffect, //159 SPELL_AURA_NO_PVP_CREDIT only for Honorless Target spell 218 &Aura::HandleNoImmediateEffect, //160 SPELL_AURA_MOD_AOE_AVOIDANCE implemen ded in Unit::MagicSpellHitResult218 &Aura::HandleNoImmediateEffect, //160 SPELL_AURA_MOD_AOE_AVOIDANCE implemented in Unit::MagicSpellHitResult 219 219 &Aura::HandleNoImmediateEffect, //161 SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT 220 220 &Aura::HandleAuraPowerBurn, //162 SPELL_AURA_POWER_BURN_MANA … … 230 230 &Aura::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK 231 231 &Aura::HandleUnused, //173 SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell 232 &Aura::HandleModSpellDamagePercentFromStat, //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT implemented in Unit::SpellBaseDamageBonus (by def eult intelect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT)232 &Aura::HandleModSpellDamagePercentFromStat, //174 SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT implemented in Unit::SpellBaseDamageBonus (by default intellect, dependent from SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT) 233 233 &Aura::HandleModSpellHealingPercentFromStat, //175 SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT implemented in Unit::SpellBaseHealingBonus 234 234 &Aura::HandleSpiritOfRedemption, //176 SPELL_AURA_SPIRIT_OF_REDEMPTION only for Spirit of Redemption spell, die at aura end … … 243 243 &Aura::HandleNoImmediateEffect, //185 SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE implemented in Unit::RollMeleeOutcomeAgainst 244 244 &Aura::HandleNoImmediateEffect, //186 SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE implemented in Unit::MagicSpellHitResult 245 &Aura::HandleNoImmediateEffect, //187 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE implemen ded in Unit::GetUnitCriticalChance245 &Aura::HandleNoImmediateEffect, //187 SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE implemented in Unit::GetUnitCriticalChance 246 246 &Aura::HandleNoImmediateEffect, //188 SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_CHANCE implemented in Unit::GetUnitCriticalChance 247 247 &Aura::HandleModRating, //189 SPELL_AURA_MOD_RATING … … 1055 1055 } 1056 1056 } 1057 else if(sameaura) // decrease count for spell, only for same aura effect, or this spell auras in remove proc cess.1057 else if(sameaura) // decrease count for spell, only for same aura effect, or this spell auras in remove process. 1058 1058 UpdateSlotCounterAndDuration(false); 1059 1059 } … … 1205 1205 uint64 originalCasterGUID = GetCasterGUID(); 1206 1206 1207 SpellEntry const *trigg redSpellInfo = sSpellStore.LookupEntry(trigger_spell_id);1207 SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 1208 1208 SpellEntry const *auraSpellInfo = GetSpellProto(); 1209 1209 uint32 auraId = auraSpellInfo->Id; 1210 1210 1211 1211 // specific code for cases with no trigger spell provided in field 1212 if (trigg redSpellInfo == NULL)1212 if (triggeredSpellInfo == NULL) 1213 1213 { 1214 1214 switch(auraSpellInfo->SpellFamilyName) … … 1218 1218 switch(auraId) 1219 1219 { 1220 // Firestone Passive (1-5 ran gs)1220 // Firestone Passive (1-5 ranks) 1221 1221 case 758: 1222 1222 case 17945: … … 1252 1252 // // Polymorphic Ray 1253 1253 // case 6965: break; 1254 // // Fire Nova (1-7 Rangs)1254 // // Fire Nova (1-7 ranks) 1255 1255 // case 8350: 1256 1256 // case 8508: … … 1824 1824 } 1825 1825 // Reget trigger spell proto 1826 trigg redSpellInfo = sSpellStore.LookupEntry(trigger_spell_id);1827 if(trigg redSpellInfo == NULL)1826 triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); 1827 if(triggeredSpellInfo == NULL) 1828 1828 { 1829 1829 sLog.outError("Aura::TriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",GetId(),GetEffIndex()); … … 1833 1833 else 1834 1834 { 1835 // Spell exist but require c ostum code1835 // Spell exist but require custom code 1836 1836 switch(auraId) 1837 1837 { … … 1843 1843 // 1) target show casting at each triggered cast: target don't must show casting animation for any triggered spell 1844 1844 // but must show affect apply like item casting 1845 // 2) maybe aura must be replace by new with accumulative stat mods inste ed stacking1845 // 2) maybe aura must be replace by new with accumulative stat mods instead stacking 1846 1846 1847 1847 // prevent cast by triggered auras … … 1850 1850 1851 1851 // stop triggering after each affected stats lost > 90 1852 int32 intel ectLoss = 0;1852 int32 intellectLoss = 0; 1853 1853 int32 spiritLoss = 0; 1854 1854 … … 1860 1860 switch((*i)->GetModifier()->m_miscvalue) 1861 1861 { 1862 case STAT_INTELLECT: intel ectLoss += (*i)->GetModifier()->m_amount; break;1862 case STAT_INTELLECT: intellectLoss += (*i)->GetModifier()->m_amount; break; 1863 1863 case STAT_SPIRIT: spiritLoss += (*i)->GetModifier()->m_amount; break; 1864 1864 default: break; … … 1867 1867 } 1868 1868 1869 if(intel ectLoss <= -90 && spiritLoss <= -90)1869 if(intellectLoss <= -90 && spiritLoss <= -90) 1870 1870 return; 1871 1871 … … 1882 1882 } 1883 1883 } 1884 m_target->CastSpell(target, trigg redSpellInfo, true, 0, this, originalCasterGUID);1884 m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID); 1885 1885 /*// All ok cast by default case 1886 Spell *spell = new Spell(m_target, trigg redSpellInfo, true, originalCasterGUID );1886 Spell *spell = new Spell(m_target, triggeredSpellInfo, true, originalCasterGUID ); 1887 1887 1888 1888 SpellCastTargets targets; … … 2009 2009 if(GetId()==45934) 2010 2010 { 2011 // Kill target if dispel ed2011 // Kill target if dispelled 2012 2012 if (m_removeMode==AURA_REMOVE_BY_DISPEL) 2013 2013 m_target->DealDamage(m_target, m_target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); … … 2566 2566 else 2567 2567 { 2568 m_target->SetDisplayId(m_target->GetNativeDisplayId()); 2568 if(modelid > 0) 2569 m_target->SetDisplayId(m_target->GetNativeDisplayId()); 2569 2570 m_target->SetByteValue(UNIT_FIELD_BYTES_2, 3, FORM_NONE); 2570 2571 if(m_target->getClass() == CLASS_DRUID) … … 2717 2718 for(Unit::AuraList::const_iterator i = otherTransforms.begin();i != otherTransforms.end(); ++i) 2718 2719 { 2719 // negative auras are prefer ed2720 // negative auras are preferred 2720 2721 if(!IsPositiveSpell((*i)->GetSpellProto()->Id)) 2721 2722 { … … 3117 3118 return; 3118 3119 3119 // main-hand attack speed already set to special value for feral form already and don't must ch nage and reset at remove.3120 // main-hand attack speed already set to special value for feral form already and don't must change and reset at remove. 3120 3121 if (((Player *)m_target)->IsInFeralForm()) 3121 3122 return; … … 3439 3440 { 3440 3441 uint32 state = currentSpell->getState(); 3441 // Stop spells on prep ere or casting state3442 // Stop spells on prepare or casting state 3442 3443 if ( state == SPELL_STATE_PREPARING || state == SPELL_STATE_CASTING ) 3443 3444 { … … 4012 4013 float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE); 4013 4014 float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE); 4014 // WARNING! in 3.0 multipl er 0.00743f change to 0.64015 // WARNING! in 3.0 multiplier 0.00743f change to 0.6 4015 4016 m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.00743f); 4016 4017 } … … 4040 4041 if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL) 4041 4042 { 4042 // $AP * min(0.06*$cp, 0.24)/6 [Yes, there is no difference, whe ather 4 or 5 CPs are being used]4043 // $AP * min(0.06*$cp, 0.24)/6 [Yes, there is no difference, whether 4 or 5 CPs are being used] 4043 4044 if (apply && !loading && caster && caster->GetTypeId() == TYPEID_PLAYER) 4044 4045 { … … 4093 4094 if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL) 4094 4095 { 4095 // Dmg/tick = $AP*min(0.01*$cp, 0.03) [Like Rip: only the first three CP in rease the contribution from AP]4096 // Dmg/tick = $AP*min(0.01*$cp, 0.03) [Like Rip: only the first three CP increase the contribution from AP] 4096 4097 if (apply && !loading && caster && caster->GetTypeId() == TYPEID_PLAYER) 4097 4098 { … … 4423 4424 if(m_modifier.m_miscvalue != SPELL_SCHOOL_MASK_NORMAL) 4424 4425 { 4425 // support required adding replace UpdateArmor by loop by UpdateResistence at intel ect update4426 // support required adding replace UpdateArmor by loop by UpdateResistence at intellect update 4426 4427 // and include in UpdateResistence same code as in UpdateArmor for aura mod apply. 4427 sLog.outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) need adding support for non-armor resist ences!");4428 sLog.outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) need adding support for non-armor resistances!"); 4428 4429 return; 4429 4430 } … … 4888 4889 { 4889 4890 // support required adding UpdateAttackPowerAndDamage calls at stat update 4890 sLog.outError("Aura SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT (212) need support non-intel ect stats!");4891 sLog.outError("Aura SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT (212) need support non-intellect stats!"); 4891 4892 return; 4892 4893 }