diff options
| author | Shocker <shocker@freakz.ro> | 2011-11-26 23:50:15 +0200 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2011-11-26 23:50:15 +0200 |
| commit | ed55fc3567599b0e595e99ee06252f1ed23e3851 (patch) | |
| tree | eed4e19a0cd020adc066a68cdf36e88263bf4726 | |
| parent | 29400b4198bd56544de097c186955f1154ca78ad (diff) | |
| parent | 3d21444db689d5b2eecd933ee6202b5636d7f2e2 (diff) | |
Merge branch 'master' into 4.x
Conflicts:
src/server/game/Spells/Auras/SpellAuraEffects.h
11 files changed, 111 insertions, 74 deletions
diff --git a/sql/updates/world/2011_11_26_02_world_spell_group.sql b/sql/updates/world/2011_11_26_02_world_spell_group.sql new file mode 100644 index 00000000000..71ad2eaf9fb --- /dev/null +++ b/sql/updates/world/2011_11_26_02_world_spell_group.sql @@ -0,0 +1,7 @@ +-- Blessing of Sanctuary + Grace +DELETE FROM `spell_group` WHERE `id`>=1091 AND `id`<=1093 LIMIT 4; +DELETE FROM `spell_group_stack_rules` WHERE `group_id`=1093 LIMIT 1; + +-- Ebon Plague + Curse of Elements + Earth and Moon +DELETE FROM `spell_group` WHERE `id`>=1040 AND `id`<=1043 LIMIT 6; +DELETE FROM `spell_group_stack_rules` WHERE `group_id`=1043 LIMIT 1; diff --git a/sql/updates/world/2011_11_26_03_world_spell_proc_event.sql b/sql/updates/world/2011_11_26_03_world_spell_proc_event.sql new file mode 100644 index 00000000000..36837be8ab6 --- /dev/null +++ b/sql/updates/world/2011_11_26_03_world_spell_proc_event.sql @@ -0,0 +1,2 @@ +-- Misery +UPDATE `spell_proc_event` SET `SpellFamilyMask2` = `SpellFamilyMask2` | 64 WHERE `entry` = 33193; diff --git a/sql/updates/world/2011_11_26_04_world_achievement_criteria_data.sql b/sql/updates/world/2011_11_26_04_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..b037bf58349 --- /dev/null +++ b/sql/updates/world/2011_11_26_04_world_achievement_criteria_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `achievement_criteria_data` WHERE `type` = 11 AND `criteria_id` = 7363; +INSERT INTO `achievement_criteria_data` VALUES +(7363, 11, 0, 0, 'achievement_snakes_whyd_it_have_to_be_snakes'); diff --git a/sql/updates/world/2011_11_26_04_world_disables.sql b/sql/updates/world/2011_11_26_04_world_disables.sql new file mode 100644 index 00000000000..4722f248656 --- /dev/null +++ b/sql/updates/world/2011_11_26_04_world_disables.sql @@ -0,0 +1 @@ +DELETE FROM `disables` WHERE entry = 7363 AND sourceType = 4; diff --git a/sql/updates/world/2011_11_26_05_ulduar_gameobject.sql b/sql/updates/world/2011_11_26_05_ulduar_gameobject.sql new file mode 100644 index 00000000000..60ba0aefbeb --- /dev/null +++ b/sql/updates/world/2011_11_26_05_ulduar_gameobject.sql @@ -0,0 +1,2 @@ +-- Set all gameobjects in Ulduar (excluding chests, including veins and herbs) spawned in 10 and 25 man difficult. +UPDATE `gameobject` SET `spawnMask` = 3 WHERE `id` IN (194555, 194232, 194675, 194560, 194569, 194370, 194371, 194630, 194631, 194375, 194377, 194634, 194635, 194636, 194637, 194904, 194905, 194907, 194398, 194399, 194400, 194401, 194402, 194914, 194403, 194915, 194404, 194405, 194406, 194407, 194663, 194408, 194664, 194665, 194409, 194666, 194410, 194411, 194412, 194413, 194414, 194415, 194416, 194437, 194441, 194442, 194704, 194705, 194706, 194707, 194481, 194484, 194235, 194236, 194750, 194506, 194255, 194773, 194261, 194262, 194264, 194553, 194554, 194556, 194557, 194558, 194559, 194565, 194912, 194913, 194739, 194740, 194741, 194742, 194743, 194744, 194745, 194746, 194747, 194748, 194749, 194774, 194775, 194776) AND `map` = 603; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index b92e1ad21dc..97f5af1c6e9 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -664,6 +664,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, return 0; } + creature->m_isWorldObject = true; //so it will not be unloaded with grid map->AddToMap(creature); m_NPCPassengerSet.insert(creature); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 75265e5dca1..816392e47ae 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1520,44 +1520,36 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo armor = floor(AddPctN(armor, -(*j)->GetAmount())); } + // Apply Player CR_ARMOR_PENETRATION rating and buffs from stances\specializations etc. if (GetTypeId() == TYPEID_PLAYER) { - AuraEffectList const& ArPenAuras = GetAuraEffectsByType(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT); - for (AuraEffectList::const_iterator itr = ArPenAuras.begin(); itr != ArPenAuras.end(); ++itr) + float bonusPct = 0; + AuraEffectList const& ResIgnoreAuras = GetAuraEffectsByType(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT); + for (AuraEffectList::const_iterator itr = ResIgnoreAuras.begin(); itr != ResIgnoreAuras.end(); ++itr) { - // item neutral spell if ((*itr)->GetSpellInfo()->EquippedItemClass == -1) { - armor = floor(AddPctN(armor, -(*itr)->GetAmount())); - continue; + if (!spellInfo || (*itr)->IsAffectedOnSpell(spellInfo) || (*itr)->GetMiscValue() & spellInfo->GetSchoolMask()) + bonusPct += (*itr)->GetAmount(); + else if (!(*itr)->GetMiscValue() && !(*itr)->HasSpellClassMask()) + bonusPct += (*itr)->GetAmount(); } - - // item dependent spell - check current weapons - for (int i = 0; i < MAX_ATTACK; ++i) + else { - Item* weapon = ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), true); - - if (weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellInfo())) - { - armor = floor(AddPctN(armor, -(*itr)->GetAmount())); - break; - } + if (ToPlayer() && ToPlayer()->HasItemFitToSpellRequirements((*itr)->GetSpellInfo())) + bonusPct += (*itr)->GetAmount(); } } - } - // Apply Player CR_ARMOR_PENETRATION rating - if (GetTypeId() == TYPEID_PLAYER) - { float maxArmorPen = 0; - if (getLevel() < 60) + if (victim->getLevel() < 60) maxArmorPen = float(400 + 85 * victim->getLevel()); else maxArmorPen = 400 + 85 * victim->getLevel() + 4.5f * 85 * (victim->getLevel() - 59); // Cap armor penetration to this number maxArmorPen = std::min((armor + maxArmorPen) / 3, armor); // Figure out how much armor do we ignore - float armorPen = CalculatePctF(maxArmorPen, ToPlayer()->GetRatingBonusValue(CR_ARMOR_PENETRATION)); + float armorPen = CalculatePctF(maxArmorPen, bonusPct + ToPlayer()->GetRatingBonusValue(CR_ARMOR_PENETRATION)); // Got the value, apply it armor -= std::min(armorPen, maxArmorPen); } @@ -10905,12 +10897,6 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas if (victim->HasAura(6788)) crit_chance+=(*i)->GetAmount(); break; - case 21: // Test of Faith - case 6935: - case 6918: - if (victim->HealthBelowPct(50)) - crit_chance+=(*i)->GetAmount(); - break; default: break; } @@ -11140,11 +11126,6 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32 case 3736: // Hateful Totem of the Third Wind / Increased Lesser Healing Wave / LK Arena (4/5/6) Totem of the Third Wind / Savage Totem of the Third Wind DoneTotal += (*i)->GetAmount(); break; - case 7997: // Renewed Hope - case 7998: - if (victim->HasAura(6788)) - AddPctN(DoneTotalMod, (*i)->GetAmount()); - break; case 21: // Test of Faith case 6935: case 6918: @@ -11785,23 +11766,6 @@ void Unit::MeleeDamageBonus(Unit* victim, uint32 *pdamage, WeaponAttackType attT AddPctF(TakenTotalMod, std::max(mod, float((*i)->GetAmount()))); } break; - // Blessing of Sanctuary - // Greater Blessing of Sanctuary - case 19: - case 1804: - { - if ((*i)->GetSpellInfo()->SpellFamilyName != SPELLFAMILY_PALADIN) - continue; - - if ((*i)->GetMiscValue() & (spellProto ? spellProto->GetSchoolMask() : 0)) - AddPctN(TakenTotalMod, (*i)->GetAmount()); - break; - } - // Ebon Plague - case 1933: - if ((*i)->GetMiscValue() & (spellProto ? spellProto->GetSchoolMask() : 0)) - AddPctN(TakenTotalMod, (*i)->GetAmount()); - break; } } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 9d1a74591c5..7f754253719 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -79,7 +79,8 @@ class AuraEffect bool IsPeriodic() const { return m_isPeriodic; } void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; } - bool IsAffectingSpell(SpellInfo const* spell) const; + bool IsAffectedOnSpell(SpellInfo const* spell) const; + bool HasSpellClassMask() const { return m_spellInfo->Effects[m_effIndex].SpellClassMask; } void SendTickImmune(Unit* target, Unit* caster) const; void PeriodicTick(AuraApplication * aurApp, Unit* caster) const; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 41c01e5a13c..d5969a94690 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2965,6 +2965,9 @@ void SpellMgr::LoadDbcDataCorrections() break; case 31447: // Mark of Kaz'rogal (needs target selection script) case 31298: // Sleep (needs target selection script) + case 51904: // Summon Ghouls On Scarlet Crusade (this should use conditions table, script for this spell needs to be fixed) + case 2895: // Wrath of Air Totem rank 1 (Aura) + case 68933: // Wrath of Air Totem rank 2 (Aura) spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER; spellInfo->EffectImplicitTargetB[0] = 0; break; @@ -3007,8 +3010,12 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER_AREA_PARTY; spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_10_YARDS_2; break; - case 44978: case 45001: case 45002: // Wild Magic - case 45004: case 45006: case 45010: // Wild Magic + case 44978: // Wild Magic + case 45001: + case 45002: + case 45004: + case 45006: + case 45010: case 31347: // Doom case 41635: // Prayer of Mending case 44869: // Spectral Blast @@ -3065,7 +3072,8 @@ void SpellMgr::LoadDbcDataCorrections() case 50312: // Unholy Frenzy spellInfo->MaxAffectedTargets = 15; break; - case 38794: case 33711: //Murmur's Touch + case 33711: //Murmur's Touch + case 38794: spellInfo->MaxAffectedTargets = 1; spellInfo->EffectTriggerSpell[0] = 33760; break; @@ -3105,9 +3113,6 @@ void SpellMgr::LoadDbcDataCorrections() case 51852: // The Eye of Acherus (no spawn in phase 2 in db) spellInfo->EffectMiscValue[0] |= 1; break; - case 51904: // Summon Ghouls On Scarlet Crusade (this should use conditions table, script for this spell needs to be fixed) - spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER; - break; case 29809: // Desecration Arm - 36 instead of 37 - typo? :/ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_7_YARDS; break; @@ -3151,7 +3156,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->EffectApplyAuraName[1] = SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN; break; case 41913: // Parasitic Shadowfiend Passive - spellInfo->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends + spellInfo->EffectApplyAuraName[0] = SPELL_AURA_DUMMY; // proc debuff, and summon infinite fiends break; case 27892: // To Anchor 1 case 27928: // To Anchor 1 @@ -3179,11 +3184,6 @@ void SpellMgr::LoadDbcDataCorrections() case 6474: // Earthbind Totem (instant pulse) spellInfo->AttributesEx5 |= SPELL_ATTR5_START_PERIODIC_AT_APPLY; break; - case 2895: // Wrath of Air Totem rank 1 (Aura) - case 68933: // Wrath of Air Totem rank 2 (Aura) - spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER; - spellInfo->EffectImplicitTargetB[0] = 0; - break; case 52109: // Flametongue Totem rank 1 (Aura) case 52110: // Flametongue Totem rank 2 (Aura) case 52111: // Flametongue Totem rank 3 (Aura) @@ -3202,7 +3202,7 @@ void SpellMgr::LoadDbcDataCorrections() case 53244: // Marked for Death (Rank 3) case 53245: // Marked for Death (Rank 4) case 53246: // Marked for Death (Rank 5) - spellInfo->EffectSpellClassMask[0] = flag96(423937, 276955137, 2049); + spellInfo->EffectSpellClassMask[0] = flag96(0x00067801, 0x10820001, 0x00000801); break; case 70728: // Exploit Weakness (needs target selection script) case 70840: // Devious Minds (needs target selection script) diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 7e417a840f2..f2b9fb704d5 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -52,6 +52,7 @@ enum Creatures enum ConstrictorSpells { SPELL_GRIP_OF_SLAD_RAN = 55093, + SPELL_SNAKE_WRAP = 55126, SPELL_VENOMOUS_BITE = 54987, H_SPELL_VENOMOUS_BITE = 58996 }; @@ -65,6 +66,8 @@ static Position SpawnLoc[]= {1716.76f, 635.159f, 129.282f, 0.191986f} }; +#define DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES 1 + class boss_slad_ran : public CreatureScript { public: @@ -89,6 +92,7 @@ public: uint8 uiPhase; + std::set<uint64> lWrappedPlayers; SummonList lSummons; InstanceScript* instance; @@ -100,6 +104,7 @@ public: uiVenomBoltTimer = 15*IN_MILLISECONDS; uiSpawnTimer = 5*IN_MILLISECONDS; uiPhase = 0; + lWrappedPlayers.clear(); lSummons.DespawnAll(); @@ -171,6 +176,7 @@ public: void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); + lSummons.DespawnAll(); if (instance) instance->SetData(DATA_SLAD_RAN_EVENT, DONE); @@ -186,6 +192,17 @@ public: summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); lSummons.Summon(summoned); } + + void SetGUID(uint64 guid, int32 type) + { + if (type == DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES) + lWrappedPlayers.insert(guid); + } + + bool WasWrapped(uint64 guid) + { + return lWrappedPlayers.count(guid); + } }; }; @@ -215,10 +232,26 @@ public: { if (!UpdateVictim()) return; + if (uiGripOfSladRanTimer <= diff) { - DoCast(me->getVictim(), SPELL_GRIP_OF_SLAD_RAN); - uiGripOfSladRanTimer = 5*IN_MILLISECONDS; + Unit* target = me->getVictim(); + + DoCast(target, SPELL_GRIP_OF_SLAD_RAN); + uiGripOfSladRanTimer = urand(3, 6)*IN_MILLISECONDS; + + Aura* grip = target->GetAura(SPELL_GRIP_OF_SLAD_RAN, me->GetGUID()); + if (grip && grip->GetStackAmount() == 5) + { + target->RemoveAurasDueToSpell(SPELL_GRIP_OF_SLAD_RAN, me->GetGUID()); + target->CastSpell(target, SPELL_SNAKE_WRAP, true); + + if (TempSummon* _me = me->ToTempSummon()) + if (Creature* sladran = _me->GetSummoner()->ToCreature()) + sladran->AI()->SetGUID(target->GetGUID() ,DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES); + + me->DespawnOrUnsummon(); + } } else uiGripOfSladRanTimer -= diff; } @@ -265,9 +298,28 @@ public: }; +class achievement_snakes_whyd_it_have_to_be_snakes : public AchievementCriteriaScript +{ + public: + achievement_snakes_whyd_it_have_to_be_snakes() : AchievementCriteriaScript("achievement_snakes_whyd_it_have_to_be_snakes") + { + } + + bool OnCheck(Player* player, Unit* target) + { + if (!target) + return false; + + if (boss_slad_ran::boss_slad_ranAI* sladRanAI = CAST_AI(boss_slad_ran::boss_slad_ranAI, target->GetAI())) + return !sladRanAI->WasWrapped(player->GetGUID()); + return false; + } +}; + void AddSC_boss_slad_ran() { new boss_slad_ran(); new mob_slad_ran_constrictor(); new mob_slad_ran_viper(); -} + new achievement_snakes_whyd_it_have_to_be_snakes(); +}
\ No newline at end of file diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index d620289a72f..ed1bbd1971a 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -271,14 +271,18 @@ public: break; } case EVENT_FLIGHT: - phase = PHASE_FLIGHT; - events.SetPhase(PHASE_FLIGHT); - me->SetReactState(REACT_PASSIVE); - me->AttackStop(); - float x, y, z, o; - me->GetHomePosition(x, y, z, o); - me->GetMotionMaster()->MovePoint(1, x, y, z); - return; + if (HealthAbovePct(10)) + { + phase = PHASE_FLIGHT; + events.SetPhase(PHASE_FLIGHT); + me->SetReactState(REACT_PASSIVE); + me->AttackStop(); + float x, y, z, o; + me->GetHomePosition(x, y, z, o); + me->GetMotionMaster()->MovePoint(1, x, y, z); + return; + } + break; } } |
