Core: Remove tabs, fix whitespace and fix nonPCH properly (5am, too late for this stuff...)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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") { }
|
||||
npc_haiphoon() : CreatureScript("npc_haiphoon") { }
|
||||
|
||||
struct npc_haiphoonAI : public VehicleAI
|
||||
{
|
||||
npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
|
||||
struct npc_haiphoonAI : public VehicleAI
|
||||
{
|
||||
npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (target == me)
|
||||
return;
|
||||
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_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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
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);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_haiphoonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_sholazar_basin()
|
||||
|
||||
Reference in New Issue
Block a user