diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 628 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp | 8 | ||||
| -rw-r--r-- | src/game/AnimalRandomMovementGenerator.h | 31 | ||||
| -rw-r--r-- | src/game/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/game/GossipDef.cpp | 2 | ||||
| -rw-r--r-- | src/game/Player.h | 2 |
6 files changed, 666 insertions, 6 deletions
diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp index cd170cb751c..7dc163da2f7 100644 --- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp @@ -959,6 +959,607 @@ CreatureAI* GetAI_npc_nexus_drake_hatchling(Creature* pCreature) return new npc_nexus_drake_hatchlingAI(pCreature); } +/*###### +## npc_thassarian +######*/ + +enum eThassarian +{ + QUEST_LAST_RITES = 12019, + + SPELL_TRANSFORM_VALANAR = 46753, + SPELL_STUN = 46957, + SPELL_SHADOW_BOLT = 15537, + + NPC_IMAGE_LICH_KING = 26203, + NPC_COUNSELOR_TALBOT = 25301, + NPC_PRINCE_VALANAR = 28189, + NPC_GENERAL_ARLOS = 25250, + NPC_LERYSSA = 25251, + + SAY_TALBOT_1 = -1571004, + SAY_LICH_1 = -1571005, + SAY_TALBOT_2 = -1571006, + SAY_THASSARIAN_1 = -1571007, + SAY_THASSARIAN_2 = -1571008, + SAY_LICH_2 = -1571009, + SAY_THASSARIAN_3 = -1571010, + SAY_TALBOT_3 = -1571011, + SAY_LICH_3 = -1571012, + SAY_TALBOT_4 = -1571013, + SAY_ARLOS_1 = -1571014, + SAY_ARLOS_2 = -1571015, + SAY_LERYSSA_1 = -1571016, + SAY_THASSARIAN_4 = -1571017, + SAY_LERYSSA_2 = -1571018, + SAY_THASSARIAN_5 = -1571019, + SAY_LERYSSA_3 = -1571020, + SAY_THASSARIAN_6 = -1571021, + SAY_LERYSSA_4 = -1571022, + SAY_THASSARIAN_7 = -1571023, +}; + +#define GOSSIP_ITEM_T "Let's do this, Thassarian. It's now or never." + +struct TRINITY_DLL_DECL npc_thassarianAI : public npc_escortAI +{ + npc_thassarianAI(Creature* pCreature) : npc_escortAI(pCreature) + { + pArthas = NULL; + pTalbot = NULL; + pLeryssa = NULL; + pArlos = NULL; + pCreature->RemoveStandFlags(UNIT_STAND_STATE_SIT); + } + + Creature* pArthas; + Creature* pTalbot; + Creature* pLeryssa; + Creature* pArlos; + + bool bArthasInPosition; + bool bArlosInPosition; + bool bLeryssaInPosition; + bool bTalbotInPosition; + + uint32 uiPhase; + uint32 uiPhase_Timer; + + void Reset() + { + m_creature->RestoreFaction(); + m_creature->RemoveStandFlags(UNIT_STAND_STATE_SIT); + + bArthasInPosition = false; + bArlosInPosition = false; + bLeryssaInPosition = false; + bTalbotInPosition = false; + + uiPhase = 0; + uiPhase_Timer = 0; + } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 3: + SetEscortPaused(true); + if (pArthas = m_creature->SummonCreature(NPC_IMAGE_LICH_KING, 3730.313, 3518.689, 473.324, 1.562, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000)) + { + pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pArthas->SetReactState(REACT_PASSIVE); + pArthas->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + pArthas->GetMotionMaster()->MovePoint(0, 3737.374756,3564.841309,477.433014); + } + if (pTalbot = m_creature->SummonCreature(NPC_COUNSELOR_TALBOT, 3747.23, 3614.936, 473.321, 4.462012, TEMPSUMMON_CORPSE_TIMED_DESPAWN,120000)) + { + pTalbot->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + pTalbot->GetMotionMaster()->MovePoint(0, 3738.000977,3568.882080,477.433014); + } + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + break; + + case 4: + SetEscortPaused(true); + uiPhase = 7; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + npc_escortAI::UpdateAI(uiDiff); + + if (bArthasInPosition && bTalbotInPosition) + { + uiPhase = 1; + bArthasInPosition = false; + bTalbotInPosition = false; + } + + if (bArlosInPosition && bLeryssaInPosition) + { + bArlosInPosition = false; + bLeryssaInPosition = false; + DoScriptText(SAY_THASSARIAN_1, m_creature); + SetEscortPaused(false); + } + + if (uiPhase_Timer <= uiDiff) + { + switch (uiPhase) + { + case 1: + if (pTalbot) + pTalbot->SetStandState(UNIT_STAND_STATE_KNEEL); + uiPhase_Timer = 3000; + ++uiPhase; + break; + + case 2: + if (pTalbot) + { + pTalbot->UpdateEntry(NPC_PRINCE_VALANAR,ALLIANCE); + pTalbot->setFaction(14); + pTalbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTalbot->SetReactState(REACT_PASSIVE); + } + uiPhase_Timer = 5000; + ++uiPhase; + break; + + case 3: + if (pTalbot) + DoScriptText(SAY_TALBOT_1, pTalbot); + uiPhase_Timer = 5000; + ++uiPhase; + break; + + case 4: + if (pArthas) + DoScriptText(SAY_LICH_1, pArthas); + uiPhase_Timer = 5000; + ++uiPhase; + break; + + case 5: + if (pTalbot) + DoScriptText(SAY_TALBOT_2, pTalbot); + uiPhase_Timer = 5000; + ++uiPhase; + break; + + case 6: + if (pArlos = m_creature->SummonCreature(NPC_GENERAL_ARLOS, 3745.527100, 3615.655029, 473.321533, 4.447805, TEMPSUMMON_CORPSE_TIMED_DESPAWN,120000)) + { + pArlos->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + pArlos->GetMotionMaster()->MovePoint(0, 3735.570068, 3572.419922, 477.441010); + } + if (pLeryssa = m_creature->SummonCreature(NPC_LERYSSA, 3749.654541, 3614.959717, 473.323486, 4.524959, TEMPSUMMON_CORPSE_TIMED_DESPAWN,120000)) + { + pLeryssa->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + pLeryssa->SetReactState(REACT_PASSIVE); + pLeryssa->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pLeryssa->GetMotionMaster()->MovePoint(0, 3741.969971, 3571.439941, 477.441010); + } + uiPhase_Timer = 2000; + uiPhase = 0; + break; + + case 7: + DoScriptText(SAY_THASSARIAN_2, m_creature); + uiPhase_Timer = 5000; + ++uiPhase; + break; + + case 8: + if (pArthas && pTalbot) + { + pArthas->SetInFront(m_creature); //The client doesen't update with the new orientation :l + pTalbot->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_LICH_2, pArthas); + } + uiPhase_Timer = 5000; + uiPhase = 9; + break; + + case 9: + DoScriptText(SAY_THASSARIAN_3, m_creature); + uiPhase_Timer = 5000; + uiPhase = 10; + break; + + case 10: + if (pTalbot) + DoScriptText(SAY_TALBOT_3, pTalbot); + uiPhase_Timer = 5000; + uiPhase = 11; + break; + + case 11: + if (pArthas) + DoScriptText(SAY_LICH_3, pArthas); + uiPhase_Timer = 5000; + uiPhase = 12; + break; + + case 12: + if (pTalbot) + DoScriptText(SAY_TALBOT_4, pTalbot); + uiPhase_Timer = 2000; + uiPhase = 13; + break; + + case 13: + if (pArthas) + pArthas->RemoveFromWorld(); + ++uiPhase; + break; + + case 14: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (pTalbot) + { + pTalbot->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTalbot->SetReactState(REACT_AGGRESSIVE); + pTalbot->CastSpell(m_creature, SPELL_SHADOW_BOLT, false); + } + uiPhase_Timer = 1500; + ++uiPhase; + break; + + case 15: + m_creature->SetReactState(REACT_AGGRESSIVE); + m_creature->AI()->AttackStart(pTalbot); + uiPhase = 0; + break; + + case 16: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + uiPhase_Timer = 20000; + ++uiPhase; + break; + + case 17: + if (pLeryssa) + pLeryssa->RemoveFromWorld(); + if (pArlos) + pArlos->RemoveFromWorld(); + if (pTalbot) + pTalbot->RemoveFromWorld(); + m_creature->RemoveStandFlags(UNIT_STAND_STATE_SIT); + SetEscortPaused(false); + uiPhase_Timer = 0; + uiPhase = 0; + } + } else uiPhase_Timer -= uiDiff; + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (pTalbot) + pTalbot->RemoveFromWorld(); + if (pLeryssa) + pLeryssa->RemoveFromWorld(); + if (pArlos) + pArlos->RemoveFromWorld(); + if (pArthas) + pArthas->RemoveFromWorld(); + } +}; + +bool GossipHello_npc_thassarian(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE && pCreature->GetAreaId() == 4125) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_T, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_thassarian(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID()); + CAST_AI(npc_escortAI, (pCreature->AI()))->SetMaxPlayerDistance(200.0f); + break; + } + return true; +} + +CreatureAI* GetAI_npc_thassarian(Creature *pCreature) +{ + return new npc_thassarianAI (pCreature); +} + +/*###### +## npc_image_lich_king +######*/ + +struct TRINITY_DLL_DECL npc_image_lich_kingAI : public ScriptedAI +{ + npc_image_lich_kingAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + void Reset() + { + m_creature->RestoreFaction(); + } + + void MovementInform(uint32 uiType, uint32 uiId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArthasInPosition = true; + } +}; + +CreatureAI* GetAI_npc_image_lich_king(Creature* pCreature) +{ + return new npc_image_lich_kingAI (pCreature); +} + +/*###### +## npc_general_arlos +######*/ + +struct TRINITY_DLL_DECL npc_general_arlosAI : public ScriptedAI +{ + npc_general_arlosAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + void MovementInform(uint32 uiType, uint32 uiId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + m_creature->addUnitState(UNIT_STAT_STUNNED); + m_creature->CastSpell(m_creature, SPELL_STUN, true); + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArlosInPosition = true; + } +}; + +CreatureAI* GetAI_npc_general_arlos(Creature *pCreature) +{ + return new npc_general_arlosAI (pCreature); +} + +/*###### +## npc_counselor_talbot +######*/ + +enum eCounselotTalbot +{ + SPELL_DEFLECTION = 51009, + SPELL_SOUL_BLAST = 50992, +}; + +struct TRINITY_DLL_DECL npc_counselor_talbotAI : public ScriptedAI +{ + npc_counselor_talbotAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pCreature->RestoreFaction(); + } + + Creature* pLeryssa; + Creature* pArlos; + + bool bCheck; + + uint32 uiShadowBoltTimer; + uint32 uiDeflectionTimer; + uint32 uiSoulBlastTimer; + + void Reset() + { + pLeryssa = NULL; + pArlos = NULL; + bCheck = false; + uiShadowBoltTimer = urand(5000,12000); + uiDeflectionTimer = urand(20000,25000); + uiSoulBlastTimer = urand (12000,18000); + } + void MovementInform(uint32 uiType, uint32 uiId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bTalbotInPosition = true; + } + + void UpdateAI(const uint32 uiDiff) + { + if (bCheck) + { + pLeryssa = m_creature->FindNearestCreature(NPC_LERYSSA, 50.0f, true); + pArlos = m_creature->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true); + bCheck = false; + } + + if (!UpdateVictim()) + return; + + if (m_creature->GetAreaId() == 4125) + { + if (uiShadowBoltTimer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT); + uiShadowBoltTimer = urand(5000,12000); + } else uiShadowBoltTimer -= uiDiff; + + if (uiDeflectionTimer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_DEFLECTION); + uiDeflectionTimer = urand(20000,25000); + } else uiDeflectionTimer -= uiDiff; + + if (uiSoulBlastTimer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SOUL_BLAST); + uiSoulBlastTimer = urand (12000,18000); + } else uiSoulBlastTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (!pArlos || !pLeryssa) + return; + + DoScriptText(SAY_ARLOS_1, pArlos); + DoScriptText(SAY_ARLOS_2, pArlos); + DoScriptText(SAY_LERYSSA_1, pLeryssa); + pArlos->Kill(pArlos, false); + pLeryssa->RemoveAura(SPELL_STUN); + pLeryssa->clearUnitState(UNIT_STAT_STUNNED); + pLeryssa->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + pLeryssa->GetMotionMaster()->MovePoint(0,3722.114502, 3564.201660, 477.441437); + + if (pKiller->GetTypeId() == TYPEID_PLAYER) + CAST_PLR(pKiller)->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0); + } +}; + +CreatureAI* GetAI_npc_counselor_talbot(Creature* pCreature) +{ + return new npc_counselor_talbotAI (pCreature); +} + +/*###### +## npc_leryssa +######*/ + +struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI +{ + npc_leryssaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + bDone = false; + Phase = 0; + Phase_Timer = 0; + + pCreature->RemoveStandFlags(UNIT_STAND_STATE_SIT); + } + + bool bDone; + + uint32 Phase; + uint32 Phase_Timer; + + void MovementInform(uint32 uiType, uint32 uiId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + if (!bDone) + { + if (Creature* pTalbot = m_creature->FindNearestCreature(NPC_PRINCE_VALANAR, 50.0f, true)) + CAST_AI(npc_counselor_talbotAI, pTalbot->AI())->bCheck = true; + + m_creature->addUnitState(UNIT_STAT_STUNNED); + m_creature->CastSpell(m_creature, SPELL_STUN, true); + + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bLeryssaInPosition = true; + bDone = true; + } + else + { + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + pSummoner->SetStandState(UNIT_STAND_STATE_SIT); + Phase_Timer = 1500; + Phase = 1; + } + } + + void UpdateAI(const uint32 uiDiff) + { + ScriptedAI::UpdateAI(uiDiff); + + if (Phase_Timer <= uiDiff) + { + switch (Phase) + { + case 1: + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + DoScriptText(SAY_THASSARIAN_4, pThassarian); + Phase_Timer = 5000; + ++Phase; + break; + case 2: + DoScriptText(SAY_LERYSSA_2, m_creature); + Phase_Timer = 5000; + ++Phase; + break; + case 3: + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + DoScriptText(SAY_THASSARIAN_5, pThassarian); + Phase_Timer = 5000; + ++Phase; + break; + case 4: + DoScriptText(SAY_LERYSSA_3, m_creature); + Phase_Timer = 5000; + ++Phase; + break; + case 5: + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + DoScriptText(SAY_THASSARIAN_6, pThassarian); + Phase_Timer = 5000; + ++Phase; + break; + + case 6: + DoScriptText(SAY_LERYSSA_4, m_creature); + Phase_Timer = 5000; + ++Phase; + break; + case 7: + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + { + DoScriptText(SAY_THASSARIAN_7, pThassarian); + CAST_AI(npc_thassarianAI,CAST_CRE(pThassarian)->AI())->uiPhase = 16; + } + Phase_Timer = 5000; + Phase = 0; + break; + } + } else Phase_Timer -= uiDiff; + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_leryssa(Creature *pCreature) +{ + return new npc_leryssaAI (pCreature); +} void AddSC_borean_tundra() { @@ -1041,4 +1642,31 @@ void AddSC_borean_tundra() newscript->Name = "npc_nexus_drake_hatchling"; newscript->GetAI = &GetAI_npc_nexus_drake_hatchling; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thassarian"; + newscript->GetAI = &GetAI_npc_thassarian; + newscript->pGossipHello = &GossipHello_npc_thassarian; + newscript->pGossipSelect = &GossipSelect_npc_thassarian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_image_lich_king"; + newscript->GetAI = &GetAI_npc_image_lich_king; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_counselor_talbot"; + newscript->GetAI = &GetAI_npc_counselor_talbot; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_leryssa"; + newscript->GetAI = &GetAI_npc_leryssa; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_general_arlos"; + newscript->GetAI = &GetAI_npc_general_arlos; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp index 7368a0d7782..64759d62b94 100644 --- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp +++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp @@ -679,7 +679,7 @@ CreatureAI* GetAI_mob_massive_jormungar(Creature* pCreature) return new mob_massive_jormungarAI (pCreature); } -/* + struct TRINITY_DLL_DECL mob_palehoof_orbAI : public ScriptedAI { mob_palehoof_orbAI(Creature *c) : ScriptedAI(c) @@ -759,7 +759,7 @@ CreatureAI* GetAI_mob_palehoof_orb(Creature* pCreature) return new mob_palehoof_orbAI (pCreature); } -*/ + bool GOHello_palehoof_sphere(Player *pPlayer, GameObject *pGO) { @@ -808,12 +808,12 @@ void AddSC_boss_palehoof() newscript->GetAI = &GetAI_mob_massive_jormungar; newscript->RegisterSelf(); - /* + newscript = new Script; newscript->Name = "mob_palehoof_orb"; newscript->GetAI = &GetAI_mob_palehoof_orb; newscript->RegisterSelf(); - */ + newscript = new Script; newscript->Name = "go_palehoof_sphere"; diff --git a/src/game/AnimalRandomMovementGenerator.h b/src/game/AnimalRandomMovementGenerator.h new file mode 100644 index 00000000000..9c64edcaa44 --- /dev/null +++ b/src/game/AnimalRandomMovementGenerator.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> + * + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef TRINITY_ANIMAL_RANDOMMOVEMENTGENERATOR_H +#define TRINITY_ANIMAL_RANDOMMOVEMENTGENERATOR_H + +/** AnimalRandomMovementGenerator follows the research on + * quantifying scale-dependant effects of animal movement + * with simple per-location models (R.H. Gardner, R.V. O'Neil, + * M.G: Turner and V.H. Dale). It is specifically used on + * animal creatures. + */ +#endif + diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 18f0fb9e442..07f3d285b06 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -10,6 +10,7 @@ SET(game_STAT_SRCS AddonHandler.h CombatAI.cpp CombatAI.h + AnimalRandomMovementGenerator.h ArenaTeam.cpp ArenaTeam.h ArenaTeamHandler.cpp diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index e6458b8fee7..418f27dc4ea 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -549,7 +549,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << uint32(pQuest->GetQuestId()); data << uint32(pQuest->GetQuestMethod()); // Accepted values: 0, 1 or 2. 0==IsAutoComplete() (skip objectives/details) - data << uint32(pQuest->GetQuestLevel()); // may be 0, static data, in other cases must be used dynamic level: Player::GetQuestLevel + data << uint32(pQuest->GetQuestLevel()); // may be -1, static data, in other cases must be used dynamic level: Player::GetQuestLevel (0 is not known, but assuming this is no longer valid for quest intended for client) data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log data << uint32(pQuest->GetType()); diff --git a/src/game/Player.h b/src/game/Player.h index 61445d650ee..c6bb9d64c0d 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1211,7 +1211,7 @@ class MANGOS_DLL_SPEC Player : public Unit /*** QUEST SYSTEM ***/ /*********************************************************/ - int32 GetQuestLevel( Quest const* pQuest ) const { return pQuest && pQuest->GetQuestLevel() ? pQuest->GetQuestLevel() : getLevel(); } + int32 GetQuestLevel( Quest const* pQuest ) const { return pQuest && (pQuest->GetQuestLevel() > 0) ? pQuest->GetQuestLevel() : getLevel(); } void PrepareQuestMenu( uint64 guid ); void SendPreparedQuest( uint64 guid ); |
