Merge commit '805be8ebba07c3280089a128f1764d49f6f84ab6' into 4.3.4

Conflicts:
	sql/updates/world/2014_10_21_00_world.sql
This commit is contained in:
Carbenium
2015-07-21 18:17:08 +02:00
3 changed files with 31 additions and 28 deletions

View File

@@ -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)
{

View File

@@ -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;
}
};

View File

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