mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
converted all tabs to 4 spaces
This commit is contained in:
@@ -261,14 +261,14 @@ void AddSC_achievement_scripts()
|
||||
new achievement_bg_ic_resource_glut();
|
||||
new achievement_bg_ic_glaive_grave();
|
||||
new achievement_bg_ic_mowed_down();
|
||||
new achievement_bg_sa_artillery();
|
||||
new achievement_bg_sa_artillery();
|
||||
new achievement_sickly_gazelle();
|
||||
new achievement_everything_counts();
|
||||
new achievement_bg_av_perfection();
|
||||
new achievement_arena_kills("achievement_arena_2v2_kills", ARENA_TYPE_2v2);
|
||||
new achievement_everything_counts();
|
||||
new achievement_bg_av_perfection();
|
||||
new achievement_arena_kills("achievement_arena_2v2_kills", ARENA_TYPE_2v2);
|
||||
new achievement_arena_kills("achievement_arena_3v3_kills", ARENA_TYPE_3v3);
|
||||
new achievement_arena_kills("achievement_arena_5v5_kills", ARENA_TYPE_5v5);
|
||||
new achievement_sa_defense_of_the_ancients();
|
||||
new achievement_sa_defense_of_the_ancients();
|
||||
new achievement_tilted();
|
||||
new achievement_not_even_a_scratch();
|
||||
new achievement_killed_exp_or_honor_target();
|
||||
|
||||
@@ -54,10 +54,10 @@ class AreaTrigger_at_voltarus_middle : public AreaTriggerScript
|
||||
{
|
||||
if (player->IsAlive() && !player->IsInCombat())
|
||||
if (player->HasItemCount(39319)) // Scepter of Domination
|
||||
{
|
||||
player->TeleportTo(571, 6242.67f, -1972.10f, 484.783f, 0.6f);
|
||||
return true;
|
||||
}
|
||||
{
|
||||
player->TeleportTo(571, 6242.67f, -1972.10f, 484.783f, 0.6f);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -218,8 +218,8 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
|
||||
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
|
||||
{
|
||||
QuestStatus QLR = player->GetQuestStatus(QUEST_LAST_RITES);
|
||||
QuestStatus QBT = player->GetQuestStatus(QUEST_BREAKING_THROUGH);
|
||||
QuestStatus QLR = player->GetQuestStatus(QUEST_LAST_RITES);
|
||||
QuestStatus QBT = player->GetQuestStatus(QUEST_BREAKING_THROUGH);
|
||||
if (!(QLR == QUEST_STATUS_INCOMPLETE || QLR == QUEST_STATUS_COMPLETE ||
|
||||
QBT == QUEST_STATUS_INCOMPLETE || QBT == QUEST_STATUS_COMPLETE))
|
||||
return false;
|
||||
@@ -237,10 +237,10 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
|
||||
pPosition = WorldLocation(571, 3802.38f, 3585.95f, 49.5765f, 0.0f);
|
||||
break;
|
||||
case 5340:
|
||||
if (QBT == QUEST_STATUS_INCOMPLETE)
|
||||
pPosition = WorldLocation(571, 3758, 3562, 345.51f, 0.0f);
|
||||
else
|
||||
pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f, 0.0f);
|
||||
if (QBT == QUEST_STATUS_INCOMPLETE)
|
||||
pPosition = WorldLocation(571, 3758, 3562, 345.51f, 0.0f);
|
||||
else
|
||||
pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f, 0.0f);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
@@ -457,10 +457,10 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript
|
||||
|
||||
void AddSC_areatrigger_scripts()
|
||||
{
|
||||
// Ours
|
||||
new AreaTrigger_at_voltarus_middle();
|
||||
// Ours
|
||||
new AreaTrigger_at_voltarus_middle();
|
||||
|
||||
// Theirs
|
||||
// Theirs
|
||||
new AreaTrigger_at_coilfang_waterfall();
|
||||
new AreaTrigger_at_legion_teleporter();
|
||||
new AreaTrigger_at_stormwright_shelf();
|
||||
|
||||
@@ -407,8 +407,8 @@ class npc_spirit_shade : public CreatureScript
|
||||
|
||||
void IsSummonedBy(Unit* summoner)
|
||||
{
|
||||
if (!summoner)
|
||||
return;
|
||||
if (!summoner)
|
||||
return;
|
||||
|
||||
_summonerGuid = summoner->GetGUID();
|
||||
me->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.0f);
|
||||
@@ -682,7 +682,7 @@ class spell_dream_fog_sleep : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_SLEEP));
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_SLEEP));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (roll_chance_i(5))
|
||||
player->CastSpell(player, 61734, true); // SPELL NOBLEGARDEN BUNNY
|
||||
if (roll_chance_i(5))
|
||||
player->CastSpell(player, 61734, true); // SPELL NOBLEGARDEN BUNNY
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -74,8 +74,8 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
|
||||
{
|
||||
if (player->GetQuestStatus(12007) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player, 47293, true);
|
||||
if (player->GetQuestStatus(12007) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastSpell(player, 47293, true);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -87,15 +87,15 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject *pGo)
|
||||
{
|
||||
if (!pGo->FindNearestCreature(28105, 30.0f)) // Tartek
|
||||
{
|
||||
if (Creature *cr = pGo->SummonCreature(28105, 6708.7f, 5115.45f, -18.3f, 0.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
{
|
||||
cr->MonsterYell("My treasure! You no steal from Tartek, dumb big-tongue traitor thing. Tartek and nasty dragon going to kill you! You so dumb.", LANG_UNIVERSAL, 0);
|
||||
cr->AI()->AttackStart(pPlayer);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
if (!pGo->FindNearestCreature(28105, 30.0f)) // Tartek
|
||||
{
|
||||
if (Creature *cr = pGo->SummonCreature(28105, 6708.7f, 5115.45f, -18.3f, 0.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
{
|
||||
cr->MonsterYell("My treasure! You no steal from Tartek, dumb big-tongue traitor thing. Tartek and nasty dragon going to kill you! You so dumb.", LANG_UNIVERSAL, 0);
|
||||
cr->AI()->AttackStart(pPlayer);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,24 +108,24 @@ class go_witherbark_totem_bundle : public GameObjectScript
|
||||
{
|
||||
go_witherbark_totem_bundleAI(GameObject* gameObject) : GameObjectAI(gameObject)
|
||||
{
|
||||
_timer = 1;
|
||||
}
|
||||
_timer = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (_timer)
|
||||
{
|
||||
_timer += diff;
|
||||
if (_timer > 5000)
|
||||
{
|
||||
go->CastSpell(NULL, 9056);
|
||||
go->DestroyForNearbyPlayers();
|
||||
_timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (_timer)
|
||||
{
|
||||
_timer += diff;
|
||||
if (_timer > 5000)
|
||||
{
|
||||
go->CastSpell(NULL, 9056);
|
||||
go->DestroyForNearbyPlayers();
|
||||
_timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 _timer;
|
||||
uint32 _timer;
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const
|
||||
@@ -141,10 +141,10 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject *go)
|
||||
{
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
bg->ReadyMarkerClicked(player);
|
||||
|
||||
return false;
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
bg->ReadyMarkerClicked(player);
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
// xinef: prevent spawning hundreds of them
|
||||
// xinef: prevent spawning hundreds of them
|
||||
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER && !go->FindNearestCreature(NPC_GOGGEROC, 20.0f))
|
||||
go->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
|
||||
|
||||
@@ -272,50 +272,50 @@ public:
|
||||
{
|
||||
go_tadpole_cageAI(GameObject* gameObject) : GameObjectAI(gameObject)
|
||||
{
|
||||
requireSummon = 2;
|
||||
}
|
||||
requireSummon = 2;
|
||||
}
|
||||
|
||||
uint8 requireSummon;
|
||||
uint8 requireSummon;
|
||||
|
||||
void SummonTadpoles()
|
||||
{
|
||||
requireSummon = 0;
|
||||
int8 count = urand(1, 3);
|
||||
for (int8 i = 0; i < count; ++i)
|
||||
go->SummonCreature(NPC_WINTERFIN_TADPOLE, go->GetPositionX()+cos(2*M_PI*i/3.0f)*0.60f, go->GetPositionY()+sin(2*M_PI*i/3.0f)*0.60f, go->GetPositionZ()+0.5f, go->GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
}
|
||||
void SummonTadpoles()
|
||||
{
|
||||
requireSummon = 0;
|
||||
int8 count = urand(1, 3);
|
||||
for (int8 i = 0; i < count; ++i)
|
||||
go->SummonCreature(NPC_WINTERFIN_TADPOLE, go->GetPositionX()+cos(2*M_PI*i/3.0f)*0.60f, go->GetPositionY()+sin(2*M_PI*i/3.0f)*0.60f, go->GetPositionZ()+0.5f, go->GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
}
|
||||
|
||||
void OnStateChanged(uint32 state, Unit* unit)
|
||||
{
|
||||
if (requireSummon == 1 && state == GO_READY)
|
||||
requireSummon = 2;
|
||||
}
|
||||
void OnStateChanged(uint32 state, Unit* unit)
|
||||
{
|
||||
if (requireSummon == 1 && state == GO_READY)
|
||||
requireSummon = 2;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (go->isSpawned() && requireSummon == 2)
|
||||
SummonTadpoles();
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (go->isSpawned() && requireSummon == 2)
|
||||
SummonTadpoles();
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool reportUse)
|
||||
{
|
||||
if (requireSummon)
|
||||
return false;
|
||||
bool GossipHello(Player* player, bool reportUse)
|
||||
{
|
||||
if (requireSummon)
|
||||
return false;
|
||||
|
||||
requireSummon = 1;
|
||||
if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
std::list<Creature*> cList;
|
||||
GetCreatureListWithEntryInGrid(cList, go, NPC_WINTERFIN_TADPOLE, 5.0f);
|
||||
for (std::list<Creature*>::const_iterator itr = cList.begin(); itr != cList.end(); ++itr)
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0);
|
||||
(*itr)->DespawnOrUnsummon(urand(45000, 60000));
|
||||
(*itr)->GetMotionMaster()->MoveFollow(player, 1.0f, frand(0.0f, 2*M_PI), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
requireSummon = 1;
|
||||
if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
std::list<Creature*> cList;
|
||||
GetCreatureListWithEntryInGrid(cList, go, NPC_WINTERFIN_TADPOLE, 5.0f);
|
||||
for (std::list<Creature*>::const_iterator itr = cList.begin(); itr != cList.end(); ++itr)
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0);
|
||||
(*itr)->DespawnOrUnsummon(urand(45000, 60000));
|
||||
(*itr)->GetMotionMaster()->MoveFollow(player, 1.0f, frand(0.0f, 2*M_PI), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const
|
||||
@@ -739,7 +739,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
// xinef: prevent spawning hundreds of them
|
||||
// xinef: prevent spawning hundreds of them
|
||||
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(25318, 20.0f))
|
||||
{
|
||||
go->SummonCreature(25318, 3485.089844f, 6115.7422188f, 70.966812f, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
@@ -845,27 +845,27 @@ enum InconspicuousLandmark
|
||||
|
||||
class go_inconspicuous_landmark : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark")
|
||||
{
|
||||
_lastUsedTime = time(NULL);
|
||||
}
|
||||
public:
|
||||
go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark")
|
||||
{
|
||||
_lastUsedTime = time(NULL);
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
if (player->HasItemCount(ITEM_CUERGOS_KEY))
|
||||
return true;
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
if (player->HasItemCount(ITEM_CUERGOS_KEY))
|
||||
return true;
|
||||
|
||||
if (_lastUsedTime > time(NULL))
|
||||
return true;
|
||||
if (_lastUsedTime > time(NULL))
|
||||
return true;
|
||||
|
||||
_lastUsedTime = time(NULL) + MINUTE;
|
||||
player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
|
||||
return true;
|
||||
}
|
||||
_lastUsedTime = time(NULL) + MINUTE;
|
||||
player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _lastUsedTime;
|
||||
private:
|
||||
uint32 _lastUsedTime;
|
||||
};
|
||||
|
||||
/*######
|
||||
@@ -939,8 +939,8 @@ class go_soulwell : public GameObjectScript
|
||||
/// on the well. We have to find how to segregate REPORT_USE and USE.
|
||||
bool GossipHello(Player* player, bool reportUse)
|
||||
{
|
||||
if (reportUse)
|
||||
return false;
|
||||
if (reportUse)
|
||||
return false;
|
||||
|
||||
Unit* owner = go->GetOwner();
|
||||
if (_stoneSpell == 0 || _stoneId == 0)
|
||||
@@ -948,14 +948,14 @@ class go_soulwell : public GameObjectScript
|
||||
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_stoneSpell))
|
||||
Spell::SendCastResult(player, spell, 0, SPELL_FAILED_ERROR);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!owner || owner->GetTypeId() != TYPEID_PLAYER || !player->IsInSameRaidWith(owner->ToPlayer()))
|
||||
{
|
||||
{
|
||||
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_stoneSpell))
|
||||
Spell::SendCastResult(player, spell, 0, SPELL_FAILED_TARGET_NOT_IN_RAID);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't try to add a stone if we already have one.
|
||||
if (player->HasItemCount(_stoneId))
|
||||
@@ -1120,9 +1120,9 @@ public:
|
||||
{
|
||||
player->SendLoot(go->GetGUID(), LOOT_CORPSE);
|
||||
|
||||
// xinef: prevent spawning hundreds of them
|
||||
if (go->FindNearestCreature(NPC_HIVE_AMBUSHER, 20.0f))
|
||||
return true;
|
||||
// xinef: prevent spawning hundreds of them
|
||||
if (go->FindNearestCreature(NPC_HIVE_AMBUSHER, 20.0f))
|
||||
return true;
|
||||
|
||||
go->SummonCreature(NPC_HIVE_AMBUSHER, go->GetPositionX()+1, go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
go->SummonCreature(NPC_HIVE_AMBUSHER, go->GetPositionX(), go->GetPositionY()+1, go->GetPositionZ(), go->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
@@ -1180,18 +1180,18 @@ class go_veil_skith_cage : public GameObjectScript
|
||||
|
||||
void AddSC_go_scripts()
|
||||
{
|
||||
// Ours
|
||||
new go_noblegarden_colored_egg();
|
||||
new go_seer_of_zebhalak();
|
||||
new go_mistwhisper_treasure();
|
||||
new go_witherbark_totem_bundle();
|
||||
new go_arena_ready_marker();
|
||||
new go_ethereum_prison();
|
||||
// Ours
|
||||
new go_noblegarden_colored_egg();
|
||||
new go_seer_of_zebhalak();
|
||||
new go_mistwhisper_treasure();
|
||||
new go_witherbark_totem_bundle();
|
||||
new go_arena_ready_marker();
|
||||
new go_ethereum_prison();
|
||||
new go_ethereum_stasis();
|
||||
new go_resonite_cask();
|
||||
new go_tadpole_cage();
|
||||
|
||||
// Theirs
|
||||
// Theirs
|
||||
new go_cat_figurine();
|
||||
new go_gilded_brazier();
|
||||
new go_shrine_of_the_birds();
|
||||
|
||||
@@ -11,7 +11,7 @@ enum eTrickOrTreatSpells
|
||||
SPELL_TRICK = 24714,
|
||||
SPELL_TREAT = 24715,
|
||||
SPELL_TRICKED_OR_TREATED = 24755,
|
||||
HALLOWEEN_EVENTID = 12,
|
||||
HALLOWEEN_EVENTID = 12,
|
||||
};
|
||||
|
||||
class npc_innkeeper : public CreatureScript
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !player->HasAura(SPELL_TRICKED_OR_TREATED))
|
||||
{
|
||||
player->CastSpell(player, SPELL_TRICKED_OR_TREATED, true);
|
||||
creature->CastSpell(player, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true);
|
||||
creature->CastSpell(player, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true);
|
||||
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
return true;
|
||||
|
||||
@@ -351,7 +351,7 @@ void ProcessCastaction(Player* player, Creature* creature, uint32 spellId, uint3
|
||||
player->CastSpell(player, triggeredSpellId, true);
|
||||
player->ModifyMoney(-cost);
|
||||
|
||||
// xinef: save spells!
|
||||
// xinef: save spells!
|
||||
player->SaveToDB(false, false);
|
||||
}
|
||||
else
|
||||
@@ -576,29 +576,29 @@ public:
|
||||
//WEAPONSMITH & ARMORSMITH
|
||||
if (player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 225)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(5284) || player->GetQuestRewardStatus(5302) || player->GetQuestRewardStatus(5283) || player->GetQuestStatus(5301))
|
||||
{
|
||||
switch (creatureId)
|
||||
{
|
||||
case 11145: //Myolor Sunderfury
|
||||
case 11176: //Krathok Moltenfist
|
||||
if (!player->HasSpell(S_ARMOR) && !player->HasSpell(S_WEAPON))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (!player->HasSpell(S_WEAPON) && !player->HasSpell(S_ARMOR))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
break;
|
||||
case 11146: //Ironus Coldsteel
|
||||
case 11178: //Borgosh Corebender
|
||||
if (player->HasSpell(S_WEAPON))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
break;
|
||||
case 5164: //Grumnus Steelshaper
|
||||
case 11177: //Okothos Ironrager
|
||||
if (player->HasSpell(S_ARMOR))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (player->GetQuestRewardStatus(5284) || player->GetQuestRewardStatus(5302) || player->GetQuestRewardStatus(5283) || player->GetQuestStatus(5301))
|
||||
{
|
||||
switch (creatureId)
|
||||
{
|
||||
case 11145: //Myolor Sunderfury
|
||||
case 11176: //Krathok Moltenfist
|
||||
if (!player->HasSpell(S_ARMOR) && !player->HasSpell(S_WEAPON))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
if (!player->HasSpell(S_WEAPON) && !player->HasSpell(S_ARMOR))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
break;
|
||||
case 11146: //Ironus Coldsteel
|
||||
case 11178: //Borgosh Corebender
|
||||
if (player->HasSpell(S_WEAPON))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
break;
|
||||
case 5164: //Grumnus Steelshaper
|
||||
case 11177: //Okothos Ironrager
|
||||
if (player->HasSpell(S_ARMOR))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//WEAPONSMITH SPEC
|
||||
if (player->HasSpell(S_WEAPON) && player->getLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250)
|
||||
@@ -642,10 +642,10 @@ public:
|
||||
break;
|
||||
//Learn Armor/Weapon
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
ProcessCastaction(player, creature, S_ARMOR, S_LEARN_ARMOR, 0);
|
||||
ProcessCastaction(player, creature, S_ARMOR, S_LEARN_ARMOR, 0);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
ProcessCastaction(player, creature, S_WEAPON, S_LEARN_WEAPON, 0);
|
||||
ProcessCastaction(player, creature, S_WEAPON, S_LEARN_WEAPON, 0);
|
||||
break;
|
||||
//Unlearn Armor/Weapon
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
@@ -659,13 +659,13 @@ public:
|
||||
break;
|
||||
//Learn Hammer/Axe/Sword
|
||||
case GOSSIP_ACTION_INFO_DEF + 5:
|
||||
ProcessCastaction(player, creature, S_HAMMER, S_LEARN_HAMMER, 0);
|
||||
ProcessCastaction(player, creature, S_HAMMER, S_LEARN_HAMMER, 0);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 6:
|
||||
ProcessCastaction(player, creature, S_AXE, S_LEARN_AXE, 0);
|
||||
ProcessCastaction(player, creature, S_AXE, S_LEARN_AXE, 0);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 7:
|
||||
ProcessCastaction(player, creature, S_SWORD, S_LEARN_SWORD, 0);
|
||||
ProcessCastaction(player, creature, S_SWORD, S_LEARN_SWORD, 0);
|
||||
break;
|
||||
//Unlearn Hammer/Axe/Sword
|
||||
case GOSSIP_ACTION_INFO_DEF + 8:
|
||||
@@ -887,10 +887,10 @@ class npc_prof_leather : public CreatureScript
|
||||
public:
|
||||
npc_prof_leather() : CreatureScript("npc_prof_leather") { }
|
||||
|
||||
inline bool HasLeatherSpecialty(Player* player)
|
||||
{
|
||||
return (player->HasSpell(S_DRAGON) || player->HasSpell(S_ELEMENTAL) || player->HasSpell(S_TRIBAL));
|
||||
}
|
||||
inline bool HasLeatherSpecialty(Player* player)
|
||||
{
|
||||
return (player->HasSpell(S_DRAGON) || player->HasSpell(S_ELEMENTAL) || player->HasSpell(S_TRIBAL));
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
@@ -903,8 +903,8 @@ public:
|
||||
if (creature->IsTrainer())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
|
||||
// pussywizard: NO UNLEARNING! LEATHERWORKING SPECIALTY IS A PERMANENT DECISION AND CANNOT BE CHANGED IN ANY WAY!
|
||||
// pussywizard: CAN RE-LEARN ONLY THE ONE FOR WHICH QUEST IS COMPLETED!
|
||||
// pussywizard: NO UNLEARNING! LEATHERWORKING SPECIALTY IS A PERMANENT DECISION AND CANNOT BE CHANGED IN ANY WAY!
|
||||
// pussywizard: CAN RE-LEARN ONLY THE ONE FOR WHICH QUEST IS COMPLETED!
|
||||
|
||||
if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 250 && player->getLevel() > 49)
|
||||
{
|
||||
@@ -912,7 +912,7 @@ public:
|
||||
{
|
||||
case 7866: //Peter Galen
|
||||
case 7867: //Thorkaf Dragoneye
|
||||
if (!HasLeatherSpecialty(player) && (player->GetQuestRewardStatus(5141) || player->GetQuestRewardStatus(5145)))
|
||||
if (!HasLeatherSpecialty(player) && (player->GetQuestRewardStatus(5141) || player->GetQuestRewardStatus(5145)))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_DRAGON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
break;
|
||||
case 7868: //Sarah Tanner
|
||||
@@ -944,13 +944,13 @@ public:
|
||||
break;
|
||||
// Learn Leather
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
ProcessCastaction(player, creature, S_DRAGON, S_LEARN_DRAGON, 0);
|
||||
ProcessCastaction(player, creature, S_DRAGON, S_LEARN_DRAGON, 0);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
ProcessCastaction(player, creature, S_ELEMENTAL, S_LEARN_ELEMENTAL, 0);
|
||||
ProcessCastaction(player, creature, S_ELEMENTAL, S_LEARN_ELEMENTAL, 0);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
ProcessCastaction(player, creature, S_TRIBAL, S_LEARN_TRIBAL, 0);
|
||||
ProcessCastaction(player, creature, S_TRIBAL, S_LEARN_TRIBAL, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1145,19 +1145,19 @@ public:
|
||||
{
|
||||
if (player->GetQuestRewardStatus(3643) || player->GetQuestRewardStatus(3641) || player->GetQuestRewardStatus(3639))
|
||||
{
|
||||
if (player->HasSpell(S_GOBLIN)) // Has Goblin specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GOBLIN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
}
|
||||
else if (player->HasSpell(S_GNOMISH)) // Has Gnomish specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GNOMISH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
}
|
||||
else // does not have any specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GOBLIN, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1, BOX_LEARN_ENGIN_SPEC, DoLearnCost(player), false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GNOMISH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2, BOX_LEARN_ENGIN_SPEC, DoLearnCost(player), false);
|
||||
}
|
||||
if (player->HasSpell(S_GOBLIN)) // Has Goblin specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GOBLIN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
}
|
||||
else if (player->HasSpell(S_GNOMISH)) // Has Gnomish specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GNOMISH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
}
|
||||
else // does not have any specialization
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GOBLIN, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1, BOX_LEARN_ENGIN_SPEC, DoLearnCost(player), false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GNOMISH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2, BOX_LEARN_ENGIN_SPEC, DoLearnCost(player), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1173,15 +1173,15 @@ public:
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
ProcessCastaction(player, NULL, S_GOBLIN, S_LEARN_GOBLIN, DoLearnCost(player));
|
||||
break;
|
||||
// Learn Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
// Learn Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
ProcessCastaction(player, NULL, S_GNOMISH, S_LEARN_GNOMISH, DoLearnCost(player));
|
||||
break;
|
||||
//Unlearn Goblin
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
ProcessUnlearnAction(player, NULL, S_UNLEARN_GOBLIN, 0, DoHighUnlearnCost(player));
|
||||
ProcessUnlearnAction(player, NULL, S_UNLEARN_GOBLIN, 0, DoHighUnlearnCost(player));
|
||||
break;
|
||||
//Unlearn Gnomish
|
||||
//Unlearn Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
ProcessUnlearnAction(player, NULL, S_UNLEARN_GNOMISH, 0, DoHighUnlearnCost(player));
|
||||
break;
|
||||
@@ -1191,14 +1191,14 @@ public:
|
||||
void SendConfirmLearn(Player* player, GameObject* gameobject, uint32 uiAction)
|
||||
{
|
||||
switch (uiAction)
|
||||
{
|
||||
// Goblin
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
{
|
||||
// Goblin
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GOBLIN, GOSSIP_SENDER_CHECK, uiAction);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(gameobject), gameobject->GetGUID());
|
||||
break;
|
||||
// Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
// Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_GNOMISH, GOSSIP_SENDER_CHECK, uiAction);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(gameobject), gameobject->GetGUID());
|
||||
break;
|
||||
@@ -1207,15 +1207,15 @@ public:
|
||||
|
||||
void SendConfirmUnlearn(Player* player, GameObject* gameobject, uint32 uiAction)
|
||||
{
|
||||
switch (uiAction)
|
||||
{
|
||||
// Goblin
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
switch (uiAction)
|
||||
{
|
||||
// Goblin
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GOBLIN, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(gameobject), gameobject->GetGUID());
|
||||
break;
|
||||
// Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
// Gnomish
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_GNOMISH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ENGIN_SPEC, DoHighUnlearnCost(player), false);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(gameobject), gameobject->GetGUID());
|
||||
break;
|
||||
@@ -1242,5 +1242,5 @@ void AddSC_npc_professions()
|
||||
new npc_engineering_tele_trinket();
|
||||
new npc_prof_leather();
|
||||
new npc_prof_tailor();
|
||||
new go_evil_book_for_dummies();
|
||||
new go_evil_book_for_dummies();
|
||||
}
|
||||
|
||||
@@ -64,16 +64,16 @@ EndContentData */
|
||||
|
||||
enum elderClearwater
|
||||
{
|
||||
EVENT_CLEARWATER_ANNOUNCE = 1,
|
||||
EVENT_CLEARWATER_ANNOUNCE = 1,
|
||||
|
||||
CLEARWATER_SAY_PRE = 0,
|
||||
CLEARWATER_SAY_START = 1,
|
||||
CLEARWATER_SAY_WINNER = 2,
|
||||
CLEARWATER_SAY_END = 3,
|
||||
CLEARWATER_SAY_PRE = 0,
|
||||
CLEARWATER_SAY_START = 1,
|
||||
CLEARWATER_SAY_WINNER = 2,
|
||||
CLEARWATER_SAY_END = 3,
|
||||
|
||||
QUEST_FISHING_DERBY = 24803,
|
||||
QUEST_FISHING_DERBY = 24803,
|
||||
|
||||
DATA_DERBY_FINISHED = 1,
|
||||
DATA_DERBY_FINISHED = 1,
|
||||
};
|
||||
|
||||
class npc_elder_clearwater : public CreatureScript
|
||||
@@ -81,146 +81,146 @@ class npc_elder_clearwater : public CreatureScript
|
||||
public:
|
||||
npc_elder_clearwater() : CreatureScript("npc_elder_clearwater") { }
|
||||
|
||||
struct npc_elder_clearwaterAI : public ScriptedAI
|
||||
{
|
||||
npc_elder_clearwaterAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_CLEARWATER_ANNOUNCE, 1000, 1, 0);
|
||||
finished = false;
|
||||
preWarning = false;
|
||||
startWarning = false;
|
||||
finishWarning = false;
|
||||
}
|
||||
struct npc_elder_clearwaterAI : public ScriptedAI
|
||||
{
|
||||
npc_elder_clearwaterAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_CLEARWATER_ANNOUNCE, 1000, 1, 0);
|
||||
finished = false;
|
||||
preWarning = false;
|
||||
startWarning = false;
|
||||
finishWarning = false;
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool finished;
|
||||
bool preWarning;
|
||||
bool startWarning;
|
||||
bool finishWarning;
|
||||
EventMap events;
|
||||
bool finished;
|
||||
bool preWarning;
|
||||
bool startWarning;
|
||||
bool finishWarning;
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_DERBY_FINISHED)
|
||||
return (uint32)finished;
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_DERBY_FINISHED)
|
||||
return (uint32)finished;
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == DATA_DERBY_FINISHED)
|
||||
finished = true;
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == DATA_DERBY_FINISHED)
|
||||
finished = true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_CLEARWATER_ANNOUNCE:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_CLEARWATER_ANNOUNCE:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
|
||||
if (!preWarning && strdate.tm_hour == 13 && strdate.tm_min == 55)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_PRE, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
preWarning = true;
|
||||
}
|
||||
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
startWarning = true;
|
||||
}
|
||||
if (!finishWarning && strdate.tm_hour == 15 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_END, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
finishWarning = true;
|
||||
// no one won - despawn
|
||||
if (!finished)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!preWarning && strdate.tm_hour == 13 && strdate.tm_min == 55)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_PRE, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
preWarning = true;
|
||||
}
|
||||
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
startWarning = true;
|
||||
}
|
||||
if (!finishWarning && strdate.tm_hour == 15 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, CLEARWATER_SAY_END, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
finishWarning = true;
|
||||
// no one won - despawn
|
||||
if (!finished)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
QuestRelationBounds pObjectQR;
|
||||
QuestRelationBounds pObjectQIR;
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
QuestRelationBounds pObjectQR;
|
||||
QuestRelationBounds pObjectQIR;
|
||||
|
||||
// pets also can have quests
|
||||
if (creature)
|
||||
{
|
||||
pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(creature->GetEntry());
|
||||
pObjectQIR = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(creature->GetEntry());
|
||||
}
|
||||
else
|
||||
return true;
|
||||
// pets also can have quests
|
||||
if (creature)
|
||||
{
|
||||
pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(creature->GetEntry());
|
||||
pObjectQIR = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(creature->GetEntry());
|
||||
}
|
||||
else
|
||||
return true;
|
||||
|
||||
QuestMenu &qm = player->PlayerTalkClass->GetQuestMenu();
|
||||
qm.ClearMenu();
|
||||
QuestMenu &qm = player->PlayerTalkClass->GetQuestMenu();
|
||||
qm.ClearMenu();
|
||||
|
||||
for (QuestRelations::const_iterator i = pObjectQIR.first; i != pObjectQIR.second; ++i)
|
||||
{
|
||||
uint32 quest_id = i->second;
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
|
||||
if (!quest)
|
||||
continue;
|
||||
for (QuestRelations::const_iterator i = pObjectQIR.first; i != pObjectQIR.second; ++i)
|
||||
{
|
||||
uint32 quest_id = i->second;
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(quest_id);
|
||||
if (!quest)
|
||||
continue;
|
||||
|
||||
if (!creature->AI()->GetData(DATA_DERBY_FINISHED))
|
||||
{
|
||||
if (quest_id == QUEST_FISHING_DERBY)
|
||||
player->PlayerTalkClass->SendQuestGiverRequestItems(quest, creature->GetGUID(), player->CanRewardQuest(quest, false), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (quest_id != QUEST_FISHING_DERBY)
|
||||
player->PlayerTalkClass->SendQuestGiverRequestItems(quest, creature->GetGUID(), player->CanRewardQuest(quest, false), true);
|
||||
}
|
||||
}
|
||||
if (!creature->AI()->GetData(DATA_DERBY_FINISHED))
|
||||
{
|
||||
if (quest_id == QUEST_FISHING_DERBY)
|
||||
player->PlayerTalkClass->SendQuestGiverRequestItems(quest, creature->GetGUID(), player->CanRewardQuest(quest, false), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (quest_id != QUEST_FISHING_DERBY)
|
||||
player->PlayerTalkClass->SendQuestGiverRequestItems(quest, creature->GetGUID(), player->CanRewardQuest(quest, false), true);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_DERBY_FINISHED) && quest->GetQuestId() == QUEST_FISHING_DERBY)
|
||||
{
|
||||
creature->AI()->DoAction(DATA_DERBY_FINISHED);
|
||||
sCreatureTextMgr->SendChat(creature, CLEARWATER_SAY_WINNER, player, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_DERBY_FINISHED) && quest->GetQuestId() == QUEST_FISHING_DERBY)
|
||||
{
|
||||
creature->AI()->DoAction(DATA_DERBY_FINISHED);
|
||||
sCreatureTextMgr->SendChat(creature, CLEARWATER_SAY_WINNER, player, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_MAP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_elder_clearwaterAI (pCreature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_elder_clearwaterAI (pCreature);
|
||||
}
|
||||
};
|
||||
|
||||
enum riggleBassbait
|
||||
{
|
||||
EVENT_RIGGLE_ANNOUNCE = 1,
|
||||
EVENT_RIGGLE_ANNOUNCE = 1,
|
||||
|
||||
RIGGLE_SAY_START = 0,
|
||||
RIGGLE_SAY_WINNER = 1,
|
||||
RIGGLE_SAY_END = 2,
|
||||
RIGGLE_SAY_START = 0,
|
||||
RIGGLE_SAY_WINNER = 1,
|
||||
RIGGLE_SAY_END = 2,
|
||||
|
||||
QUEST_MASTER_ANGLER = 8193,
|
||||
QUEST_MASTER_ANGLER = 8193,
|
||||
|
||||
DATA_ANGLER_FINISHED = 1,
|
||||
DATA_ANGLER_FINISHED = 1,
|
||||
};
|
||||
|
||||
class npc_riggle_bassbait : public CreatureScript
|
||||
@@ -228,107 +228,107 @@ class npc_riggle_bassbait : public CreatureScript
|
||||
public:
|
||||
npc_riggle_bassbait() : CreatureScript("npc_riggle_bassbait") { }
|
||||
|
||||
struct npc_riggle_bassbaitAI : public ScriptedAI
|
||||
{
|
||||
npc_riggle_bassbaitAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_RIGGLE_ANNOUNCE, 1000, 1, 0);
|
||||
finished = false;
|
||||
startWarning = false;
|
||||
finishWarning = false;
|
||||
}
|
||||
struct npc_riggle_bassbaitAI : public ScriptedAI
|
||||
{
|
||||
npc_riggle_bassbaitAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_RIGGLE_ANNOUNCE, 1000, 1, 0);
|
||||
finished = false;
|
||||
startWarning = false;
|
||||
finishWarning = false;
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool finished;
|
||||
bool startWarning;
|
||||
bool finishWarning;
|
||||
EventMap events;
|
||||
bool finished;
|
||||
bool startWarning;
|
||||
bool finishWarning;
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_ANGLER_FINISHED)
|
||||
return (uint32)finished;
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_ANGLER_FINISHED)
|
||||
return (uint32)finished;
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == DATA_ANGLER_FINISHED)
|
||||
finished = true;
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == DATA_ANGLER_FINISHED)
|
||||
finished = true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_RIGGLE_ANNOUNCE:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
startWarning = true;
|
||||
}
|
||||
if (!finishWarning && strdate.tm_hour == 16 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_END, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
finishWarning = true;
|
||||
// no one won - despawn
|
||||
if (!finished)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_RIGGLE_ANNOUNCE:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
if (!startWarning && strdate.tm_hour == 14 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
startWarning = true;
|
||||
}
|
||||
if (!finishWarning && strdate.tm_hour == 16 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, RIGGLE_SAY_END, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
finishWarning = true;
|
||||
// no one won - despawn
|
||||
if (!finished)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED))
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED))
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED) && quest->GetQuestId() == QUEST_MASTER_ANGLER)
|
||||
{
|
||||
creature->AI()->DoAction(DATA_ANGLER_FINISHED);
|
||||
sCreatureTextMgr->SendChat(creature, RIGGLE_SAY_WINNER, player, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt)
|
||||
{
|
||||
if (!creature->AI()->GetData(DATA_ANGLER_FINISHED) && quest->GetQuestId() == QUEST_MASTER_ANGLER)
|
||||
{
|
||||
creature->AI()->DoAction(DATA_ANGLER_FINISHED);
|
||||
sCreatureTextMgr->SendChat(creature, RIGGLE_SAY_WINNER, player, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_riggle_bassbaitAI (pCreature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_riggle_bassbaitAI (pCreature);
|
||||
}
|
||||
};
|
||||
|
||||
enum shortJohnMirthil
|
||||
{
|
||||
EVENT_SHORT_JOHN_ACTION = 1,
|
||||
EVENT_SHORT_JOHN_REMOVE_WARNING = 2,
|
||||
EVENT_SHORT_JOHN_MOVE_BACK = 3,
|
||||
EVENT_SHORT_JOHN_ACTION = 1,
|
||||
EVENT_SHORT_JOHN_REMOVE_WARNING = 2,
|
||||
EVENT_SHORT_JOHN_MOVE_BACK = 3,
|
||||
|
||||
SAY_SHORT_JOHN_ANNOUNCE = 0,
|
||||
SAY_SHORT_JOHN_BATTLE_START = 1,
|
||||
SAY_SHORT_JOHN_ANNOUNCE = 0,
|
||||
SAY_SHORT_JOHN_BATTLE_START = 1,
|
||||
|
||||
SPELL_SUMMON_PIRATE_BOOTY = 23176
|
||||
SPELL_SUMMON_PIRATE_BOOTY = 23176
|
||||
};
|
||||
|
||||
class npc_short_john_mirthil : public CreatureScript
|
||||
@@ -336,110 +336,110 @@ class npc_short_john_mirthil : public CreatureScript
|
||||
public:
|
||||
npc_short_john_mirthil() : CreatureScript("npc_short_john_mirthil") { }
|
||||
|
||||
struct npc_short_john_mirthilAI : public NullCreatureAI
|
||||
{
|
||||
npc_short_john_mirthilAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
pathPoint = 0;
|
||||
startWarning = false;
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_ACTION, 1000);
|
||||
}
|
||||
struct npc_short_john_mirthilAI : public NullCreatureAI
|
||||
{
|
||||
npc_short_john_mirthilAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
pathPoint = 0;
|
||||
startWarning = false;
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_ACTION, 1000);
|
||||
}
|
||||
|
||||
EventMap events;
|
||||
bool startWarning;
|
||||
uint32 pathPoint;
|
||||
EventMap events;
|
||||
bool startWarning;
|
||||
uint32 pathPoint;
|
||||
|
||||
void StartMovement(bool reverse)
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetEntry());
|
||||
void StartMovement(bool reverse)
|
||||
{
|
||||
Movement::PointsArray pathPoints;
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
WaypointPath const* i_path = sWaypointMgr->GetPath(me->GetEntry());
|
||||
|
||||
if (reverse)
|
||||
{
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i_path->size()-1-i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
float x, y, z, o;
|
||||
me->GetRespawnPosition(x, y, z, &o);
|
||||
pathPoints.push_back(G3D::Vector3(x, y, z));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
}
|
||||
if (reverse)
|
||||
{
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i_path->size()-1-i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
float x, y, z, o;
|
||||
me->GetRespawnPosition(x, y, z, &o);
|
||||
pathPoints.push_back(G3D::Vector3(x, y, z));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint8 i = 0; i < i_path->size(); ++i)
|
||||
{
|
||||
WaypointData const* node = i_path->at(i);
|
||||
pathPoints.push_back(G3D::Vector3(node->x, node->y, node->z));
|
||||
}
|
||||
}
|
||||
|
||||
me->SetWalk(!reverse);
|
||||
me->SetWalk(!reverse);
|
||||
me->GetMotionMaster()->MoveSplinePath(&pathPoints);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 point)
|
||||
{
|
||||
if (type != ESCORT_MOTION_TYPE)
|
||||
return;
|
||||
void MovementInform(uint32 type, uint32 point)
|
||||
{
|
||||
if (type != ESCORT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
++pathPoint;
|
||||
if (pathPoint == 16)
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_MOVE_BACK, 0);
|
||||
else if (pathPoint == 33)
|
||||
CreatureAI::EnterEvadeMode();
|
||||
}
|
||||
++pathPoint;
|
||||
if (pathPoint == 16)
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_MOVE_BACK, 0);
|
||||
else if (pathPoint == 33)
|
||||
CreatureAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SHORT_JOHN_ACTION:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
if (!startWarning && strdate.tm_hour % 3 == 0 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, SAY_SHORT_JOHN_ANNOUNCE, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
startWarning = true;
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_REMOVE_WARNING, 150000); // 2.5 minutes, to be sure above condition fails
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_SHORT_JOHN_ACTION:
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
tm strdate;
|
||||
ACE_OS::localtime_r(&curtime, &strdate);
|
||||
if (!startWarning && strdate.tm_hour % 3 == 0 && strdate.tm_min == 0)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, SAY_SHORT_JOHN_ANNOUNCE, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
startWarning = true;
|
||||
events.ScheduleEvent(EVENT_SHORT_JOHN_REMOVE_WARNING, 150000); // 2.5 minutes, to be sure above condition fails
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
|
||||
pathPoint = 0;
|
||||
StartMovement(false);
|
||||
}
|
||||
pathPoint = 0;
|
||||
StartMovement(false);
|
||||
}
|
||||
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SHORT_JOHN_REMOVE_WARNING:
|
||||
startWarning = false;
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SHORT_JOHN_MOVE_BACK:
|
||||
me->CastSpell(me, SPELL_SUMMON_PIRATE_BOOTY, true);
|
||||
sCreatureTextMgr->SendChat(me, SAY_SHORT_JOHN_BATTLE_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
StartMovement(true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SHORT_JOHN_REMOVE_WARNING:
|
||||
startWarning = false;
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_SHORT_JOHN_MOVE_BACK:
|
||||
me->CastSpell(me, SPELL_SUMMON_PIRATE_BOOTY, true);
|
||||
sCreatureTextMgr->SendChat(me, SAY_SHORT_JOHN_BATTLE_START, 0, CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, TEXT_RANGE_ZONE);
|
||||
StartMovement(true);
|
||||
events.PopEvent();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_short_john_mirthilAI (pCreature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new npc_short_john_mirthilAI (pCreature);
|
||||
}
|
||||
};
|
||||
|
||||
enum eTrainingDummy
|
||||
{
|
||||
SPELL_STUN_PERMANENT = 61204
|
||||
SPELL_STUN_PERMANENT = 61204
|
||||
};
|
||||
|
||||
class npc_training_dummy : public CreatureScript
|
||||
@@ -510,7 +510,7 @@ public:
|
||||
npc_target_dummyAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
deathTimer = 15000;
|
||||
deathTimer = 15000;
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); //imune to knock aways like blast wave
|
||||
}
|
||||
|
||||
@@ -519,8 +519,8 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED); //disable rotate
|
||||
me->SetLootRecipient(me->GetOwner());
|
||||
me->SelectLevel();
|
||||
me->SetLootRecipient(me->GetOwner());
|
||||
me->SelectLevel();
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
@@ -538,9 +538,9 @@ public:
|
||||
|
||||
if (deathTimer <= diff)
|
||||
{
|
||||
me->SetLootRecipient(me->GetOwner());
|
||||
me->LowerPlayerDamageReq(me->GetMaxHealth());
|
||||
Unit::Kill(me, me);
|
||||
me->SetLootRecipient(me->GetOwner());
|
||||
me->LowerPlayerDamageReq(me->GetMaxHealth());
|
||||
Unit::Kill(me, me);
|
||||
deathTimer = 600000;
|
||||
}
|
||||
else
|
||||
@@ -1430,7 +1430,7 @@ public:
|
||||
|
||||
RunAwayTimer = 5000;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
// expect database to have RegenHealth=0
|
||||
me->SetHealth(me->CountPctFromMaxHealth(70));
|
||||
@@ -2656,14 +2656,14 @@ class npc_stable_master : public CreatureScript
|
||||
|
||||
void AddSC_npcs_special()
|
||||
{
|
||||
// Ours
|
||||
new npc_elder_clearwater();
|
||||
new npc_riggle_bassbait();
|
||||
new npc_short_john_mirthil();
|
||||
new npc_target_dummy();
|
||||
new npc_training_dummy();
|
||||
// Ours
|
||||
new npc_elder_clearwater();
|
||||
new npc_riggle_bassbait();
|
||||
new npc_short_john_mirthil();
|
||||
new npc_target_dummy();
|
||||
new npc_training_dummy();
|
||||
|
||||
// Theirs
|
||||
// Theirs
|
||||
new npc_air_force_bots();
|
||||
new npc_lunaclaw_spirit();
|
||||
new npc_chicken_cluck();
|
||||
|
||||
Reference in New Issue
Block a user