aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp6
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp81
3 files changed, 45 insertions, 44 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 9b0123ed824..6f7338e0e6f 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -183,7 +183,7 @@ void PetAI::UpdateAI(const uint32 diff)
}
}
if (spellInfo->HasEffect(SPELL_EFFECT_JUMP_DEST))
- continue; //pets must jump only to target
+ continue; //pets must jump only to target
// No enemy, check friendly
if (!spellUsed)
{
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index b28295d47ef..8d39e459187 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -413,11 +413,11 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
// updates spell bars for vehicles and set player's faction - should be called here, to overwrite faction that is set from the new template
if (IsVehicle())
- {
+ {
if (Player* owner = Creature::GetCharmerOrOwnerPlayerOrPlayerItself()) // this check comes in case we don't have a player
- {
+ {
setFaction(owner->getFaction()); // vehicles should have same as owner faction
- owner->VehicleSpellInitialize();
+ owner->VehicleSpellInitialize();
}
}
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index f5f99576aeb..f732497f278 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -35,8 +35,9 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "SpellScript.h"
#include "SpellAuras.h"
+#include "Vehicle.h"
+#include "CombatAI.h"
#include "Player.h"
-#include "VehicleAI.h"
/*######
## npc_injured_rainspeaker_oracle
@@ -993,50 +994,50 @@ public:
may be easily converted to SAI when they get.*/
enum SongOfWindAndWater
{
- // Spells
- SPELL_DEVOUR_WIND = 52862,
- SPELL_DEVOUR_WATER = 52864,
- // NPCs
- NPC_HAIPHOON_WATER = 28999,
- NPC_HAIPHOON_AIR = 28985
+ // Spells
+ SPELL_DEVOUR_WIND = 52862,
+ SPELL_DEVOUR_WATER = 52864,
+ // NPCs
+ NPC_HAIPHOON_WATER = 28999,
+ NPC_HAIPHOON_AIR = 28985
};
class npc_haiphoon : public CreatureScript
{
public:
- npc_haiphoon() : CreatureScript("npc_haiphoon") { }
-
- struct npc_haiphoonAI : public VehicleAI
- {
- npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
-
- void SpellHitTarget(Unit* target, SpellInfo const* spell)
- {
- if (target == me)
- return;
-
- if (spell->Id == SPELL_DEVOUR_WIND)
- {
- if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
- {
- me->UpdateEntry(NPC_HAIPHOON_AIR);
- }
- }
-
- if (spell->Id == SPELL_DEVOUR_WATER)
- {
- if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
- {
- me->UpdateEntry(NPC_HAIPHOON_WATER);
- }
- }
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_haiphoonAI(creature);
- }
+ npc_haiphoon() : CreatureScript("npc_haiphoon") { }
+
+ struct npc_haiphoonAI : public VehicleAI
+ {
+ npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
+
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (target == me)
+ return;
+
+ if (spell->Id == SPELL_DEVOUR_WIND)
+ {
+ if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_AIR);
+ }
+ }
+
+ if (spell->Id == SPELL_DEVOUR_WATER)
+ {
+ if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_WATER);
+ }
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_haiphoonAI(creature);
+ }
};
void AddSC_sholazar_basin()