Borean Tundra, support for quest 'Escape from the Winterfin Caverns', by manuel

Borean Tundra, support for quest 'Unfit for Death', by Malcrom and manuel
Borean Tundra, support for quest 'Drake Hunt' (both versions), by manuel
Closes #66

--HG--
branch : trunk
This commit is contained in:
tartalo
2009-11-07 19:38:21 +01:00
parent 5b7ef6fd2f
commit 808fe9ea63
5 changed files with 566 additions and 4 deletions
+46
View File
@@ -1675,3 +1675,49 @@ INSERT INTO `script_waypoint` VALUES
(23784, 21, 1608.51, -6175.83, 8.80075, 5, 'Apothecary Hanes'),
(23784, 22, 1619.15, -6167.6, 9.39125, 5, 'Apothecary Hanes'),
(23784, 23, 1634.05, -6153.81, 8.08527, 5, 'Apothecary Hanes');
DELETE FROM `script_waypoint` WHERE `entry`=25208;
INSERT INTO `script_waypoint` VALUES
(25208, 0, 4014.01, 6391.91, 29.9735, 17000, ''),
(25208, 1, 4029.05, 6374.1, 28.8288, 0, ''),
(25208, 2, 4039.11, 6370.05, 27.8701, 0, ''),
(25208, 3, 4052.24, 6364.92, 27.2941, 0, ''),
(25208, 4, 4058.31, 6357.79, 26.3543, 0, ''),
(25208, 5, 4062.46, 6346.26, 24.3838, 0, ''),
(25208, 6, 4063.82, 6334.14, 25.3818, 0, ''),
(25208, 7, 4062.66, 6319.39, 24.9775, 0, ''),
(25208, 8, 4061.14, 6307.67, 24.4034, 0, ''),
(25208, 9, 4059.64, 6301.33, 24.5615, 0, ''),
(25208, 10, 4066.46, 6292.12, 24.3167, 0, ''),
(25208, 11, 4078.37, 6280.88, 26.6926, 0, ''),
(25208, 12, 4087.03, 6281.33, 27.4604, 0, ''),
(25208, 13, 4097.8, 6282.47, 25.4414, 0, ''),
(25208, 14, 4107.07, 6279.26, 25.2578, 0, ''),
(25208, 15, 4114.68, 6279.78, 24.7762, 0, ''),
(25208, 16, 4122.9, 6280.34, 26.1671, 0, ''),
(25208, 17, 4127.69, 6280.67, 28.1951, 0, ''),
(25208, 18, 4134.75, 6282.09, 28.9761, 0, ''),
(25208, 19, 4141.62, 6281.92, 29.3518, 0, ''),
(25208, 20, 4152.14, 6281.43, 30.6951, 0, ''),
(25208, 21, 4159.63, 6282.6, 30.2401, 0, ''),
(25208, 22, 4169.82, 6289.25, 24.182, 0, ''),
(25208, 23, 4181.02, 6293.88, 18.035, 0, ''),
(25208, 24, 4189.27, 6295.87, 14.4513, 0, ''),
(25208, 25, 4200.09, 6298.4, 12.7249, 0, ''),
(25208, 26, 4206.46, 6291.56, 10.9628, 0, ''),
(25208, 27, 4211.45, 6282.82, 9.05693, 0, ''),
(25208, 28, 4215.22, 6277.25, 8.54002, 0, ''),
(25208, 29, 4215.28, 6268.57, 8.30674, 0, ''),
(25208, 30, 4224.23, 6269.53, 6.97205, 0, ''),
(25208, 31, 4235.98, 6270.9, 3.27214, 0, ''),
(25208, 32, 4242.67, 6269.45, 1.45579, 0, ''),
(25208, 33, 4250.43, 6262.49, 0.611961, 0, ''),
(25208, 34, 4259.07, 6253.33, -0.0686721, 0, ''),
(25208, 35, 4261.11, 6248.81, -0.112029, 0, ''),
(25208, 36, 4257.58, 6234.09, -0.094803, 0, ''),
(25208, 37, 4252.62, 6224.3, -0.154816, 0, ''),
(25208, 38, 4247.92, 6214.75, -0.221144, 0, ''),
(25208, 39, 4254.04, 6205.58, -0.186623, 0, ''),
(25208, 40, 4262.6, 6194.47, -0.145114, 0, ''),
(25208, 41, 4268.96, 6189.47, 0.0303093, 21000, '');
+5
View File
@@ -362,6 +362,11 @@ UPDATE `creature_template` SET `ScriptName`='npc_loklira_crone' WHERE `entry`=29
UPDATE `creature_template` SET `ScriptName`='npc_victorious_challenger' WHERE `entry`=30012;
UPDATE `creature_template` SET `ScriptName`='npc_mcgoyver' WHERE `entry`=24040;
UPDATE `creature_template` SET `ScriptName`='npc_jenny' WHERE `entry`=25969;
UPDATE `creature_template` SET `ScriptName`='npc_lurgglbr' WHERE `entry`=25208;
UPDATE `creature_template` SET `ScriptName`='npc_nexus_drake_hatchling' WHERE `entry`=26127;
UPDATE `creature_template` SET `ScriptName`='npc_nesingwary_trapper' WHERE `entry`=25835;
UPDATE `item_template` SET `ScriptName`='item_pile_fake_furs' WHERE `entry`=35127;
/* BURNING STEPPES */
UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563;
+49
View File
@@ -0,0 +1,49 @@
UPDATE `creature_template` SET `ScriptName`='npc_lurgglbr' WHERE `entry`=25208;
UPDATE `creature_template` SET `ScriptName`='npc_nexus_drake_hatchling' WHERE `entry`=26127;
UPDATE `creature_template` SET `ScriptName`='npc_nesingwary_trapper' WHERE `entry`=25835;
UPDATE `item_template` SET `ScriptName`='item_pile_fake_furs' WHERE `entry`=35127;
DELETE FROM `script_waypoint` WHERE `entry`=25208;
INSERT INTO `script_waypoint` VALUES
(25208, 0, 4014.01, 6391.91, 29.9735, 17000, ''),
(25208, 1, 4029.05, 6374.1, 28.8288, 0, ''),
(25208, 2, 4039.11, 6370.05, 27.8701, 0, ''),
(25208, 3, 4052.24, 6364.92, 27.2941, 0, ''),
(25208, 4, 4058.31, 6357.79, 26.3543, 0, ''),
(25208, 5, 4062.46, 6346.26, 24.3838, 0, ''),
(25208, 6, 4063.82, 6334.14, 25.3818, 0, ''),
(25208, 7, 4062.66, 6319.39, 24.9775, 0, ''),
(25208, 8, 4061.14, 6307.67, 24.4034, 0, ''),
(25208, 9, 4059.64, 6301.33, 24.5615, 0, ''),
(25208, 10, 4066.46, 6292.12, 24.3167, 0, ''),
(25208, 11, 4078.37, 6280.88, 26.6926, 0, ''),
(25208, 12, 4087.03, 6281.33, 27.4604, 0, ''),
(25208, 13, 4097.8, 6282.47, 25.4414, 0, ''),
(25208, 14, 4107.07, 6279.26, 25.2578, 0, ''),
(25208, 15, 4114.68, 6279.78, 24.7762, 0, ''),
(25208, 16, 4122.9, 6280.34, 26.1671, 0, ''),
(25208, 17, 4127.69, 6280.67, 28.1951, 0, ''),
(25208, 18, 4134.75, 6282.09, 28.9761, 0, ''),
(25208, 19, 4141.62, 6281.92, 29.3518, 0, ''),
(25208, 20, 4152.14, 6281.43, 30.6951, 0, ''),
(25208, 21, 4159.63, 6282.6, 30.2401, 0, ''),
(25208, 22, 4169.82, 6289.25, 24.182, 0, ''),
(25208, 23, 4181.02, 6293.88, 18.035, 0, ''),
(25208, 24, 4189.27, 6295.87, 14.4513, 0, ''),
(25208, 25, 4200.09, 6298.4, 12.7249, 0, ''),
(25208, 26, 4206.46, 6291.56, 10.9628, 0, ''),
(25208, 27, 4211.45, 6282.82, 9.05693, 0, ''),
(25208, 28, 4215.22, 6277.25, 8.54002, 0, ''),
(25208, 29, 4215.28, 6268.57, 8.30674, 0, ''),
(25208, 30, 4224.23, 6269.53, 6.97205, 0, ''),
(25208, 31, 4235.98, 6270.9, 3.27214, 0, ''),
(25208, 32, 4242.67, 6269.45, 1.45579, 0, ''),
(25208, 33, 4250.43, 6262.49, 0.611961, 0, ''),
(25208, 34, 4259.07, 6253.33, -0.0686721, 0, ''),
(25208, 35, 4261.11, 6248.81, -0.112029, 0, ''),
(25208, 36, 4257.58, 6234.09, -0.094803, 0, ''),
(25208, 37, 4252.62, 6224.3, -0.154816, 0, ''),
(25208, 38, 4247.92, 6214.75, -0.221144, 0, ''),
(25208, 39, 4254.04, 6205.58, -0.186623, 0, ''),
(25208, 40, 4262.6, 6194.47, -0.145114, 0, ''),
(25208, 41, 4268.96, 6189.47, 0.0303093, 21000, '');
@@ -27,9 +27,20 @@ npc_surristrasz
npc_tiare
npc_iruk
npc_corastrasza
npc_jenny
npc_sinkhole_kill_credit
npc_khunok_the_behemoth
npc_scourge_prisoner
mob_nerubar_victim
npc_keristrasza
npc_nesingwary_trapper
npc_lurgglbr
npc_nexus_drake_hatchling
EndContentData */
#include "precompiled.h"
#include "escort_ai.h"
#include "follower_ai.h"
/*######
## npc_fizzcrank_fullthrottle
@@ -521,10 +532,7 @@ enum eJenny
SPELL_GIVE_JENNY_CREDIT = 46358,
SPELL_CRATES_CARRIED = 46340,
SPELL_DROP_CRATE = 46342,
FACTION_ESCORT_A_NEUTRAL_ACTIVE = 231,
FACTION_ESCORT_H_NEUTRAL_ACTIVE = 232
SPELL_DROP_CRATE = 46342
};
struct TRINITY_DLL_DECL npc_jennyAI : public ScriptedAI
@@ -587,6 +595,380 @@ CreatureAI* GetAI_npc_jenny(Creature *pCreature)
return new npc_jennyAI (pCreature);
}
/*######
## npc_npc_nesingwary_trapper
######*/
enum eNesingwaryTrapper
{
GO_HIGH_QUALITY_FUR = 187983,
GO_CARIBOU_TRAP_1 = 187982,
GO_CARIBOU_TRAP_2 = 187995,
GO_CARIBOU_TRAP_3 = 187996,
GO_CARIBOU_TRAP_4 = 187997,
GO_CARIBOU_TRAP_5 = 187998,
GO_CARIBOU_TRAP_6 = 187999,
GO_CARIBOU_TRAP_7 = 188000,
GO_CARIBOU_TRAP_8 = 188001,
GO_CARIBOU_TRAP_9 = 188002,
GO_CARIBOU_TRAP_10 = 188003,
GO_CARIBOU_TRAP_11 = 188004,
GO_CARIBOU_TRAP_12 = 188005,
GO_CARIBOU_TRAP_13 = 188006,
GO_CARIBOU_TRAP_14 = 188007,
GO_CARIBOU_TRAP_15 = 188008,
SPELL_TRAPPED = 46104,
};
//#define SAY_NESINGWARY_1 -1571008
struct TRINITY_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI
{
npc_nesingwary_trapperAI(Creature *c) : ScriptedAI(c) {m_creature->SetVisibility(VISIBILITY_OFF);}
GameObject* go_caribou;
uint8 Phase;
uint32 Phase_Timer;
void Reset()
{
m_creature->SetVisibility(VISIBILITY_OFF);
Phase_Timer = 2500;
Phase = 1;
}
void EnterCombat(Unit *who) {}
void MoveInLineOfSight(Unit *who) {}
void JustDied(Unit* who)
{
go_caribou->SetLootState(GO_JUST_DEACTIVATED);
TempSummon *summon = (TempSummon*)m_creature;
((Player*)(summon->GetSummoner()))->KilledMonsterCredit(m_creature->GetEntry(),0);
go_caribou->SetGoState(GO_STATE_READY);
}
void UpdateAI(const uint32 diff)
{
if (Phase_Timer < diff)
{
switch (Phase)
{
case 1:
m_creature->SetVisibility(VISIBILITY_ON);
Phase_Timer = 2000;
Phase = 2;
break;
case 2:
if (GameObject* go_fur = m_creature->FindNearestGameObject(GO_HIGH_QUALITY_FUR,11.0f))
m_creature->GetMotionMaster()->MovePoint(0,go_fur->GetPositionX(),go_fur->GetPositionY(),go_fur->GetPositionZ());
Phase_Timer = 1500;
Phase = 3;
break;
case 3:
//DoScriptText(SAY_NESINGWARY_1, m_creature);
Phase_Timer = 2000;
Phase = 4;
break;
case 4:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LOOT);
Phase_Timer = 1000;
Phase = 5;
break;
case 5:
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_NONE);
Phase_Timer = 500;
Phase = 6;
break;
case 6:
if (GameObject* go_fur = m_creature->FindNearestGameObject(GO_HIGH_QUALITY_FUR,11.0f))
go_fur->Delete();
Phase_Timer = 500;
Phase = 7;
break;
case 7:
if ((go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_1, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_2, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_3, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_4, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_5, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_6, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_7, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_8, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_9, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_10, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_11, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_12, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_13, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_14, 5.0f)) ||
(go_caribou = m_creature->FindNearestGameObject(GO_CARIBOU_TRAP_15, 5.0f)))
go_caribou->SetGoState(GO_STATE_ACTIVE);
Phase = 8;
Phase_Timer = 1000;
break;
case 8:
m_creature->CastSpell(m_creature,SPELL_TRAPPED,true);
Phase = 0;
break;
}
} else Phase_Timer -= diff;
}
};
CreatureAI* GetAI_npc_nesingwary_trapper(Creature *pCreature)
{
return new npc_nesingwary_trapperAI (pCreature);
}
/*######
## npc_lurgglbr
######*/
enum eLurgglbr
{
QUEST_ESCAPE_WINTERFIN_CAVERNS = 11570,
GO_CAGE = 187369,
FACTION_ESCORTEE_A = 774,
FACTION_ESCORTEE_H = 775,
};
#define SAY_WP_1_LUR_START -1571004
#define SAY_WP_1_LUR_END -1571005
#define SAY_WP_41_LUR_START -1571006
#define SAY_WP_41_LUR_END -1571007
struct TRINITY_DLL_DECL npc_lurgglbrAI : public npc_escortAI
{
npc_lurgglbrAI(Creature* c) : npc_escortAI(c){}
uint32 IntroTimer;
uint32 IntroPhase;
void Reset()
{
IntroTimer = 0;
IntroPhase = 0;
}
void WaypointReached(uint32 i)
{
switch(i)
{
case 0:
IntroPhase = 1;
IntroTimer = 2000;
break;
case 41:
IntroPhase = 4;
IntroTimer = 2000;
break;
}
}
void UpdateAI(const uint32 diff)
{
if (IntroPhase)
{
if (IntroTimer < diff)
{
switch(IntroPhase)
{
case 1:
//DoScriptText(SAY_WP_1_LUR_START,m_creature);
IntroPhase = 2;
IntroTimer = 7500;
break;
case 2:
//DoScriptText(SAY_WP_1_LUR_END,m_creature);
IntroPhase = 3;
IntroTimer = 7500;
break;
case 3:
m_creature->SetReactState(REACT_AGGRESSIVE);
IntroPhase = 0;
IntroTimer = 0;
break;
case 4:
//DoScriptText(SAY_WP_41_LUR_START,m_creature);
IntroPhase = 5;
IntroTimer = 8000;
break;
case 5:
//DoScriptText(SAY_WP_41_LUR_END,m_creature);
IntroPhase = 6;
IntroTimer = 2500;
break;
case 6:
if (Player* pPlayer = GetPlayerForEscort())
pPlayer->AreaExploredOrEventHappens(QUEST_ESCAPE_WINTERFIN_CAVERNS);
IntroPhase = 7;
IntroTimer = 2500;
break;
case 7:
m_creature->ForcedDespawn();
IntroPhase = 0;
IntroTimer = 0;
break;
}
}else IntroTimer-=diff;
}
npc_escortAI::UpdateAI(diff);
}
};
CreatureAI* GetAI_npc_lurgglbr(Creature* pCreature)
{
return new npc_lurgglbrAI(pCreature);
}
bool QuestAccept_npc_lurgglbr(Player* pPlayer, Creature* pCreature, Quest const *_Quest)
{
if (_Quest->GetQuestId() == QUEST_ESCAPE_WINTERFIN_CAVERNS)
{
if(GameObject* pGo = pCreature->FindNearestGameObject(GO_CAGE,5.0f))
{
pGo->SetRespawnTime(0);
pGo->SetGoType(GAMEOBJECT_TYPE_BUTTON);
pGo->UseDoorOrButton(20);
}
if (npc_escortAI* pEscortAI = CAST_AI(npc_lurgglbrAI, pCreature->AI()))
pEscortAI->Start(true, false, pPlayer->GetGUID());
if (pPlayer->GetTeam() == ALLIANCE)
pCreature->setFaction(FACTION_ESCORTEE_A);
if (pPlayer->GetTeam() == HORDE)
pCreature->setFaction(FACTION_ESCORTEE_H);
return true;
}
return false;
}
/*######
## npc_nexus_drake_hatchling
######*/
enum eNexusDrakeHatchling
{
SPELL_DRAKE_HARPOON = 46607,
SPELL_RED_DRAGONBLOOD = 46620,
SPELL_DRAKE_HATCHLING_SUBDUED = 46691,
SPELL_SUBDUED = 46675,
NPC_RAELORASZ = 26117,
QUEST_DRAKE_HUNT = 11919,
QUEST_DRAKE_HUNT_D = 11940
};
struct TRINITY_DLL_DECL npc_nexus_drake_hatchlingAI : public FollowerAI //The spell who makes the npc follow the player is missing, also we can use FollowerAI!
{
npc_nexus_drake_hatchlingAI(Creature *c) : FollowerAI(c) {Reset();}
bool WithRedDragonBlood;
Unit* pPlayer;
void Reset()
{
WithRedDragonBlood = false;
}
void EnterCombat(Unit* pWho)
{
if (m_creature->canAttack(pWho))
m_creature->AI()->AttackStart(pWho);
}
void SpellHit(Unit *caster, const SpellEntry *spell)
{
if (spell->Id == SPELL_DRAKE_HARPOON)
{
pPlayer = caster;
m_creature->CastSpell(m_creature,SPELL_RED_DRAGONBLOOD,true);
WithRedDragonBlood = true;
}
}
void MoveInLineOfSight(Unit *pWho)
{
FollowerAI::MoveInLineOfSight(pWho);
if (m_creature->HasAura(SPELL_SUBDUED) && pWho->GetEntry() == NPC_RAELORASZ)
{
if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE))
{
((Player*)(pPlayer))->KilledMonsterCredit(26175,0);
((Player*)(pPlayer))->RemoveAura(SPELL_DRAKE_HATCHLING_SUBDUED);
SetFollowComplete();
m_creature->DisappearAndDie();
}
}
}
void UpdateAI(const uint32 diff)
{
if (WithRedDragonBlood && !m_creature->HasAura(SPELL_RED_DRAGONBLOOD))
{
if (npc_nexus_drake_hatchlingAI* pDrakeAI = CAST_AI(npc_nexus_drake_hatchlingAI, m_creature->AI()))
{
EnterEvadeMode();
pDrakeAI->StartFollow((Player*)(pPlayer), 35, NULL);
}
m_creature->CastSpell(m_creature,SPELL_SUBDUED,true);
((Player*)(pPlayer))->CastSpell((Player*)(pPlayer),SPELL_DRAKE_HATCHLING_SUBDUED,true);
m_creature->AttackStop();
WithRedDragonBlood = false;
}
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_npc_nexus_drake_hatchling(Creature* pCreature)
{
return new npc_nexus_drake_hatchlingAI(pCreature);
}
void AddSC_borean_tundra()
{
@@ -652,4 +1034,21 @@ void AddSC_borean_tundra()
newscript->Name = "npc_jenny";
newscript->GetAI = &GetAI_npc_jenny;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_nesingwary_trapper";
newscript->GetAI = &GetAI_npc_nesingwary_trapper;
newscript->RegisterSelf();
newscript = new Script;
newscript = new Script;
newscript->Name = "npc_lurgglbr";
newscript->GetAI = &GetAI_npc_lurgglbr;
newscript->pQuestAccept = &QuestAccept_npc_lurgglbr;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_nexus_drake_hatchling";
newscript->GetAI = &GetAI_npc_nexus_drake_hatchling;
newscript->RegisterSelf();
}
@@ -230,6 +230,64 @@ bool ItemUse_item_harvesters_gift(Player* pPlayer, Item* pItem, SpellCastTargets
return true;
}
/*#####
# item_pile_fake_furs
#####*/
enum ePileFakeFur
{
GO_CARIBOU_TRAP_1 = 187982,
GO_CARIBOU_TRAP_2 = 187995,
GO_CARIBOU_TRAP_3 = 187996,
GO_CARIBOU_TRAP_4 = 187997,
GO_CARIBOU_TRAP_5 = 187998,
GO_CARIBOU_TRAP_6 = 187999,
GO_CARIBOU_TRAP_7 = 188000,
GO_CARIBOU_TRAP_8 = 188001,
GO_CARIBOU_TRAP_9 = 188002,
GO_CARIBOU_TRAP_10 = 188003,
GO_CARIBOU_TRAP_11 = 188004,
GO_CARIBOU_TRAP_12 = 188005,
GO_CARIBOU_TRAP_13 = 188006,
GO_CARIBOU_TRAP_14 = 188007,
GO_CARIBOU_TRAP_15 = 188008,
GO_HIGH_QUALITY_FUR = 187983,
NPC_NESINGWARY_TRAPPER = 25835
};
bool ItemUse_item_pile_fake_furs(Player* pPlayer, Item* _Item, SpellCastTargets const& targets)
{
GameObject* pGo;
if ((pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_1, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_2, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_3, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_4, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_5, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_6, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_7, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_8, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_9, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_10, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_11, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_12, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_13, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_14, 5.0f)) ||
(pGo = pPlayer->FindNearestGameObject(GO_CARIBOU_TRAP_15, 5.0f)))
{
if (pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER,10.0f,true) || pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER,10.0f,false) || pGo->FindNearestGameObject(GO_HIGH_QUALITY_FUR,2.0f))
return true;
float x, y, z;
pGo->GetClosePoint(x, y, z, pGo->GetObjectSize() / 3, 7.0f);
pGo->SummonGameObject(GO_HIGH_QUALITY_FUR,pGo->GetPositionX(),pGo->GetPositionY(),pGo->GetPositionZ(),0,0,0,0,0,1000);
if (TempSummon* summon = pPlayer->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
{
summon->SetVisibility(VISIBILITY_OFF);
summon->SetReactState(REACT_PASSIVE);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}
} else
return true;
}
void AddSC_item_scripts()
{
Script *newscript;
@@ -278,5 +336,10 @@ void AddSC_item_scripts()
newscript->Name = "item_harvesters_gift";
newscript->pItemUse = &ItemUse_item_harvesters_gift;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "item_pile_fake_furs";
newscript->pItemUse = &ItemUse_item_pile_fake_furs;
newscript->RegisterSelf();
}