Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -15,15 +15,16 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "DatabaseEnv.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "GridDefines.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Cell.h"
|
||||
#include "Group.h"
|
||||
#include "SmartAI.h"
|
||||
#include "Creature.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "GameObject.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PetDefines.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
@@ -231,7 +232,7 @@ void SmartAI::EndPath(bool fail)
|
||||
else
|
||||
GetScript()->SetPathId(0);
|
||||
|
||||
ObjectList* targets = GetScript()->GetTargetList(SMART_ESCORT_TARGETS);
|
||||
ObjectVector const* targets = GetScript()->GetStoredTargetVector(SMART_ESCORT_TARGETS, *me);
|
||||
if (targets && mEscortQuestID)
|
||||
{
|
||||
if (targets->size() == 1 && GetScript()->IsPlayer((*targets->begin())))
|
||||
@@ -260,11 +261,11 @@ void SmartAI::EndPath(bool fail)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ObjectList::iterator iter = targets->begin(); iter != targets->end(); ++iter)
|
||||
for (WorldObject* target : *targets)
|
||||
{
|
||||
if (GetScript()->IsPlayer((*iter)))
|
||||
if (GetScript()->IsPlayer(target))
|
||||
{
|
||||
Player* player = (*iter)->ToPlayer();
|
||||
Player* player = target->ToPlayer();
|
||||
if (!fail && player->IsAtGroupRewardDistance(me) && !player->HasCorpse())
|
||||
player->AreaExploredOrEventHappens(mEscortQuestID);
|
||||
else if (fail)
|
||||
@@ -294,7 +295,7 @@ void SmartAI::ReturnToLastOOCPos()
|
||||
me->GetMotionMaster()->MovePoint(SMART_ESCORT_LAST_OOC_POINT, mLastOOCPos);
|
||||
}
|
||||
|
||||
void SmartAI::UpdatePath(const uint32 diff)
|
||||
void SmartAI::UpdatePath(uint32 diff)
|
||||
{
|
||||
if (mEscortInvokerCheckTimer < diff)
|
||||
{
|
||||
@@ -404,8 +405,7 @@ void SmartAI::UpdateAI(uint32 diff)
|
||||
|
||||
bool SmartAI::IsEscortInvokerInRange()
|
||||
{
|
||||
ObjectList* targets = GetScript()->GetTargetList(SMART_ESCORT_TARGETS);
|
||||
if (targets)
|
||||
if (ObjectVector const* targets = GetScript()->GetStoredTargetVector(SMART_ESCORT_TARGETS, *me))
|
||||
{
|
||||
float checkDist = me->GetInstanceScript() ? SMART_ESCORT_MAX_PLAYER_DIST * 2 : SMART_ESCORT_MAX_PLAYER_DIST;
|
||||
if (targets->size() == 1 && GetScript()->IsPlayer((*targets->begin())))
|
||||
@@ -426,11 +426,11 @@ bool SmartAI::IsEscortInvokerInRange()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ObjectList::iterator iter = targets->begin(); iter != targets->end(); ++iter)
|
||||
for (WorldObject* target : *targets)
|
||||
{
|
||||
if (GetScript()->IsPlayer((*iter)))
|
||||
if (GetScript()->IsPlayer(target))
|
||||
{
|
||||
if (me->GetDistance((*iter)->ToPlayer()) <= checkDist)
|
||||
if (me->GetDistance(target->ToPlayer()) <= checkDist)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ void SmartAI::MoveInLineOfSight(Unit* who)
|
||||
CreatureAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
bool SmartAI::CanAIAttack(const Unit* /*who*/) const
|
||||
bool SmartAI::CanAIAttack(Unit const* /*who*/) const
|
||||
{
|
||||
return !(me->HasReactState(REACT_PASSIVE));
|
||||
}
|
||||
@@ -658,12 +658,12 @@ void SmartAI::AttackStart(Unit* who)
|
||||
}
|
||||
}
|
||||
|
||||
void SmartAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
|
||||
void SmartAI::SpellHit(Unit* unit, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
void SmartAI::SpellHitTarget(Unit* target, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT_TARGET, target, 0, 0, false, spellInfo);
|
||||
}
|
||||
@@ -811,7 +811,7 @@ bool SmartAI::GossipSelect(Player* player, uint32 menuId, uint32 gossipListId)
|
||||
return _gossipReturn;
|
||||
}
|
||||
|
||||
bool SmartAI::GossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, const char* /*code*/)
|
||||
bool SmartAI::GossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, char const* /*code*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1001,7 +1001,7 @@ bool SmartGameObjectAI::GossipSelect(Player* player, uint32 menuId, uint32 gossi
|
||||
}
|
||||
|
||||
// Called when a player selects a gossip with a code in the gameobject's gossip menu.
|
||||
bool SmartGameObjectAI::GossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, const char* /*code*/)
|
||||
bool SmartGameObjectAI::GossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, char const* /*code*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1051,7 +1051,7 @@ void SmartGameObjectAI::EventInform(uint32 eventId)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GO_EVENT_INFORM, nullptr, eventId);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
|
||||
void SmartGameObjectAI::SpellHit(Unit* unit, SpellInfo const* spellInfo)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SPELLHIT, unit, 0, 0, false, spellInfo);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user