mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
DB/Spells: Move conditions for spell 'Gor'drek's Ointment' from item script to DB
This commit is contained in:
5
sql/updates/world/3.3.5/2020_11_11_02_world.sql
Normal file
5
sql/updates/world/3.3.5/2020_11_11_02_world.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
--
|
||||
UPDATE `item_template` SET `ScriptName` = "" WHERE `entry` = 30175;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = 32578 AND `ConditionTypeOrReference` = 1;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(17,0,32578,0,0,1,1,32578,0,0,1,173,0,"","Group 0: Spell 'Gor'drek's Ointment' can be used if target does not have aura 'Gor'drek's Ointment'");
|
||||
@@ -24,7 +24,6 @@ EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
item_flying_machine(i34060, i34061) Engineering crafted flying machines
|
||||
item_gor_dreks_ointment(i30175) Protecting Our Own(q10488)
|
||||
item_only_for_flight Items which should only useable while flying
|
||||
EndContentData */
|
||||
|
||||
@@ -83,26 +82,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# item_gor_dreks_ointment
|
||||
#####*/
|
||||
|
||||
class item_gor_dreks_ointment : public ItemScript
|
||||
{
|
||||
public:
|
||||
item_gor_dreks_ointment() : ItemScript("item_gor_dreks_ointment") { }
|
||||
|
||||
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) override
|
||||
{
|
||||
if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT &&
|
||||
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
|
||||
return false;
|
||||
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# item_mysterious_egg
|
||||
#####*/
|
||||
@@ -303,7 +282,6 @@ class item_generic_limit_chance_above_60 : public ItemScript
|
||||
void AddSC_item_scripts()
|
||||
{
|
||||
new item_only_for_flight();
|
||||
new item_gor_dreks_ointment();
|
||||
new item_mysterious_egg();
|
||||
new item_disgusting_jar();
|
||||
new item_petrov_cluster_bombs();
|
||||
|
||||
Reference in New Issue
Block a user