diff options
| -rw-r--r-- | sql/updates/645_world_scripts.sql | 3 | ||||
| -rw-r--r-- | sql/updates/686_world_scripts.sql | 1 | ||||
| -rw-r--r-- | sql/updates/748_world_scripts.sql | 1 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp | 2 | ||||
| -rw-r--r-- | src/game/SharedDefines.h | 14 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 12 | ||||
| -rw-r--r-- | src/game/SpellAuras.cpp | 21 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 48 | ||||
| -rw-r--r-- | src/game/SpellMgr.cpp | 3 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 25 | ||||
| -rw-r--r-- | src/game/Unit.h | 10 | ||||
| -rw-r--r-- | src/shared/revision_nr.h | 2 |
12 files changed, 36 insertions, 106 deletions
diff --git a/sql/updates/645_world_scripts.sql b/sql/updates/645_world_scripts.sql index bb4916be082..f480a97e204 100644 --- a/sql/updates/645_world_scripts.sql +++ b/sql/updates/645_world_scripts.sql @@ -2,5 +2,4 @@ delete from creature where id=17318; update creature_template set scriptname='npc_geezle' where entry=17318; delete from event_scripts where id=10675; insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), -(10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); -update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531;
\ No newline at end of file +(10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0);
\ No newline at end of file diff --git a/sql/updates/686_world_scripts.sql b/sql/updates/686_world_scripts.sql index b09691841b8..80d0468c361 100644 --- a/sql/updates/686_world_scripts.sql +++ b/sql/updates/686_world_scripts.sql @@ -1,4 +1,3 @@ -UPDATE `quest_template` SET `SpecialFlags` = 2 WHERE `entry` = 1144; UPDATE `creature_template` SET `Scriptname`='npc_willix' WHERE entry=4508; DELETE FROM script_texts WHERE entry BETWEEN -1047000 and -1047010; diff --git a/sql/updates/748_world_scripts.sql b/sql/updates/748_world_scripts.sql index 8e59c9bb812..eb5b7c94992 100644 --- a/sql/updates/748_world_scripts.sql +++ b/sql/updates/748_world_scripts.sql @@ -1,3 +1,2 @@ update creature_template set scriptname='npc_infused_crystal', flags_extra=0 where entry=16364; -update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=8490; delete from creature where id=17086;
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp index 5274cdc7ec4..f26209d4340 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -1879,7 +1879,7 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon) Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0, 999, true); if(!target || target->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0) || target->HasAura(SPELL_PARASITIC_SHADOWFIEND2, 0)) - target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0, 999, true); + target = SelectUnit(SELECT_TARGET_RANDOM, 0, 999, true); if(target) summon->AI()->AttackStart(target); }break; diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 4551473ed30..834c7d66435 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -699,20 +699,22 @@ enum AuraState //AURA_STATE_UNKNOWN6 = 6, // | not used AURA_STATE_HUNTER_PARRY = 7, // C | AURA_STATE_ROGUE_ATTACK_FROM_STEALTH = 7, // C | FIX ME: not implemented yet! - //AURA_STATE_UNKNOWN7c = 7, // c | random/focused bursts spells (?) + //AURA_STATE_UNKNOWN7 = 7, // c | random/focused bursts spells (?) //AURA_STATE_UNKNOWN8 = 8, // | not used //AURA_STATE_UNKNOWN9 = 9, // | not used AURA_STATE_WARRIOR_VICTORY_RUSH = 10, // C | warrior victory rush - AURA_STATE_HUNTER_CRIT_STRIKE = 10, // C | hunter crit strike - AURA_STATE_CRIT = 11, // C | + //AURA_STATE_UNKNOWN11 = 11, // t| AURA_STATE_FAERIE_FIRE = 12, // c t| AURA_STATE_HEALTHLESS_35_PERCENT = 13, // C T | AURA_STATE_IMMOLATE = 14, // T | AURA_STATE_SWIFTMEND = 15, // T | AURA_STATE_DEADLY_POISON = 16, // T | - AURA_STATE_FORBEARANCE = 17, // c t| - AURA_STATE_WEAKENED_SOUL = 18, // t| - AURA_STATE_HYPOTHERMIA = 19, // c | + //AURA_STATE_UNKNOWN17 = 17, // C | + //AURA_STATE_UNKNOWN18 = 18, // C t| + //AURA_STATE_UNKNOWN19 = 19, // | not used + //AURA_STATE_UNKNOWN20 = 20, // c | only (45317 Suicide) + //AURA_STATE_UNKNOWN21 = 21, // | not used + //AURA_STATE_UNKNOWN22 = 22, // C | not implemented yet (Requires Evasive Charges to use) AURA_STATE_HEALTH_ABOVE_75_PERCENT = 23, // C | not implemented yet }; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5c29e5889b0..f1cf7e6a907 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -541,6 +541,7 @@ void Spell::FillTargetMap() case SPELL_EFFECT_ADD_FARSIGHT: case SPELL_EFFECT_APPLY_GLYPH: case SPELL_EFFECT_STUCK: + case SPELL_EFFECT_FEED_PET: case SPELL_EFFECT_DESTROY_ALL_TOTEMS: tmpUnitMap.push_back(m_caster); break; @@ -551,7 +552,6 @@ void Spell::FillTargetMap() /*case SPELL_EFFECT_ENCHANT_ITEM: case SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY: case SPELL_EFFECT_DISENCHANT: - case SPELL_EFFECT_FEED_PET: case SPELL_EFFECT_PROSPECTING: case SPELL_EFFECT_MILLING: if(m_targets.getItemTarget()) @@ -3870,7 +3870,11 @@ uint8 Spell::CanCast(bool strict) } case SPELL_EFFECT_FEED_PET: { - if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_targets.getItemTarget() ) + if (m_caster->GetTypeId() != TYPEID_PLAYER) + return SPELL_FAILED_BAD_TARGETS; + + Item* foodItem = m_targets.getItemTarget(); + if(!foodItem) return SPELL_FAILED_BAD_TARGETS; Pet* pet = m_caster->GetPet(); @@ -3878,10 +3882,10 @@ uint8 Spell::CanCast(bool strict) if(!pet) return SPELL_FAILED_NO_PET; - if(!pet->HaveInDiet(m_targets.getItemTarget()->GetProto())) + if(!pet->HaveInDiet(foodItem->GetProto())) return SPELL_FAILED_WRONG_PET_FOOD; - if(!pet->GetCurrentFoodBenefitLevel(m_targets.getItemTarget()->GetProto()->ItemLevel)) + if(!pet->GetCurrentFoodBenefitLevel(foodItem->GetProto()->ItemLevel)) return SPELL_FAILED_FOOD_LOWLEVEL; if(m_caster->isInCombat() || pet->isInCombat()) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 2c5003b5673..5770a68690d 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2111,12 +2111,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } case SPELLFAMILY_MAGE: { - // Hypothermia - if( GetId()==41425 ) - { - m_target->ModifyAuraState(AURA_STATE_HYPOTHERMIA,apply); - return; - } break; } case SPELLFAMILY_DRUID: @@ -3692,17 +3686,6 @@ void Aura::HandleModMechanicImmunity(bool apply, bool Real) m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,m_modifier.m_miscvalue,apply); - // special cases - switch(m_modifier.m_miscvalue) - { - case MECHANIC_INVULNERABILITY: - m_target->ModifyAuraState(AURA_STATE_FORBEARANCE,apply); - break; - case MECHANIC_SHIELD: - m_target->ModifyAuraState(AURA_STATE_WEAKENED_SOUL,apply); - break; - } - // Bestial Wrath if ( GetSpellProto()->SpellFamilyName == SPELLFAMILY_HUNTER && GetSpellProto()->Id == 19574) { @@ -5911,7 +5894,7 @@ void Aura::PeriodicTick() sLog.outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId()); - if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue > 4) + if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS) break; Powers power = Powers(m_modifier.m_miscvalue); @@ -5973,7 +5956,7 @@ void Aura::PeriodicTick() sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId()); - if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue > 4) + if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS) break; Powers power = Powers(m_modifier.m_miscvalue); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f1f85825b99..076c36aa6b2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1519,33 +1519,6 @@ void Spell::EffectDummy(uint32 i) } break; case SPELLFAMILY_HUNTER: - // Kill command - if(m_spellInfo->SpellFamilyFlags & 0x00080000000000LL) - { - if(m_caster->getClass()!=CLASS_HUNTER) - return; - - // clear hunter crit aura state - m_caster->ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE,false); - - // additional damage from pet to pet target - Pet* pet = m_caster->GetPet(); - if(!pet || !pet->getVictim()) - return; - - uint32 spell_id = 0; - switch (m_spellInfo->Id) - { - case 34026: spell_id = 34027; break; // rank 1 - default: - sLog.outError("Spell::EffectDummy: Spell %u not handled in KC",m_spellInfo->Id); - return; - } - - pet->CastSpell(pet->getVictim(), spell_id, true); - return; - } - switch(m_spellInfo->Id) { case 23989: //Readiness talent @@ -2228,13 +2201,7 @@ void Spell::EffectApplyAura(uint32 i) if(unitTarget->GetTypeId()==TYPEID_PLAYER) // Negative buff should only be applied on players { uint32 spellId = 0; - if(m_spellInfo->CasterAuraStateNot==AURA_STATE_WEAKENED_SOUL || m_spellInfo->TargetAuraStateNot==AURA_STATE_WEAKENED_SOUL) - spellId = 6788; // Weakened Soul - else if(m_spellInfo->CasterAuraStateNot==AURA_STATE_FORBEARANCE || m_spellInfo->TargetAuraStateNot==AURA_STATE_FORBEARANCE) - spellId = 25771; // Forbearance - else if(m_spellInfo->CasterAuraStateNot==AURA_STATE_HYPOTHERMIA) - spellId = 41425; // Hypothermia - else if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages + if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages spellId = 11196; // Recently Bandaged else if( (m_spellInfo->AttributesEx & 0x20) && (m_spellInfo->AttributesEx2 & 0x20000) ) spellId = 23230; // Blood Fury - Healing Reduction @@ -2737,6 +2704,8 @@ void Spell::EffectEnergize(uint32 i) if(m_spellInfo->EffectMiscValue[i] < 0 || m_spellInfo->EffectMiscValue[i] >= MAX_POWERS) return; + Powers power = Powers(m_spellInfo->EffectMiscValue[i]); + // Some level depends spells int multiplier = 0; int level_diff = 0; @@ -2767,8 +2736,6 @@ void Spell::EffectEnergize(uint32 i) if(damage < 0) return; - Powers power = Powers(m_spellInfo->EffectMiscValue[i]); - if(unitTarget->GetMaxPower(power) == 0) return; @@ -5602,7 +5569,8 @@ void Spell::EffectFeedPet(uint32 i) Player *_player = (Player*)m_caster; - if(!itemTarget) + Item* foodItem = m_targets.getItemTarget(); + if(!foodItem) return; Pet *pet = _player->GetPet(); @@ -5612,15 +5580,15 @@ void Spell::EffectFeedPet(uint32 i) if(!pet->isAlive()) return; - int32 benefit = pet->GetCurrentFoodBenefitLevel(itemTarget->GetProto()->ItemLevel); + int32 benefit = pet->GetCurrentFoodBenefitLevel(foodItem->GetProto()->ItemLevel); if(benefit <= 0) return; uint32 count = 1; - _player->DestroyItemCount(itemTarget,count,true); + _player->DestroyItemCount(foodItem,count,true); // TODO: fix crash when a spell has two effects, both pointed at the same item target - m_caster->CastCustomSpell(m_caster,m_spellInfo->EffectTriggerSpell[i],&benefit,NULL,NULL,true); + m_caster->CastCustomSpell(pet,m_spellInfo->EffectTriggerSpell[i],&benefit,NULL,NULL,true); } void Spell::EffectDismissPet(uint32 /*i*/) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 0ec0de4903d..4894d520a9e 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2101,6 +2101,8 @@ void SpellMgr::LoadSpellCustomAttr() case 29576: //Multi-Shot case 40816: //Saber Lash case 37790: //Spread Shot + case 46771: //Flame Sear + case 45248: //Shadow Blades spellInfo->MaxAffectedTargets = 3; break; case 38310: //Multi-Shot @@ -2109,6 +2111,7 @@ void SpellMgr::LoadSpellCustomAttr() case 42005: // Bloodboil case 38296: //Spitfire Totem case 37676: //Insidious Whisper + case 46009: //Negative Energy spellInfo->MaxAffectedTargets = 5; break; case 40827: //Sinful Beam diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 93cfb963b00..40d867a2574 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10006,17 +10006,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag ((Player*)this)->AddComboPoints(pTarget, 1); StartReactiveTimer( REACTIVE_OVERPOWER ); } - // Enable AURA_STATE_CRIT on crit - if (procExtra & PROC_EX_CRITICAL_HIT) - { - ModifyAuraState(AURA_STATE_CRIT, true); - StartReactiveTimer( REACTIVE_CRIT ); - if(getClass()==CLASS_HUNTER) - { - ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, true); - StartReactiveTimer( REACTIVE_HUNTER_CRIT ); - } - } } } } @@ -10459,7 +10448,6 @@ void Unit::ClearComboPointHolders() void Unit::ClearAllReactives() { - for(int i=0; i < MAX_REACTIVE; ++i) m_reactiveTimer[i] = 0; @@ -10467,11 +10455,6 @@ void Unit::ClearAllReactives() ModifyAuraState(AURA_STATE_DEFENSE, false); if (getClass() == CLASS_HUNTER && HasAuraState( AURA_STATE_HUNTER_PARRY)) ModifyAuraState(AURA_STATE_HUNTER_PARRY, false); - if (HasAuraState( AURA_STATE_CRIT)) - ModifyAuraState(AURA_STATE_CRIT, false); - if (getClass() == CLASS_HUNTER && HasAuraState( AURA_STATE_HUNTER_CRIT_STRIKE) ) - ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, false); - if(getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER) ((Player*)this)->ClearComboPoints(); } @@ -10499,14 +10482,6 @@ void Unit::UpdateReactives( uint32 p_time ) if ( getClass() == CLASS_HUNTER && HasAuraState(AURA_STATE_HUNTER_PARRY)) ModifyAuraState(AURA_STATE_HUNTER_PARRY, false); break; - case REACTIVE_CRIT: - if (HasAuraState(AURA_STATE_CRIT)) - ModifyAuraState(AURA_STATE_CRIT, false); - break; - case REACTIVE_HUNTER_CRIT: - if ( getClass() == CLASS_HUNTER && HasAuraState(AURA_STATE_HUNTER_CRIT_STRIKE) ) - ModifyAuraState(AURA_STATE_HUNTER_CRIT_STRIKE, false); - break; case REACTIVE_OVERPOWER: if(getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER) ((Player*)this)->ClearComboPoints(); diff --git a/src/game/Unit.h b/src/game/Unit.h index 2aaa160dfc0..5da9a484ae1 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -756,14 +756,12 @@ struct TRINITY_DLL_SPEC CharmInfo enum ReactiveType { - REACTIVE_DEFENSE = 1, - REACTIVE_HUNTER_PARRY = 2, - REACTIVE_CRIT = 3, - REACTIVE_HUNTER_CRIT = 4, - REACTIVE_OVERPOWER = 5 + REACTIVE_DEFENSE = 0, + REACTIVE_HUNTER_PARRY = 1, + REACTIVE_OVERPOWER = 2 }; -#define MAX_REACTIVE 6 +#define MAX_REACTIVE 3 #define MAX_TOTEM 4 // delay time next attack to prevent client attack animation problems diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3c96138b0a7..9ae2def5ec3 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 "7007" + #define REVISION_NR "7009" #endif // __REVISION_NR_H__ |
