diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index d8c143432cc..1c5aacdf1d5 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -76,17 +76,17 @@ bool AuctionBotSeller::Initialize() TC_LOG_DEBUG("ahbot", "Loading loot items for filter.."); QueryResult result = WorldDatabase.PQuery( - "SELECT `item` FROM `creature_loot_template` UNION " - "SELECT `item` FROM `disenchant_loot_template` UNION " - "SELECT `item` FROM `fishing_loot_template` UNION " - "SELECT `item` FROM `gameobject_loot_template` UNION " - "SELECT `item` FROM `item_loot_template` UNION " - "SELECT `item` FROM `milling_loot_template` UNION " - "SELECT `item` FROM `pickpocketing_loot_template` UNION " - "SELECT `item` FROM `prospecting_loot_template` UNION " - "SELECT `item` FROM `reference_loot_template` UNION " - "SELECT `item` FROM `skinning_loot_template` UNION " - "SELECT `item` FROM `spell_loot_template`"); + "SELECT `item` FROM `creature_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `disenchant_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `fishing_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `gameobject_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `item_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `milling_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `pickpocketing_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `prospecting_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `reference_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `skinning_loot_template` WHERE `Reference` = 0 UNION " + "SELECT `item` FROM `spell_loot_template` WHERE `Reference` = 0"); if (result) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 3c62a295914..64bf85c98a8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -882,34 +882,37 @@ public: }; }; +enum LooselyTurnedSoil +{ + QUEST_CALL_THE_HEADLESS_HORSEMAN = 11405 +}; + class go_loosely_turned_soil : public GameObjectScript { public: go_loosely_turned_soil() : GameObjectScript("go_loosely_turned_soil") { } - bool OnGossipHello(Player* player, GameObject* soil) override + bool OnGossipHello(Player* player, GameObject* go) override { - InstanceScript* instance = player->GetInstanceScript(); - if (instance) - { - if (instance->GetBossState(DATA_HORSEMAN_EVENT) != NOT_STARTED) + if (InstanceScript* instance = player->GetInstanceScript()) + if (instance->GetBossState(DATA_HORSEMAN_EVENT) == IN_PROGRESS || player->GetQuestStatus(QUEST_CALL_THE_HEADLESS_HORSEMAN) != QUEST_STATUS_COMPLETE) return true; - instance->SetBossState(DATA_HORSEMAN_EVENT, IN_PROGRESS); - } - /* if (soil->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER && player->getLevel() > 64) - { - player->PrepareQuestMenu(soil->GetGUID()); - player->SendPreparedQuest(soil->GetGUID()); - } - if (player->GetQuestStatus(11405) == QUEST_STATUS_INCOMPLETE && player->getLevel() > 64) - { */ + + return false; + } + + bool OnQuestReward(Player* player, GameObject* go, Quest const* /*quest*/, uint32 /*opt*/) override + { + if (InstanceScript* instance = go->GetInstanceScript()) + if (instance->GetBossState(DATA_HORSEMAN_EVENT) == IN_PROGRESS) + return false; + player->AreaExploredOrEventHappens(11405); - if (Creature* horseman = soil->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0)) + if (Creature* horseman = go->SummonCreature(HH_MOUNTED, FlightPoint[20].x, FlightPoint[20].y, FlightPoint[20].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 0)) { ENSURE_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->PlayerGUID = player->GetGUID(); ENSURE_AI(boss_headless_horseman::boss_headless_horsemanAI, horseman->AI())->FlyMode(); } - //} return true; } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index 4d4c81258f7..d0b87f728c5 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -220,7 +220,7 @@ class boss_ignis : public CreatureScript events.ScheduleEvent(EVENT_JET, urand(35000, 40000)); break; case EVENT_SLAG_POT: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) { Talk(SAY_SLAG_POT); _slagPotGUID = target->GetGUID();