DB/Spells: Move conditions for spell 'Gor'drek's Ointment' from item script to DB

This commit is contained in:
offl
2020-11-11 04:27:44 +02:00
parent 2af9c318c7
commit be6941cd0c
2 changed files with 5 additions and 22 deletions

View 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'");

View File

@@ -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();