diff options
author | Xanadu <none@none> | 2010-02-04 14:43:07 +0100 |
---|---|---|
committer | Xanadu <none@none> | 2010-02-04 14:43:07 +0100 |
commit | ad63efde8d35d0fd56ce84ca1decf154bd2787ce (patch) | |
tree | b9a54c576d715bd01376818f36dc5b675738dae3 | |
parent | 6ec51e7bbc06a3aca32417ed9680661de3ae6731 (diff) |
Fixed Ritual of Souls, implemented soulwell giving healthstones according to warlock's Improved Healthstone talent points.
--HG--
branch : trunk
-rw-r--r-- | sql/updates/7295_world_scriptname.sql | 1 | ||||
-rw-r--r-- | sql/updates/7295_world_spell_dbc.sql | 4 | ||||
-rw-r--r-- | sql/world.sql | 8 | ||||
-rw-r--r-- | src/scripts/world/go_scripts.cpp | 51 |
4 files changed, 58 insertions, 6 deletions
diff --git a/sql/updates/7295_world_scriptname.sql b/sql/updates/7295_world_scriptname.sql new file mode 100644 index 00000000000..596aa60e5dd --- /dev/null +++ b/sql/updates/7295_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_soulwell' WHERE `entry` IN (181621,193169); diff --git a/sql/updates/7295_world_spell_dbc.sql b/sql/updates/7295_world_spell_dbc.sql new file mode 100644 index 00000000000..881f2e04866 --- /dev/null +++ b/sql/updates/7295_world_spell_dbc.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_dbc` WHERE `Id` IN (34145,58888); +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectBaseDice1`,`EffectBaseDice2`,`EffectBaseDice3`,`EffectDicePerLevel1`,`EffectDicePerLevel2`,`EffectDicePerLevel3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(34145,0,0,0,0,0,0x04000000,0,0,0,1,0,0,101,0,0,80,80,0,1,0,-1,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29886,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,'Ritual of Souls Rank 1 - Trigger Create Soulwell (29886)'), +(58888,0,0,0,0,0,0x04000000,0,0,0,1,0,0,101,0,0,68,68,0,1,0,-1,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58889,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,'Ritual of Souls Rank 2 - Trigger Create Soulwell (58889)'); diff --git a/sql/world.sql b/sql/world.sql index 53c19169687..bad840dc238 100644 --- a/sql/world.sql +++ b/sql/world.sql @@ -5062,9 +5062,11 @@ CREATE TABLE `spell_dbc` ( LOCK TABLES `spell_dbc` WRITE; /*!40000 ALTER TABLE `spell_dbc` DISABLE KEYS */; -INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`AttributesEx3`,`DurationIndex`,`RangeIndex`,`Effect1`,`EffectImplicitTargetA1`,`EffectApplyAuraName1`,`EffectMiscValue1`,`SpellFamilyName`,`SchoolMask`,`Comment`) VALUES -(62388, 0, 0, 0x00000000, 21, 1, 6, 1, 4, 0, 0, 0, 'Demonic Circle: Teleport(48020) - casterAuraSpell'), -(65142, 3, 22, 0x00000080, 21, 13, 6, 6, 255, 22, 15, 8, 'Crypt Fever - SPELL_AURA_LINKED'); +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectBaseDice1`,`EffectBaseDice2`,`EffectBaseDice3`,`EffectDicePerLevel1`,`EffectDicePerLevel2`,`EffectDicePerLevel3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(62388, 0, 0, 0, 0, 0, 0x00000000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Demonic Circle: Teleport(48020) - casterAuraSpell'), +(65142, 3, 22, 0, 0, 0, 0x00000080, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 21, 13, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 'Crypt Fever - SPELL_AURA_LINKED'), +(58888, 0, 0, 0, 0, 0, 0x04000000, 0, 0, 0, 1, 0, 0, 101, 0, 0, 68, 68, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58889, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 2 - Trigger Create Soulwell (58889)'), +(34145, 0, 0, 0, 0, 0, 0x04000000, 0, 0, 0, 1, 0, 0, 101, 0, 0, 80, 80, 0, 1, 0, -1, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 'Ritual of Souls Rank 1 - Trigger Create Soulwell (29886)'); /*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */; UNLOCK TABLES; diff --git a/src/scripts/world/go_scripts.cpp b/src/scripts/world/go_scripts.cpp index 3d352b0b35b..6235c6b3127 100644 --- a/src/scripts/world/go_scripts.cpp +++ b/src/scripts/world/go_scripts.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: GO_Scripts SD%Complete: 100 -SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843,12982, 2936 +SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843,12982, 2936. Soulwell SDCategory: Game Objects EndScriptData */ @@ -46,6 +46,7 @@ go_table_theka EndContentData */ #include "ScriptedPch.h" +#include "SpellId.h" /*###### ## go_cat_figurine @@ -677,8 +678,8 @@ bool GOHello_go_table_theka(Player* pPlayer, GameObject* pGO) } /*###### - * ## go_inconspicuous_landmark - * ######*/ +## go_inconspicuous_landmark +######*/ enum eInconspicuousLandmark { @@ -696,6 +697,45 @@ bool GOHello_go_inconspicuous_landmark(Player *pPlayer, GameObject* pGO) return true; } +/*###### +## go_soulwell +######*/ + +bool GOHello_go_soulwell(Player *pPlayer, GameObject* pGO) +{ + Unit *caster = pGO->GetOwner(false); + if (!caster || caster->GetTypeId() != TYPEID_PLAYER) + return true; + + if (!pPlayer->IsInSameRaidWith(static_cast<Player *>(caster))) + return true; + + // Repeating this at every use is ugly and inefficient. But as long as we don't have proper + // GO scripting with at least On Create and On Update events, the other options are no less + // ugly and hacky. + uint32 newSpell = 0; + if (pGO->GetEntry() == 193169) // Soulwell for rank 2 + { + if (caster->HasAura(SPELL_IMPROVED_HEALTHSTONE_18693)) // Improved Healthstone rank 2 + newSpell = SPELL_CREATE_FEL_HEALTHSTONE_58898; + else if (caster->HasAura(SPELL_IMPROVED_HEALTHSTONE_18692)) // Improved Healthstone rank 1 + newSpell = SPELL_CREATE_FEL_HEALTHSTONE_58896; + else newSpell = SPELL_CREATE_FEL_HEALTHSTONE_58890; + } + else if (pGO->GetEntry() == 181621) // Soulwell for rank 1 + { + if (caster->HasAura(SPELL_IMPROVED_HEALTHSTONE_18693)) // Improved Healthstone rank 2 + newSpell = SPELL_CREATE_MASTER_HEALTHSTONE_34150; + else if (caster->HasAura(SPELL_IMPROVED_HEALTHSTONE_18692)) // Improved Healthstone rank 1 + newSpell = SPELL_CREATE_MASTER_HEALTHSTONE_34149; + else newSpell = SPELL_CREATE_MASTER_HEALTHSTONE_34130; + } + + pGO->AddUse(); + pPlayer->CastSpell(pPlayer, newSpell, true); + return true; +} + void AddSC_go_scripts() { @@ -846,4 +886,9 @@ void AddSC_go_scripts() newscript->Name = "go_inconspicuous_landmark"; newscript->pGOHello = &GOHello_go_inconspicuous_landmark; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_soulwell"; + newscript->pGOHello = &GOHello_go_soulwell; + newscript->RegisterSelf(); } |