Merge [SD2]
r1172 Replace some DealDamage() with ForcedDespawn() r1173 Added a few more texts for quest 12733 r1174 Allow escortAI to continue run for as long as at least one member of party is in range (in case original player who start escort is in party). r1175 Correct gossip text, wrong in rev 1173. r1176 Correcting a bug for script related to quest 11129. Also use explicit boolean as check if still moving to location. r1177 Adjusting tempsummon time for Opera event bosses and also despawn if creatures evade. r1178 Remove not needed code (already called from escortAI::UpdateAI) --HG-- branch : trunk
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
-- Up to TC2 4748
|
-- Up to TC2 4748
|
||||||
--
|
--
|
||||||
-- trinityscript_script_texts.sql Contains data for table `script_texts` mainly used in C++ parts.
|
-- trinityscript_script_texts.sql Contains data for table `script_texts` mainly used in C++ parts.
|
||||||
-- valid entries for table are between -1000000 and -1999999
|
-- valid entries for table are between -1000000 and -1999999
|
||||||
@@ -1873,12 +1873,6 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
|||||||
(-1609014, 'Sate your hunger on cold steel\, $R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_7'),
|
(-1609014, 'Sate your hunger on cold steel\, $R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_7'),
|
||||||
(-1609015, 'It ends here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_8'),
|
(-1609015, 'It ends here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_8'),
|
||||||
(-1609016, 'Death is the only cure!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_9'),
|
(-1609016, 'Death is the only cure!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'unworthy_initiate SAY_EVENT_ATTACK_9'),
|
||||||
(-1609017,'No potions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_A'),
|
|
||||||
(-1609018,'Remember this day, $n, for it is the day that you will be thoroughly owned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_B'),
|
|
||||||
(-1609019,'I\'m going to tear your heart out, cupcake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_C'),
|
|
||||||
(-1609020,'Don\'t make me laugh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_D'),
|
|
||||||
(-1609021,'Here come the tears...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_E'),
|
|
||||||
(-1609022,'You have challenged death itself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_F'),
|
|
||||||
(-1609025,'Come to finish the job, have you?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_1'),
|
(-1609025,'Come to finish the job, have you?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_1'),
|
||||||
(-1609026,'Come to finish the job, have ye?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_2'),
|
(-1609026,'Come to finish the job, have ye?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_2'),
|
||||||
(-1609027,'Come ta finish da job, mon?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_3'),
|
(-1609027,'Come ta finish da job, mon?', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_START_3'),
|
||||||
@@ -1932,7 +1926,16 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
|||||||
(-1609075,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Mulgore. This world is worth saving.', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,18,'special_surprise SAY_EXEC_TIME_9'),
|
(-1609075,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Mulgore. This world is worth saving.', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,18,'special_surprise SAY_EXEC_TIME_9'),
|
||||||
(-1609076,'Der... Der\'s no more time for me. I be done for. Finish me off $N. Do it or they\'ll kill us both. $N... Remember Sen\'jin Village, mon! Dis world be worth saving!', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,18,'special_surprise SAY_EXEC_TIME_10'),
|
(-1609076,'Der... Der\'s no more time for me. I be done for. Finish me off $N. Do it or they\'ll kill us both. $N... Remember Sen\'jin Village, mon! Dis world be worth saving!', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,18,'special_surprise SAY_EXEC_TIME_10'),
|
||||||
(-1609077,'Do it, $N! Put me out of my misery!', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_WAITING'),
|
(-1609077,'Do it, $N! Put me out of my misery!', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,0,0,1,'special_surprise SAY_EXEC_WAITING'),
|
||||||
(-1609078,'dies from his wounds.', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,2,0,0,'special_surprise EMOTE_DIES');
|
(-1609078,'dies from his wounds.', NULL,NULL, NULL,NULL, NULL,NULL, NULL,NULL,0,2,0,0,'special_surprise EMOTE_DIES'),
|
||||||
|
(-1609080,'No potions!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_A'),
|
||||||
|
(-1609081,'Remember this day, $n, for it is the day that you will be thoroughly owned.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_B'),
|
||||||
|
(-1609082,'I\'m going to tear your heart out, cupcake!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_C'),
|
||||||
|
(-1609083,'Don\'t make me laugh.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_D'),
|
||||||
|
(-1609084,'Here come the tears...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_E'),
|
||||||
|
(-1609085,'You have challenged death itself!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_F'),
|
||||||
|
(-1609086,'The Lich King will see his true champion on this day!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_G'),
|
||||||
|
(-1609087,'You\'re going down!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_H'),
|
||||||
|
(-1609088,'You don\'t stand a chance, $n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_I');
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Below just for beautiful view in table, run at own desire
|
-- Below just for beautiful view in table, run at own desire
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
UPDATE script_texts SET entry=-1609080 WHERE entry=-1609017;
|
||||||
|
UPDATE script_texts SET entry=-1609081 WHERE entry=-1609018;
|
||||||
|
UPDATE script_texts SET entry=-1609082 WHERE entry=-1609019;
|
||||||
|
UPDATE script_texts SET entry=-1609083 WHERE entry=-1609020;
|
||||||
|
UPDATE script_texts SET entry=-1609084 WHERE entry=-1609021;
|
||||||
|
UPDATE script_texts SET entry=-1609085 WHERE entry=-1609022;
|
||||||
|
|
||||||
|
DELETE FROM script_texts WHERE entry IN (-1609086,-1609087,-1609088);
|
||||||
|
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
|
||||||
|
(-1609086,'The Lich King will see his true champion on this day!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_G'),
|
||||||
|
(-1609087,'You\'re going down!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_H'),
|
||||||
|
(-1609088,'You don\'t stand a chance, $n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,0,0,0,'dk_initiate SAY_DUEL_I');
|
||||||
@@ -147,34 +147,53 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
|||||||
}else WaitTimer -= diff;
|
}else WaitTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if player is within range
|
//Check if player or any member of his group is within range
|
||||||
if (IsBeingEscorted && !m_creature->isInCombat() && PlayerGUID)
|
if (IsBeingEscorted && PlayerGUID && !m_creature->getVictim() && !m_creature->IsInEvadeMode())
|
||||||
{
|
{
|
||||||
if (PlayerTimer < diff)
|
if (PlayerTimer < diff)
|
||||||
{
|
|
||||||
Unit* p = Unit::GetUnit(*m_creature, PlayerGUID);
|
|
||||||
|
|
||||||
if (DespawnAtFar && (!p || !m_creature->IsWithinDist(p,GetMaxPlayerDistance())))
|
|
||||||
{
|
{
|
||||||
JustDied(m_creature);
|
bool bIsMaxRangeExceeded = true;
|
||||||
IsBeingEscorted = false;
|
|
||||||
|
|
||||||
debug_log("TSCR: EscortAI Evaded back to spawn point because player was to far away or not found");
|
if (Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||||
|
{
|
||||||
|
if (Group* pGroup = pPlayer->GetGroup())
|
||||||
|
{
|
||||||
|
for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
|
||||||
|
{
|
||||||
|
Player* pMember = pRef->getSource();
|
||||||
|
|
||||||
m_creature->setDeathState(JUST_DIED);
|
if (pMember && m_creature->IsWithinDistInMap(pMember, GetMaxPlayerDistance()))
|
||||||
m_creature->SetHealth(0);
|
{
|
||||||
m_creature->CombatStop(true);
|
bIsMaxRangeExceeded = false;
|
||||||
m_creature->DeleteThreatList();
|
break;
|
||||||
m_creature->Respawn();
|
}
|
||||||
m_creature->GetMotionMaster()->Clear(true);
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_creature->IsWithinDistInMap(pPlayer, GetMaxPlayerDistance()))
|
||||||
|
bIsMaxRangeExceeded = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Restore original NpcFlags
|
if (DespawnAtFar && bIsMaxRangeExceeded)
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags);
|
{
|
||||||
|
JustDied(m_creature);
|
||||||
|
IsBeingEscorted = false;
|
||||||
|
|
||||||
}
|
debug_log("TSCR: EscortAI Evaded back to spawn point because player/group was to far away or not found");
|
||||||
|
|
||||||
|
m_creature->setDeathState(JUST_DIED);
|
||||||
|
|
||||||
|
//TODO: add option to set instant respawn? Then use db respawn value as default
|
||||||
|
m_creature->Respawn();
|
||||||
|
|
||||||
|
//Restore original NpcFlags
|
||||||
|
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_creature->GetCreatureInfo()->npcflag);
|
||||||
|
}
|
||||||
|
|
||||||
PlayerTimer = 1000;
|
PlayerTimer = 1000;
|
||||||
}else PlayerTimer -= diff;
|
}else PlayerTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CanMelee && UpdateVictim())
|
if(CanMelee && UpdateVictim())
|
||||||
|
|||||||
@@ -68,9 +68,7 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
|
|||||||
// we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons
|
// we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons
|
||||||
if( spellhit && morphtimer>=5000 )
|
if( spellhit && morphtimer>=5000 )
|
||||||
{
|
{
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->ForcedDespawn();
|
||||||
m_creature->RemoveCorpse(); //you don't see any corpse on off.
|
|
||||||
EnterEvadeMode(); //spellhit will be set to false
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// walk 5 seconds before summoning
|
// walk 5 seconds before summoning
|
||||||
@@ -271,18 +269,12 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
|||||||
Reached = false;
|
Reached = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Despawn()
|
|
||||||
{
|
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
|
||||||
m_creature->RemoveCorpse();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(Must_Die)
|
if(Must_Die)
|
||||||
if(Must_Die_Timer < diff)
|
if(Must_Die_Timer < diff)
|
||||||
{
|
{
|
||||||
Despawn();
|
m_creature->ForcedDespawn();
|
||||||
return;
|
return;
|
||||||
} else Must_Die_Timer -= diff;
|
} else Must_Die_Timer -= diff;
|
||||||
|
|
||||||
@@ -342,7 +334,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
|||||||
Player *player = Unit::GetPlayer(PlayerGUID);
|
Player *player = Unit::GetPlayer(PlayerGUID);
|
||||||
if(!player)
|
if(!player)
|
||||||
{
|
{
|
||||||
Despawn();
|
m_creature->ForcedDespawn();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +384,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
|||||||
|
|
||||||
if(id == 57)
|
if(id == 57)
|
||||||
{
|
{
|
||||||
Despawn();
|
m_creature->ForcedDespawn();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,8 +444,7 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
|
|||||||
if(we_must_die)
|
if(we_must_die)
|
||||||
if(must_die_timer < diff)
|
if(must_die_timer < diff)
|
||||||
{
|
{
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->ForcedDespawn();
|
||||||
m_creature->RemoveCorpse();
|
|
||||||
} else must_die_timer -= diff;
|
} else must_die_timer -= diff;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,10 +142,9 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
|
|
||||||
if(EssenceGUID)
|
if(EssenceGUID)
|
||||||
{
|
{
|
||||||
if(Unit* Essence = Unit::GetUnit(*m_creature, EssenceGUID))
|
if(Creature* Essence = Unit::GetCreature(*m_creature, EssenceGUID))
|
||||||
{
|
{
|
||||||
Essence->SetVisibility(VISIBILITY_OFF);
|
Essence->ForcedDespawn();
|
||||||
Essence->setDeathState(DEAD);
|
|
||||||
}
|
}
|
||||||
EssenceGUID = 0;
|
EssenceGUID = 0;
|
||||||
}
|
}
|
||||||
@@ -302,8 +301,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(DESI_SAY_AFTER, Essence);
|
DoScriptText(DESI_SAY_AFTER, Essence);
|
||||||
}
|
}
|
||||||
Essence->SetVisibility(VISIBILITY_OFF);
|
Essence->ForcedDespawn();
|
||||||
Essence->setDeathState(JUST_DIED);
|
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
|
||||||
EssenceGUID = 0;
|
EssenceGUID = 0;
|
||||||
SoulCount = 0;
|
SoulCount = 0;
|
||||||
|
|||||||
@@ -329,15 +329,14 @@ struct TRINITY_DLL_DECL boss_victor_nefariusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (NefCheckTime < diff)
|
if (NefCheckTime < diff)
|
||||||
{
|
{
|
||||||
Unit* Nefarian = NULL;
|
Unit* Nefarian = (Creature*)Unit::GetUnit((*m_creature),NefarianGUID);
|
||||||
Nefarian = Unit::GetUnit((*m_creature),NefarianGUID);
|
|
||||||
|
|
||||||
//If nef is dead then we die to so the players get out of combat
|
//If nef is dead then we die to so the players get out of combat
|
||||||
//and cannot repeat the event
|
//and cannot repeat the event
|
||||||
if (!Nefarian || !Nefarian->isAlive())
|
if (!Nefarian || !Nefarian->isAlive())
|
||||||
{
|
{
|
||||||
NefarianGUID = 0;
|
NefarianGUID = 0;
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->ForcedDespawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
NefCheckTime = 2000;
|
NefCheckTime = 2000;
|
||||||
|
|||||||
+5
-8
@@ -312,10 +312,10 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
if(InnderDemon[i])
|
if(InnderDemon[i])
|
||||||
{
|
{
|
||||||
//delete creature
|
//delete creature
|
||||||
Unit* pUnit = Unit::GetUnit((*m_creature), InnderDemon[i]);
|
Creature* pCreature = Unit::GetCreature((*m_creature), InnderDemon[i]);
|
||||||
if (pUnit && pUnit->isAlive())
|
if (pCreature && pCreature->isAlive())
|
||||||
{
|
{
|
||||||
pUnit->DealDamage(pUnit, pUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
pCreature->ForcedDespawn();
|
||||||
}
|
}
|
||||||
InnderDemon[i] = 0;
|
InnderDemon[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -376,11 +376,8 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
//despawn copy
|
//despawn copy
|
||||||
if (Demon)
|
if (Demon)
|
||||||
{
|
{
|
||||||
Unit *pUnit = NULL;
|
if (Creature* pDemon = Unit::GetCreature(*m_creature, Demon))
|
||||||
pUnit = Unit::GetUnit((*m_creature), Demon);
|
pDemon->ForcedDespawn();
|
||||||
|
|
||||||
if (pUnit)
|
|
||||||
pUnit->DealDamage(pUnit, pUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
|
||||||
}
|
}
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
|
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
|
||||||
|
|||||||
+2
-1
@@ -336,7 +336,8 @@ struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
|||||||
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
||||||
|
|
||||||
//despawn
|
//despawn
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->ForcedDespawn();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
Check_Timer = 500;
|
Check_Timer = 500;
|
||||||
}else Check_Timer -= diff;
|
}else Check_Timer -= diff;
|
||||||
|
|||||||
@@ -791,16 +791,19 @@ bool GOHello_go_acherus_soul_prison(Player *player, GameObject* _GO)
|
|||||||
## npc_death_knight_initiate
|
## npc_death_knight_initiate
|
||||||
######*/
|
######*/
|
||||||
|
|
||||||
#define GOSSIP_ACCEPT_DUEL "[PH] I challenge you!"
|
#define GOSSIP_ACCEPT_DUEL "I challenge you, death knight!"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SAY_DUEL_A = -1609017,
|
SAY_DUEL_A = -1609080,
|
||||||
SAY_DUEL_B = -1609018,
|
SAY_DUEL_B = -1609081,
|
||||||
SAY_DUEL_C = -1609019,
|
SAY_DUEL_C = -1609082,
|
||||||
SAY_DUEL_D = -1609020,
|
SAY_DUEL_D = -1609083,
|
||||||
SAY_DUEL_E = -1609021,
|
SAY_DUEL_E = -1609084,
|
||||||
SAY_DUEL_F = -1609022,
|
SAY_DUEL_F = -1609085,
|
||||||
|
SAY_DUEL_G = -1609086,
|
||||||
|
SAY_DUEL_H = -1609087,
|
||||||
|
SAY_DUEL_I = -1609088,
|
||||||
|
|
||||||
SPELL_DUEL = 52996,
|
SPELL_DUEL = 52996,
|
||||||
SPELL_DUEL_TRIGGERED = 52990,
|
SPELL_DUEL_TRIGGERED = 52990,
|
||||||
@@ -813,7 +816,7 @@ enum
|
|||||||
|
|
||||||
int32 m_auiRandomSay[] =
|
int32 m_auiRandomSay[] =
|
||||||
{
|
{
|
||||||
SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F
|
SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI
|
struct TRINITY_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI
|
||||||
|
|||||||
+1
-2
@@ -149,8 +149,7 @@ struct TRINITY_DLL_DECL mob_abyssalAI : public ScriptedAI
|
|||||||
|
|
||||||
if(Despawn_Timer < diff)
|
if(Despawn_Timer < diff)
|
||||||
{
|
{
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->ForcedDespawn();
|
||||||
m_creature->setDeathState(JUST_DIED);
|
|
||||||
}else Despawn_Timer -= diff;
|
}else Despawn_Timer -= diff;
|
||||||
|
|
||||||
if(!UpdateVictim())
|
if(!UpdateVictim())
|
||||||
|
|||||||
@@ -182,9 +182,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(PortalGUID[i])
|
if(PortalGUID[i])
|
||||||
{
|
{
|
||||||
Unit* Portal = Unit::GetUnit((*m_creature), PortalGUID[i]);
|
if(Creature* pPortal = Unit::GetCreature(*m_creature, PortalGUID[i]))
|
||||||
if(Portal)
|
pPortal->ForcedDespawn();
|
||||||
Portal->DealDamage(Portal, Portal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
|
||||||
|
|
||||||
PortalGUID[i] = 0;
|
PortalGUID[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -240,9 +239,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(PortalGUID[i])
|
if(PortalGUID[i])
|
||||||
{
|
{
|
||||||
Unit* Portal = Unit::GetUnit((*m_creature), PortalGUID[i]);
|
if(Creature* pPortal = Unit::GetCreature((*m_creature), PortalGUID[i]))
|
||||||
if(Portal)
|
pPortal->ForcedDespawn();
|
||||||
Portal->DealDamage(Portal, Portal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
|
||||||
|
|
||||||
PortalGUID[i] = 0;
|
PortalGUID[i] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,16 +86,15 @@ EndScriptData */
|
|||||||
#define CREATURE_CYCLONE 18412
|
#define CREATURE_CYCLONE 18412
|
||||||
#define CREATURE_CRONE 18168
|
#define CREATURE_CRONE 18168
|
||||||
|
|
||||||
void SummonCroneIfReady(ScriptedInstance* pInstance, Creature *_Creature)
|
void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, 0); // Increment DeathCount
|
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, 0); // Increment DeathCount
|
||||||
if(pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4)
|
if(pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4)
|
||||||
{
|
{
|
||||||
Creature* Crone = _Creature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, _Creature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
|
||||||
if(Crone)
|
|
||||||
{
|
{
|
||||||
if(_Creature->getVictim())
|
if(pCreature->getVictim())
|
||||||
Crone->AI()->AttackStart(_Creature->getVictim());
|
pCrone->AI()->AttackStart(pCreature->getVictim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -135,6 +134,11 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_DOROTHEE_AGGRO, m_creature);
|
DoScriptText(SAY_DOROTHEE_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void SummonTito(); // See below
|
void SummonTito(); // See below
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
@@ -294,6 +298,11 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_STRAWMAN_AGGRO, m_creature);
|
DoScriptText(SAY_STRAWMAN_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void SpellHit(Unit* caster, const SpellEntry *Spell)
|
void SpellHit(Unit* caster, const SpellEntry *Spell)
|
||||||
{
|
{
|
||||||
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10)))
|
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10)))
|
||||||
@@ -379,6 +388,11 @@ struct TRINITY_DLL_DECL boss_tinheadAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_TINHEAD_AGGRO, m_creature);
|
DoScriptText(SAY_TINHEAD_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who)
|
void AttackStart(Unit* who)
|
||||||
{
|
{
|
||||||
if(m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
if(m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
@@ -486,6 +500,11 @@ struct TRINITY_DLL_DECL boss_roarAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_ROAR_AGGRO, m_creature);
|
DoScriptText(SAY_ROAR_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_ROAR_DEATH, m_creature);
|
DoScriptText(SAY_ROAR_DEATH, m_creature);
|
||||||
@@ -553,6 +572,11 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI
|
|||||||
ChainLightningTimer = 10000;
|
ChainLightningTimer = 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
@@ -702,21 +726,14 @@ bool GossipHello_npc_grandmother(Player* player, Creature* _Creature)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GossipSelect_npc_grandmother(Player* player, Creature* _Creature, uint32 sender, uint32 action)
|
bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
|
||||||
{
|
{
|
||||||
if(action == GOSSIP_ACTION_INFO_DEF)
|
if(action == GOSSIP_ACTION_INFO_DEF)
|
||||||
{
|
{
|
||||||
_Creature->SetVisibility(VISIBILITY_OFF);
|
if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
|
||||||
float x,y,z;
|
pBigBadWolf->AI()->AttackStart(pPlayer);
|
||||||
_Creature->GetPosition(x,y,z);
|
|
||||||
Creature* BigBadWolf = _Creature->SummonCreature(CREATURE_BIG_BAD_WOLF, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
|
||||||
if(BigBadWolf)
|
|
||||||
{
|
|
||||||
BigBadWolf->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
|
||||||
BigBadWolf->AI()->AttackStart(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
_Creature->setDeathState(JUST_DIED);
|
pCreature->ForcedDespawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -757,6 +774,11 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_WOLF_AGGRO, m_creature);
|
DoScriptText(SAY_WOLF_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH);
|
DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH);
|
||||||
@@ -918,6 +940,7 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
EntryYellTimer = 1000;
|
EntryYellTimer = 1000;
|
||||||
AggroYellTimer = 10000;
|
AggroYellTimer = 10000;
|
||||||
|
IsFakingDeath = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -944,16 +967,6 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
if(RomuloGUID)
|
|
||||||
{
|
|
||||||
if(Unit* Romulo = Unit::GetUnit(*m_creature, RomuloGUID))
|
|
||||||
{
|
|
||||||
Romulo->SetVisibility(VISIBILITY_OFF);
|
|
||||||
Romulo->DealDamage(Romulo, Romulo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
RomuloGUID = 0;
|
RomuloGUID = 0;
|
||||||
Phase = PHASE_JULIANNE;
|
Phase = PHASE_JULIANNE;
|
||||||
|
|
||||||
@@ -966,9 +979,11 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
ResurrectSelfTimer = 0;
|
ResurrectSelfTimer = 0;
|
||||||
|
|
||||||
if(IsFakingDeath)
|
if(IsFakingDeath)
|
||||||
|
{
|
||||||
Resurrect(m_creature);
|
Resurrect(m_creature);
|
||||||
|
IsFakingDeath = false;
|
||||||
|
}
|
||||||
|
|
||||||
IsFakingDeath = false;
|
|
||||||
SummonedRomulo = false;
|
SummonedRomulo = false;
|
||||||
RomuloDead = false;
|
RomuloDead = false;
|
||||||
}
|
}
|
||||||
@@ -991,6 +1006,11 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
ScriptedAI::MoveInLineOfSight(who);
|
ScriptedAI::MoveInLineOfSight(who);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void SpellHit(Unit* caster, const SpellEntry *Spell)
|
void SpellHit(Unit* caster, const SpellEntry *Spell)
|
||||||
{
|
{
|
||||||
if (Spell->Id == SPELL_DRINK_POISON)
|
if (Spell->Id == SPELL_DRINK_POISON)
|
||||||
@@ -1064,6 +1084,11 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI
|
|||||||
JulianneDead = false;
|
JulianneDead = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustReachedHome()
|
||||||
|
{
|
||||||
|
m_creature->ForcedDespawn();
|
||||||
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* done_by, uint32 &damage);
|
void DamageTaken(Unit* done_by, uint32 &damage);
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
@@ -1265,19 +1290,14 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
|
|||||||
{
|
{
|
||||||
if(SummonRomuloTimer < diff)
|
if(SummonRomuloTimer < diff)
|
||||||
{
|
{
|
||||||
Creature* Romulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
|
||||||
if(Romulo)
|
|
||||||
{
|
{
|
||||||
RomuloGUID = Romulo->GetGUID();
|
RomuloGUID = pRomulo->GetGUID();
|
||||||
CAST_AI(boss_romuloAI, Romulo->AI())->JulianneGUID = m_creature->GetGUID();
|
CAST_AI(boss_romuloAI, pRomulo->AI())->JulianneGUID = m_creature->GetGUID();
|
||||||
CAST_AI(boss_romuloAI, Romulo->AI())->Phase = PHASE_ROMULO;
|
CAST_AI(boss_romuloAI, pRomulo->AI())->Phase = PHASE_ROMULO;
|
||||||
Romulo->setFaction(16);
|
DoZoneInCombat(pRomulo);
|
||||||
|
|
||||||
if(m_creature->getVictim())
|
pRomulo->setFaction(16);
|
||||||
{
|
|
||||||
Romulo->AddThreat(m_creature->getVictim(), 0.0f);
|
|
||||||
}
|
|
||||||
DoZoneInCombat(Romulo);
|
|
||||||
}
|
}
|
||||||
SummonedRomulo = true;
|
SummonedRomulo = true;
|
||||||
}else SummonRomuloTimer -= diff;
|
}else SummonRomuloTimer -= diff;
|
||||||
|
|||||||
@@ -296,11 +296,6 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartEvent()
|
void StartEvent()
|
||||||
@@ -344,7 +339,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
uint32 entry = ((uint32)Spawns[index][0]);
|
uint32 entry = ((uint32)Spawns[index][0]);
|
||||||
float PosX = Spawns[index][1];
|
float PosX = Spawns[index][1];
|
||||||
if (Creature* pCreature = m_creature->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000))
|
if (Creature* pCreature = m_creature->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
|
||||||
{
|
{
|
||||||
// In case database has bad flags
|
// In case database has bad flags
|
||||||
pCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
|
pCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
npc_kyle_frenziedAI(Creature *c) : ScriptedAI(c) {}
|
npc_kyle_frenziedAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
bool bEvent;
|
bool bEvent;
|
||||||
|
bool m_bIsMovingToLunch;
|
||||||
uint64 uiPlayerGUID;
|
uint64 uiPlayerGUID;
|
||||||
uint32 uiEventTimer;
|
uint32 uiEventTimer;
|
||||||
uint8 uiEventPhase;
|
uint8 uiEventPhase;
|
||||||
@@ -85,9 +86,10 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
bEvent = false;
|
bEvent = false;
|
||||||
|
m_bIsMovingToLunch = false;
|
||||||
uiPlayerGUID = 0;
|
uiPlayerGUID = 0;
|
||||||
uiEventTimer = 5000;
|
uiEventTimer = 5000;
|
||||||
uiEventPhase = 1;
|
uiEventPhase = 0;
|
||||||
|
|
||||||
if (m_creature->GetEntry() == NPC_KYLE_FRIENDLY)
|
if (m_creature->GetEntry() == NPC_KYLE_FRIENDLY)
|
||||||
m_creature->UpdateEntry(NPC_KYLE_FRENZIED);
|
m_creature->UpdateEntry(NPC_KYLE_FRENZIED);
|
||||||
@@ -95,7 +97,7 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
|
|
||||||
void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
|
void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
|
||||||
{
|
{
|
||||||
if (!m_creature->isInCombat() && !bEvent && pSpell->Id == SPELL_LUNCH)
|
if (!m_creature->getVictim() && !bEvent && pSpell->Id == SPELL_LUNCH)
|
||||||
{
|
{
|
||||||
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
if (pCaster->GetTypeId() == TYPEID_PLAYER)
|
||||||
uiPlayerGUID = pCaster->GetGUID();
|
uiPlayerGUID = pCaster->GetGUID();
|
||||||
@@ -119,37 +121,38 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiPointId == POINT_ID)
|
if (uiPointId == POINT_ID)
|
||||||
uiEventTimer = 5000;
|
m_bIsMovingToLunch = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (bEvent)
|
if (bEvent)
|
||||||
{
|
{
|
||||||
if (!uiEventTimer)
|
if (m_bIsMovingToLunch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (uiEventTimer < diff)
|
if (uiEventTimer < diff)
|
||||||
{
|
{
|
||||||
|
uiEventTimer = 5000;
|
||||||
|
++uiEventPhase;
|
||||||
|
|
||||||
switch(uiEventPhase)
|
switch(uiEventPhase)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
uiEventTimer = 0;
|
|
||||||
|
|
||||||
if (Unit* pUnit = Unit::GetUnit(*m_creature,uiPlayerGUID))
|
if (Unit* pUnit = Unit::GetUnit(*m_creature,uiPlayerGUID))
|
||||||
{
|
{
|
||||||
if (GameObject* pGo = pUnit->GetGameObject(SPELL_LUNCH))
|
if (GameObject* pGo = pUnit->GetGameObject(SPELL_LUNCH))
|
||||||
|
{
|
||||||
|
m_bIsMovingToLunch = true;
|
||||||
m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
|
m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
uiEventTimer = 5000;
|
|
||||||
DoScriptText(EMOTE_EAT_LUNCH, m_creature);
|
DoScriptText(EMOTE_EAT_LUNCH, m_creature);
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
uiEventTimer = 5000;
|
|
||||||
|
|
||||||
if (Player* pUnit = Unit::GetPlayer(uiPlayerGUID))
|
if (Player* pUnit = Unit::GetPlayer(uiPlayerGUID))
|
||||||
pUnit->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID());
|
pUnit->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID());
|
||||||
|
|
||||||
@@ -166,9 +169,6 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
m_creature->GetMotionMaster()->Clear();
|
m_creature->GetMotionMaster()->Clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uiEventPhase != 5)
|
|
||||||
++uiEventPhase;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
uiEventTimer -= diff;
|
uiEventTimer -= diff;
|
||||||
|
|||||||
Reference in New Issue
Block a user