mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
fix(Core/Quest): The Lich, Ras Frostwhisper (#2373)
This commit is contained in:
committed by
Francesco Borzì
parent
0fd565d557
commit
4e6a8a2756
@@ -0,0 +1,16 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1571737953110374673');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 17179;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`)
|
||||||
|
VALUES
|
||||||
|
(17179,'spell_scholomance_boon_of_life');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 1 AND `SourceGroup` = 10508 AND `SourceEntry` = 13626 AND `ConditionTypeOrReference` = 13;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`)
|
||||||
|
VALUES
|
||||||
|
(1,10508,13626,0,0,13,0,2,1,0,0,0,0,'','Instance - Get Data - Can only loot ''Human Head of Ras Frostwhisper'' if Ras is in human form');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 10508;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`)
|
||||||
|
VALUES
|
||||||
|
(10508,0,0,'THIS CANNOT BE!!',14,0,100,0,0,0,6371,0,'Ras Frostwhisper');
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "scholomance.h"
|
#include "scholomance.h"
|
||||||
#include "GameObjectAI.h"
|
#include "GameObjectAI.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
|
#include "SpellAuras.h"
|
||||||
|
|
||||||
class instance_scholomance : public InstanceMapScript
|
class instance_scholomance : public InstanceMapScript
|
||||||
{
|
{
|
||||||
@@ -21,18 +22,18 @@ class instance_scholomance : public InstanceMapScript
|
|||||||
|
|
||||||
struct instance_scholomance_InstanceMapScript : public InstanceScript
|
struct instance_scholomance_InstanceMapScript : public InstanceScript
|
||||||
{
|
{
|
||||||
instance_scholomance_InstanceMapScript(Map* map) : InstanceScript(map)
|
instance_scholomance_InstanceMapScript(Map* map) : InstanceScript(map),
|
||||||
{
|
GateKirtonosGUID { 0 },
|
||||||
GateKirtonosGUID = 0;
|
GateMiliciaGUID { 0 },
|
||||||
GateMiliciaGUID = 0;
|
GateTheolenGUID { 0 },
|
||||||
GateTheolenGUID = 0;
|
GatePolkeltGUID { 0 },
|
||||||
GatePolkeltGUID = 0;
|
GateRavenianGUID { 0 },
|
||||||
GateRavenianGUID = 0;
|
GateBarovGUID { 0 },
|
||||||
GateBarovGUID = 0;
|
GateIlluciaGUID { 0 },
|
||||||
GateIlluciaGUID = 0;
|
_kirtonosState { 0 },
|
||||||
_kirtonosState = 0;
|
_miniBosses { 0 },
|
||||||
_miniBosses = 0;
|
_rasHuman { 0 }
|
||||||
}
|
{ }
|
||||||
|
|
||||||
void OnGameObjectCreate(GameObject* go)
|
void OnGameObjectCreate(GameObject* go)
|
||||||
{
|
{
|
||||||
@@ -95,6 +96,9 @@ class instance_scholomance : public InstanceMapScript
|
|||||||
case DATA_MINI_BOSSES:
|
case DATA_MINI_BOSSES:
|
||||||
++_miniBosses;
|
++_miniBosses;
|
||||||
break;
|
break;
|
||||||
|
case DATA_RAS_HUMAN:
|
||||||
|
_rasHuman = data;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveToDB();
|
SaveToDB();
|
||||||
@@ -108,6 +112,8 @@ class instance_scholomance : public InstanceMapScript
|
|||||||
return _kirtonosState;
|
return _kirtonosState;
|
||||||
case DATA_MINI_BOSSES:
|
case DATA_MINI_BOSSES:
|
||||||
return _miniBosses;
|
return _miniBosses;
|
||||||
|
case DATA_RAS_HUMAN:
|
||||||
|
return _rasHuman;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -149,6 +155,7 @@ class instance_scholomance : public InstanceMapScript
|
|||||||
|
|
||||||
uint32 _kirtonosState;
|
uint32 _kirtonosState;
|
||||||
uint32 _miniBosses;
|
uint32 _miniBosses;
|
||||||
|
uint32 _rasHuman;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -455,6 +462,53 @@ class spell_scholomance_shadow_portal_rooms : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_scholomance_boon_of_life : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_scholomance_boon_of_life() : SpellScriptLoader("spell_scholomance_boon_of_life") { }
|
||||||
|
|
||||||
|
class spell_scholomance_boon_of_life_AuraScript : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_scholomance_boon_of_life_AuraScript);
|
||||||
|
|
||||||
|
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
if (Unit* target = GetTarget())
|
||||||
|
if (Creature* creature = target->ToCreature())
|
||||||
|
{
|
||||||
|
creature->AI()->AttackStart(caster);
|
||||||
|
creature->AddThreat(caster, 10000.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (Unit* target = GetTarget())
|
||||||
|
if (Creature* creature = target->ToCreature())
|
||||||
|
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_CANCEL)
|
||||||
|
{
|
||||||
|
creature->AI()->Talk(TALK_RAS_HUMAN);
|
||||||
|
creature->SetDisplayId(MODEL_RAS_HUMAN);
|
||||||
|
creature->SetHealth(target->GetMaxHealth());
|
||||||
|
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||||
|
instance->SetData(DATA_RAS_HUMAN,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnEffectRemove += AuraEffectRemoveFn(spell_scholomance_boon_of_life_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
AfterEffectApply += AuraEffectApplyFn(spell_scholomance_boon_of_life_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const
|
||||||
|
{
|
||||||
|
return new spell_scholomance_boon_of_life_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_instance_scholomance()
|
void AddSC_instance_scholomance()
|
||||||
{
|
{
|
||||||
new instance_scholomance();
|
new instance_scholomance();
|
||||||
@@ -463,4 +517,5 @@ void AddSC_instance_scholomance()
|
|||||||
new spell_kormok_summon_bone_minions();
|
new spell_kormok_summon_bone_minions();
|
||||||
new spell_scholomance_shadow_portal();
|
new spell_scholomance_shadow_portal();
|
||||||
new spell_scholomance_shadow_portal_rooms();
|
new spell_scholomance_shadow_portal_rooms();
|
||||||
|
new spell_scholomance_boon_of_life();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,18 @@
|
|||||||
enum DataTypes
|
enum DataTypes
|
||||||
{
|
{
|
||||||
DATA_KIRTONOS_THE_HERALD = 0,
|
DATA_KIRTONOS_THE_HERALD = 0,
|
||||||
DATA_MINI_BOSSES = 1
|
DATA_MINI_BOSSES = 1,
|
||||||
|
DATA_RAS_HUMAN = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ModelIds
|
||||||
|
{
|
||||||
|
MODEL_RAS_HUMAN = 3975
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TalkGroupIds
|
||||||
|
{
|
||||||
|
TALK_RAS_HUMAN = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CreatureIds
|
enum CreatureIds
|
||||||
|
|||||||
Reference in New Issue
Block a user