aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/3808_world.sql1
-rw-r--r--sql/updates/3810_world_spell_bonus_data.sql94
-rw-r--r--sql/world_scripts_full.sql2
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp28
-rw-r--r--src/game/SpellAuras.cpp49
-rw-r--r--src/game/SpellEffects.cpp8
-rw-r--r--src/game/Unit.cpp24
-rw-r--r--src/game/Unit.h1
8 files changed, 200 insertions, 7 deletions
diff --git a/sql/updates/3808_world.sql b/sql/updates/3808_world.sql
new file mode 100644
index 00000000000..24ce276bd1e
--- /dev/null
+++ b/sql/updates/3808_world.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName` = 'npc_salanar_the_horseman' WHERE `entry` = 28788;
diff --git a/sql/updates/3810_world_spell_bonus_data.sql b/sql/updates/3810_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..777a3c2213d
--- /dev/null
+++ b/sql/updates/3810_world_spell_bonus_data.sql
@@ -0,0 +1,94 @@
+-- by Drahy
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0,6453' WHERE `entry`=33763;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.67305' WHERE `entry`=50464;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.2' WHERE `entry`=5570;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7143' WHERE `entry`=44425;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1936' WHERE `entry`=11113;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1936' WHERE `entry`=31661;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.214' WHERE `entry`=120;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '1' WHERE `entry`=19750;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '1.66' WHERE `entry`=635;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.4280' WHERE `entry`=8092;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.2' WHERE `entry`=172;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2129' WHERE `entry`=27243;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.2' WHERE `entry`=30108;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0' WHERE `entry`=17962;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2140' WHERE `entry`=6789;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.4793' WHERE `entry`=48181;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7139' WHERE `entry`=29722;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.4293' WHERE `entry`=5676;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.8569' WHERE `entry`=686;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.4293' WHERE `entry`=17877;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1932' WHERE `entry`=30283;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.143' WHERE `entry`=689;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.429' WHERE `entry`=1120;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=5857;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=11681;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=11682;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=27214;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=47822;
+UPDATE `spell_bonus_data` SET `dot_bonus` = '0.0949' WHERE `entry`=1949;
+UPDATE `spell_bonus_data` SET `ap_bonus` = '0.025' WHERE `entry`=31803;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42208;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42209;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42210;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42211;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42212;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42213;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42198;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42937;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42938;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2861' WHERE `entry` =49821;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2861' WHERE `entry` =53022;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=42223;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=42224;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=42225;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=42226;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=42218;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=47817;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.7024' WHERE `entry`=47818;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.4762' WHERE `entry`=379;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=25914;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=25913;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=25903;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=27175;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=33074;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=48821;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.6453' WHERE `entry`=33763;
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (53742,61391,47897,50796,50590,58597,974,47757,52986,52987,52988);
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
+('53742', '0.013', '0', '0.025', 'Paladin - Blood Corruption'),
+('61391', '0.193', '0', '0', 'Druid - Typhoon'),
+('47897', '0.1064', '0.0667', '0', 'Warlock - Shadowflame'),
+('50796', '0.7139', '0', '0', 'Warlock - Chaos Bolt'),
+('50590', '0', '0.1622', '0', 'Warlock - Immolation Aura'),
+('58597', '0.75', '0', '0', 'Paladin - Sacred Shield'),
+('47757', '1.6135', '0', '0', 'Priest - Penance (Rank 1'),
+('52986', '1.6135', '0', '0', 'Priest - Penance (Rank 2'),
+('52987', '1.6135', '0', '0', 'Priest - Penance (Rank 3'),
+('52988', '1.6135', '0', '0', 'Priest - Penance (Rank 4');
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (48505,50288,50294,53191,53188,53194,53189,53195,53190);
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
+(50288, 0.05, 0, 0, 'Druid - Starfall rank 1'),
+(50294, 0.012, 0, 0, 'Druid - Starfall AOE rank 1'),
+(53191, 0.05, 0, 0, 'Druid - Starfall rank 2'),
+(53188, 0.012, 0, 0, 'Druid - Starfall AOE rank 2'),
+(53194, 0.05, 0, 0, 'Druid - Starfall rank 3'),
+(53189, 0.012, 0, 0, 'Druid - Starfall AOE rank 3'),
+(53195, 0.05, 0, 0, 'Druid - Starfall rank 4'),
+(53190, 0.012, 0, 0, 'Druid - Starfall AOE rank 4');
+
+-- by nesocip
+DELETE FROM `spell_bonus_data` WHERE `entry` IN (48721, 55078, 52212, 47632, 55095, 49184, 45477, 50536, 51373, 51374, 51375);
+INSERT INTO spell_bonus_data( entry, ap_bonus, comments ) VALUES
+('48721', '0.04', 'DK - Blood Boil'),
+('55078', '0.055', 'DK - Blood Plague'),
+('52212', '0.0475', 'DK - Death and Decay'),
+('47632', '0.15', 'DK - Death Coil'),
+('55095', '0.055', 'DK - Frost Fever'),
+('49184', '0.1', 'DK - Howling Blast'),
+('45477', '0.1', 'DK - Icy Touch'),
+('50536', '0.013', 'DK - Unholy Blight (Rank1)'),
+('51373', '0.013', 'DK - Unholy Blight (Rank2)'),
+('51374', '0.013', 'DK - Unholy Blight (Rank3)'),
+('51375', '0.013', 'DK - Unholy Blight (Rank4)');
diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql
index 94739a2df9f..fe6fa57933a 100644
--- a/sql/world_scripts_full.sql
+++ b/sql/world_scripts_full.sql
@@ -107,7 +107,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_unworthy_initiate_anchor' WHERE
UPDATE `creature_template` SET `ScriptName`='npc_kingdom_of_dalaran_quests' WHERE `entry` IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162);
UPDATE `creature_template` SET `ScriptName`='npc_taxi' WHERE `entry` IN (17435, 23413, 18725, 19401, 19409, 20235, 25059, 25236, 20903, 20162, 29154, 23415, 27575, 26443, 26949, 23816);
UPDATE `creature_template` SET `ScriptName`='npc_death_knight_initiate' WHERE `entry`=28406;
-UPDATE `creature_template` SET `ScriptName`='npc_salanar_the_horseman' WHERE `entry`=28653;
+UPDATE `creature_template` SET `ScriptName`='npc_salanar_the_horseman' WHERE `entry` IN (28653, 28788);
UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=28768;
UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=28658;
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index a846195ddda..560d9196d95 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -493,6 +493,11 @@ bool GossipSelect_npc_death_knight_initiate(Player *player, Creature *_Creature,
## npc_salanar_the_horseman
######*/
+enum
+{
+ REALM_OF_SHADOWS = 52693
+};
+
struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI
{
npc_salanar_the_horsemanAI(Creature *c) : ScriptedAI(c) {}
@@ -507,10 +512,25 @@ struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI
{
if( charmer->GetTypeId() == TYPEID_PLAYER )
{
- if( CAST_PLR(charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE )
- CAST_PLR(charmer)->KilledMonster(28767, me->GetGUID());
- else if( CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE )
- CAST_PLR(charmer)->GroupEventHappens(12687, me);
+ switch(me->GetEntry())
+ {
+ // for quest Grand Theft Palomino(12680)
+ case 28653:
+ if( CAST_PLR(charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE )
+ CAST_PLR(charmer)->KilledMonster(28767, me->GetGUID());
+ break;
+ // for quest Into the Realm of Shadows(12687)
+ case 28788:
+ if( CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE )
+ {
+ if(CAST_PLR(charmer)->HasAura(REALM_OF_SHADOWS))
+ charmer->RemoveAurasDueToSpell(REALM_OF_SHADOWS);
+ CAST_PLR(charmer)->GroupEventHappens(12687, me);
+ }
+ break;
+ default:
+ return;
+ }
CAST_PLR(charmer)->ExitVehicle();
//without this we can see npc kill the horse
who->setDeathState(DEAD);
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c87fc9b89fc..b6c44b8cc60 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4335,6 +4335,18 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_ROOT,apply);
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,apply);
}
+ // Demonic Circle
+ else if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellIconID == 3221)
+ {
+ if (m_target->GetTypeId() != TYPEID_PLAYER)
+ return;
+ if (apply)
+ {
+ GameObject* obj = m_target->GetGameObject(48018);
+ if (obj)
+ ((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
+ }
+ }
}
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
@@ -4491,6 +4503,27 @@ void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmoun
SpellEntry const*spell = GetSpellProto();
switch( spell->SpellFamilyName)
{
+ case SPELLFAMILY_WARLOCK:
+ {
+ switch (spell->Id)
+ {
+ // Demonic Circle
+ case 48018:
+ if (apply)
+ // set to false at initial cast to enable button at next enable in periodic handler
+ m_target->SendAuraVisualForSelf(false,62388);
+ else
+ {
+ // Do not remove GO when aura is removed by stack
+ // to prevent remove GO added by new spell
+ // old one is already removed
+ if (GetParentAura()->GetRemoveMode()!=AURA_REMOVE_BY_STACK)
+ m_target->RemoveGameObject(spell->Id,true);
+ m_target->SendAuraVisualForSelf(false,62388);
+ }
+ break;
+ }
+ }
case SPELLFAMILY_HUNTER:
{
// Explosive Shot
@@ -6614,6 +6647,21 @@ void AuraEffect::PeriodicDummyTick()
}
break;
}
+ case SPELLFAMILY_WARLOCK:
+ switch (spell->Id)
+ {
+ // Demonic Circle
+ case 48018:
+ GameObject* obj = m_target->GetGameObject(spell->Id);
+ if (!obj) return;
+ // We must take a range of teleport spell, not summon.
+ const SpellEntry* goToCircleSpell = sSpellStore.LookupEntry(48020);
+ if (m_target->IsWithinDist(obj,GetSpellMaxRangeForFriend(sSpellRangeStore.LookupEntry(goToCircleSpell->rangeIndex))))
+ m_target->SendAuraVisualForSelf(true,62388, 1);
+ else
+ m_target->SendAuraVisualForSelf(false,62388);
+ }
+ break;
case SPELLFAMILY_DRUID:
{
switch (spell->Id)
@@ -6656,6 +6704,7 @@ void AuraEffect::PeriodicDummyTick()
// Killing Spree
case 51690:
{
+ // TODO: this should use effect[1] of 51690
std::list<Unit*> targets;
{
// eff_radius ==0
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 661eef708ea..dd85148022b 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5669,7 +5669,13 @@ void Spell::EffectSummonObject(uint32 i)
if( m_caster )
obj = m_caster->GetMap()->GetGameObject(guid);
- if(obj) obj->Delete();
+ if(obj)
+ {
+ // Recast case - null spell id to make auras not be removed on object remove from world
+ if (m_spellInfo->Id == obj->GetSpellId())
+ obj->SetSpellId(0);
+ obj->Delete();
+ }
m_caster->m_ObjectSlot[slot] = 0;
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 1546ccdb927..c2d6f77acec 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3769,6 +3769,25 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
return modifier;
}
+void Unit::SendAuraVisualForSelf(bool apply, uint32 id, uint8 effmask)
+{
+ WorldPacket data(SMSG_AURA_UPDATE);
+ data.append(GetPackGUID());
+ // use always free 64+ slots
+ data << uint8(MAX_AURAS);
+ if (!apply)
+ {
+ data << uint32(0);
+ SendMessageToSet(&data, true);
+ return;
+ }
+ data << uint32(id);
+ data << uint8(AFLAG_CASTER | AFLAG_POSITIVE | effmask);
+ data << uint8(getLevel());
+ data << uint8(1);
+ SendMessageToSet(&data, true);
+}
+
bool Unit::AddAura(Aura *Aur, bool handleEffects)
{
// aura doesn't apply effects-return
@@ -4285,6 +4304,9 @@ bool Unit::HasAura(uint32 spellId, uint64 caster) const
//Special case for non existing spell
if (spellId==61988)
return HasAura(61987, caster) || HasAura(25771, caster);
+ // Demonic Circle - special aura for client
+ else if (spellId==62388)
+ return HasAura(48018, caster);
if (Aura * aur = GetAura(spellId, caster))
return true;
@@ -6088,7 +6110,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
{
if (pVictim->getPowerType() == POWER_MANA)
{
- // 2% of maximum mana
+ // 2% of base mana
basepoints0 = int32(pVictim->GetCreateMana() * 2 / 100);
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
}
diff --git a/src/game/Unit.h b/src/game/Unit.h
index fa32a235d3e..ea99f8a2424 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1536,6 +1536,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
}
void SetVisibleAura(uint8 slot, Aura * aur){ m_visibleAuras[slot]=aur; }
void RemoveVisibleAura(uint8 slot){ m_visibleAuras.erase(slot); }
+ void SendAuraVisualForSelf(bool apply, uint32 id, uint8 effmask = 0);
AuraMap & GetAuras() { return m_Auras; }
AuraMap const& GetAuras() const { return m_Auras; }