refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_COMBATAI_H
|
||||
#define TRINITY_COMBATAI_H
|
||||
#ifndef ACORE_COMBATAI_H
|
||||
#define ACORE_COMBATAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_GAMEOBJECTAI_H
|
||||
#define TRINITY_GAMEOBJECTAI_H
|
||||
#ifndef ACORE_GAMEOBJECTAI_H
|
||||
#define ACORE_GAMEOBJECTAI_H
|
||||
|
||||
#include "Define.h"
|
||||
#include <list>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_GUARDAI_H
|
||||
#define TRINITY_GUARDAI_H
|
||||
#ifndef ACORE_GUARDAI_H
|
||||
#define ACORE_GUARDAI_H
|
||||
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_PASSIVEAI_H
|
||||
#define TRINITY_PASSIVEAI_H
|
||||
#ifndef ACORE_PASSIVEAI_H
|
||||
#define ACORE_PASSIVEAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
//#include "CreatureAIImpl.h"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_PETAI_H
|
||||
#define TRINITY_PETAI_H
|
||||
#ifndef ACORE_PETAI_H
|
||||
#define ACORE_PETAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "Timer.h"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_REACTORAI_H
|
||||
#define TRINITY_REACTORAI_H
|
||||
#ifndef ACORE_REACTORAI_H
|
||||
#define ACORE_REACTORAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
|
||||
me->IsFriendlyTo(victim) || !me->CanSeeOrDetect(victim))
|
||||
{
|
||||
victim = NULL;
|
||||
Trinity::NearestAttackableUnitInObjectRangeCheck u_check(me, me, max_range);
|
||||
Trinity::UnitLastSearcher<Trinity::NearestAttackableUnitInObjectRangeCheck> checker(me, victim, u_check);
|
||||
acore::NearestAttackableUnitInObjectRangeCheck u_check(me, me, max_range);
|
||||
acore::UnitLastSearcher<acore::NearestAttackableUnitInObjectRangeCheck> checker(me, victim, u_check);
|
||||
me->VisitNearbyObject(max_range, checker);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_TOTEMAI_H
|
||||
#define TRINITY_TOTEMAI_H
|
||||
#ifndef ACORE_TOTEMAI_H
|
||||
#define ACORE_TOTEMAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "Timer.h"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_UNITAI_H
|
||||
#define TRINITY_UNITAI_H
|
||||
#ifndef ACORE_UNITAI_H
|
||||
#define ACORE_UNITAI_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "Unit.h"
|
||||
@@ -28,7 +28,7 @@ enum SelectAggroTarget
|
||||
};
|
||||
|
||||
// default predicate function to select target based on distance, player and/or aura criteria
|
||||
struct DefaultTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
struct DefaultTargetSelector : public acore::unary_function<Unit*, bool>
|
||||
{
|
||||
const Unit* me;
|
||||
float m_dist;
|
||||
@@ -78,7 +78,7 @@ struct DefaultTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
|
||||
// Target selector for spell casts checking range, auras and attributes
|
||||
// TODO: Add more checks from Spell::CheckCast
|
||||
struct SpellTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
struct SpellTargetSelector : public acore::unary_function<Unit*, bool>
|
||||
{
|
||||
public:
|
||||
SpellTargetSelector(Unit* caster, uint32 spellId);
|
||||
@@ -92,7 +92,7 @@ struct SpellTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
// Very simple target selector, will just skip main target
|
||||
// NOTE: When passing to UnitAI::SelectTarget remember to use 0 as position for random selection
|
||||
// because tank will not be in the temporary list
|
||||
struct NonTankTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
struct NonTankTargetSelector : public acore::unary_function<Unit*, bool>
|
||||
{
|
||||
public:
|
||||
NonTankTargetSelector(Creature* source, bool playerOnly = true) : _source(source), _playerOnly(playerOnly) { }
|
||||
@@ -104,7 +104,7 @@ struct NonTankTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
};
|
||||
|
||||
// Simple selector for units using mana
|
||||
struct PowerUsersSelector : public ACORE::unary_function<Unit*, bool>
|
||||
struct PowerUsersSelector : public acore::unary_function<Unit*, bool>
|
||||
{
|
||||
Unit const* _me;
|
||||
Powers const _power;
|
||||
@@ -135,7 +135,7 @@ struct PowerUsersSelector : public ACORE::unary_function<Unit*, bool>
|
||||
}
|
||||
};
|
||||
|
||||
struct FarthestTargetSelector : public ACORE::unary_function<Unit*, bool>
|
||||
struct FarthestTargetSelector : public acore::unary_function<Unit*, bool>
|
||||
{
|
||||
FarthestTargetSelector(Unit const* unit, float dist, bool playerOnly, bool inLos) : _me(unit), _dist(dist), _playerOnly(playerOnly), _inLos(inLos) {}
|
||||
|
||||
@@ -191,7 +191,7 @@ class UnitAI
|
||||
|
||||
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
|
||||
// Select the targets satifying the predicate.
|
||||
// predicate shall extend ACORE::unary_function<Unit*, bool>
|
||||
// predicate shall extend acore::unary_function<Unit*, bool>
|
||||
template <class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE const& predicate)
|
||||
{
|
||||
ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
|
||||
@@ -207,7 +207,7 @@ class UnitAI
|
||||
return NULL;
|
||||
|
||||
if (targetType == SELECT_TARGET_NEAREST || targetType == SELECT_TARGET_FARTHEST)
|
||||
targetList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
targetList.sort(acore::ObjectDistanceOrderPred(me));
|
||||
|
||||
switch (targetType)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ class UnitAI
|
||||
void SelectTargetList(std::list<Unit*>& targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
|
||||
|
||||
// Select the targets satifying the predicate.
|
||||
// predicate shall extend ACORE::unary_function<Unit*, bool>
|
||||
// predicate shall extend acore::unary_function<Unit*, bool>
|
||||
template <class PREDICATE> void SelectTargetList(std::list<Unit*>& targetList, PREDICATE const& predicate, uint32 maxTargets, SelectAggroTarget targetType)
|
||||
{
|
||||
ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
|
||||
@@ -256,13 +256,13 @@ class UnitAI
|
||||
return;
|
||||
|
||||
if (targetType == SELECT_TARGET_NEAREST || targetType == SELECT_TARGET_FARTHEST)
|
||||
targetList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
targetList.sort(acore::ObjectDistanceOrderPred(me));
|
||||
|
||||
if (targetType == SELECT_TARGET_FARTHEST || targetType == SELECT_TARGET_BOTTOMAGGRO)
|
||||
targetList.reverse();
|
||||
|
||||
if (targetType == SELECT_TARGET_RANDOM)
|
||||
Trinity::Containers::RandomResizeList(targetList, maxTargets);
|
||||
acore::Containers::RandomResizeList(targetList, maxTargets);
|
||||
else
|
||||
targetList.resize(maxTargets);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_CREATUREAI_H
|
||||
#define TRINITY_CREATUREAI_H
|
||||
#ifndef ACORE_CREATUREAI_H
|
||||
#define ACORE_CREATUREAI_H
|
||||
|
||||
#include "Creature.h"
|
||||
#include "UnitAI.h"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
#ifndef TRINITY_CREATUREAIFACTORY_H
|
||||
#define TRINITY_CREATUREAIFACTORY_H
|
||||
#ifndef ACORE_CREATUREAIFACTORY_H
|
||||
#define ACORE_CREATUREAIFACTORY_H
|
||||
|
||||
//#include "Policies/Singleton.h"
|
||||
#include "ObjectRegistry.h"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_CREATUREAIREGISTRY_H
|
||||
#define TRINITY_CREATUREAIREGISTRY_H
|
||||
#ifndef ACORE_CREATUREAIREGISTRY_H
|
||||
#define ACORE_CREATUREAIREGISTRY_H
|
||||
|
||||
namespace AIRegistry
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_CREATUREAISELECTOR_H
|
||||
#define TRINITY_CREATUREAISELECTOR_H
|
||||
#ifndef ACORE_CREATUREAISELECTOR_H
|
||||
#define ACORE_CREATUREAISELECTOR_H
|
||||
|
||||
class CreatureAI;
|
||||
class Creature;
|
||||
|
||||
@@ -378,8 +378,8 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
|
||||
Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
|
||||
{
|
||||
Unit* unit = NULL;
|
||||
Trinity::MostHPMissingInRange u_check(me, range, minHPDiff);
|
||||
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(me, unit, u_check);
|
||||
acore::MostHPMissingInRange u_check(me, range, minHPDiff);
|
||||
acore::UnitLastSearcher<acore::MostHPMissingInRange> searcher(me, unit, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
|
||||
return unit;
|
||||
@@ -388,8 +388,8 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
{
|
||||
std::list<Creature*> list;
|
||||
Trinity::FriendlyCCedInRange u_check(me, range);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(me, list, u_check);
|
||||
acore::FriendlyCCedInRange u_check(me, range);
|
||||
acore::CreatureListSearcher<acore::FriendlyCCedInRange> searcher(me, list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
return list;
|
||||
}
|
||||
@@ -397,8 +397,8 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 uiSpellid)
|
||||
{
|
||||
std::list<Creature*> list;
|
||||
Trinity::FriendlyMissingBuffInRange u_check(me, range, uiSpellid);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(me, list, u_check);
|
||||
acore::FriendlyMissingBuffInRange u_check(me, range, uiSpellid);
|
||||
acore::CreatureListSearcher<acore::FriendlyMissingBuffInRange> searcher(me, list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
return list;
|
||||
}
|
||||
@@ -407,13 +407,13 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float minimumRange)
|
||||
{
|
||||
Player* player = NULL;
|
||||
|
||||
CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
|
||||
CellCoord pair(acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::PlayerAtMinimumRangeAway check(me, minimumRange);
|
||||
Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway> searcher(me, player, check);
|
||||
TypeContainerVisitor<Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
|
||||
acore::PlayerAtMinimumRangeAway check(me, minimumRange);
|
||||
acore::PlayerSearcher<acore::PlayerAtMinimumRangeAway> searcher(me, player, check);
|
||||
TypeContainerVisitor<acore::PlayerSearcher<acore::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
|
||||
|
||||
cell.Visit(pair, visitor, *me->GetMap(), *me, minimumRange);
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
// We need to use a copy of SummonList here, otherwise original SummonList would be modified
|
||||
StorageType listCopy = storage_;
|
||||
Trinity::Containers::RandomResizeList<uint64, Predicate>(listCopy, predicate, max);
|
||||
acore::Containers::RandomResizeList<uint64, Predicate>(listCopy, predicate, max);
|
||||
for (StorageType::iterator i = listCopy.begin(); i != listCopy.end(); ++i)
|
||||
{
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_SMARTAI_H
|
||||
#define TRINITY_SMARTAI_H
|
||||
#ifndef ACORE_SMARTAI_H
|
||||
#define ACORE_SMARTAI_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
|
||||
@@ -27,17 +27,17 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
class TrinityStringTextBuilder
|
||||
class AcoreStringTextBuilder
|
||||
{
|
||||
public:
|
||||
TrinityStringTextBuilder(WorldObject* obj, ChatMsg msgtype, int32 id, uint32 language, WorldObject* target)
|
||||
AcoreStringTextBuilder(WorldObject* obj, ChatMsg msgtype, int32 id, uint32 language, WorldObject* target)
|
||||
: _source(obj), _msgType(msgtype), _textId(id), _language(language), _target(target)
|
||||
{
|
||||
}
|
||||
|
||||
size_t operator()(WorldPacket* data, LocaleConstant locale) const
|
||||
{
|
||||
std::string text = sObjectMgr->GetTrinityString(_textId, locale);
|
||||
std::string text = sObjectMgr->GetAcoreString(_textId, locale);
|
||||
return ChatHandler::BuildChatPacket(*data, _msgType, Language(_language), _source, _target, text, 0, "", locale);
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
caster = unit->SummonTrigger(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetOrientation(), 5000);
|
||||
|
||||
if (e.action.cast.targetsLimit > 0 && targets->size() > e.action.cast.targetsLimit)
|
||||
Trinity::Containers::RandomResizeList(*targets, e.action.cast.targetsLimit);
|
||||
acore::Containers::RandomResizeList(*targets, e.action.cast.targetsLimit);
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
@@ -797,7 +797,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
if (e.action.cast.targetsLimit > 0 && targets->size() > e.action.cast.targetsLimit)
|
||||
Trinity::Containers::RandomResizeList(*targets, e.action.cast.targetsLimit);
|
||||
acore::Containers::RandomResizeList(*targets, e.action.cast.targetsLimit);
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
@@ -1042,7 +1042,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
me->DoFleeToGetAssistance();
|
||||
if (e.action.flee.withEmote)
|
||||
{
|
||||
TrinityStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, LANG_UNIVERSAL, NULL);
|
||||
AcoreStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, LANG_UNIVERSAL, NULL);
|
||||
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
@@ -1340,7 +1340,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
(*itr)->ToCreature()->CallForHelp((float)e.action.callHelp.range);
|
||||
if (e.action.callHelp.withEmote)
|
||||
{
|
||||
TrinityStringTextBuilder builder(*itr, CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, LANG_UNIVERSAL, NULL);
|
||||
AcoreStringTextBuilder builder(*itr, CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, LANG_UNIVERSAL, NULL);
|
||||
sCreatureTextMgr->SendChatPacket(*itr, builder, CHAT_MSG_MONSTER_EMOTE);
|
||||
}
|
||||
}
|
||||
@@ -1516,7 +1516,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
|
||||
// xinef: attack random target
|
||||
if (Unit* target = Trinity::Containers::SelectRandomContainerElement(*targets)->ToUnit())
|
||||
if (Unit* target = acore::Containers::SelectRandomContainerElement(*targets)->ToUnit())
|
||||
me->AI()->AttackStart(target);
|
||||
|
||||
delete targets;
|
||||
@@ -1880,7 +1880,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (ObjectList* targets = GetTargets(e, unit))
|
||||
{
|
||||
// xinef: we want to move to random element
|
||||
target = Trinity::Containers::SelectRandomContainerElement(*targets);
|
||||
target = acore::Containers::SelectRandomContainerElement(*targets);
|
||||
delete targets;
|
||||
}
|
||||
}
|
||||
@@ -2436,7 +2436,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
// xinef: my implementation
|
||||
if (e.action.jump.selfJump)
|
||||
{
|
||||
if (WorldObject* target = Trinity::Containers::SelectRandomContainerElement(*targets))
|
||||
if (WorldObject* target = acore::Containers::SelectRandomContainerElement(*targets))
|
||||
if (me)
|
||||
me->GetMotionMaster()->MoveJump(target->GetPositionX() + e.target.x, target->GetPositionY() + e.target.y, target->GetPositionZ() + e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz);
|
||||
}
|
||||
@@ -3554,8 +3554,8 @@ ObjectList* SmartScript::GetWorldObjectsInDist(float dist)
|
||||
WorldObject* obj = GetBaseObject();
|
||||
if (obj)
|
||||
{
|
||||
Trinity::AllWorldObjectsInRange u_check(obj, dist);
|
||||
Trinity::WorldObjectListSearcher<Trinity::AllWorldObjectsInRange> searcher(obj, *targets, u_check);
|
||||
acore::AllWorldObjectsInRange u_check(obj, dist);
|
||||
acore::WorldObjectListSearcher<acore::AllWorldObjectsInRange> searcher(obj, *targets, u_check);
|
||||
obj->VisitNearbyObject(dist, searcher);
|
||||
}
|
||||
return targets;
|
||||
@@ -3685,7 +3685,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
RecalcTimer(e, 1000, 3000);
|
||||
return;
|
||||
}
|
||||
ProcessTimedAction(e, e.event.friendlyCC.repeatMin, e.event.friendlyCC.repeatMax, Trinity::Containers::SelectRandomContainerElement(pList));
|
||||
ProcessTimedAction(e, e.event.friendlyCC.repeatMin, e.event.friendlyCC.repeatMax, acore::Containers::SelectRandomContainerElement(pList));
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_MISSING_BUFF:
|
||||
@@ -3696,7 +3696,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
if (pList.empty())
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.missingBuff.repeatMin, e.event.missingBuff.repeatMax, Trinity::Containers::SelectRandomContainerElement(pList));
|
||||
ProcessTimedAction(e, e.event.missingBuff.repeatMin, e.event.missingBuff.repeatMax, acore::Containers::SelectRandomContainerElement(pList));
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_HAS_AURA:
|
||||
@@ -4321,7 +4321,7 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger c
|
||||
}
|
||||
for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
|
||||
{
|
||||
#ifndef TRINITY_DEBUG
|
||||
#ifndef ACORE_DEBUG
|
||||
if ((*i).event.event_flags & SMART_EVENT_FLAG_DEBUG_ONLY)
|
||||
continue;
|
||||
#endif
|
||||
@@ -4503,8 +4503,8 @@ Unit* SmartScript::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
|
||||
Unit* unit = NULL;
|
||||
|
||||
Trinity::MostHPMissingInRange u_check(me, range, MinHPDiff);
|
||||
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(me, unit, u_check);
|
||||
acore::MostHPMissingInRange u_check(me, range, MinHPDiff);
|
||||
acore::UnitLastSearcher<acore::MostHPMissingInRange> searcher(me, unit, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
return unit;
|
||||
}
|
||||
@@ -4514,8 +4514,8 @@ void SmartScript::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
|
||||
if (!me)
|
||||
return;
|
||||
|
||||
Trinity::FriendlyCCedInRange u_check(me, range);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(me, _list, u_check);
|
||||
acore::FriendlyCCedInRange u_check(me, range);
|
||||
acore::CreatureListSearcher<acore::FriendlyCCedInRange> searcher(me, _list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
}
|
||||
|
||||
@@ -4524,8 +4524,8 @@ void SmartScript::DoFindFriendlyMissingBuff(std::list<Creature*>& list, float ra
|
||||
if (!me)
|
||||
return;
|
||||
|
||||
Trinity::FriendlyMissingBuffInRange u_check(me, range, spellid);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(me, list, u_check);
|
||||
acore::FriendlyMissingBuffInRange u_check(me, range, spellid);
|
||||
acore::CreatureListSearcher<acore::FriendlyMissingBuffInRange> searcher(me, list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
}
|
||||
|
||||
@@ -4535,8 +4535,8 @@ Unit* SmartScript::DoFindClosestFriendlyInRange(float range, bool playerOnly)
|
||||
return NULL;
|
||||
|
||||
Unit* unit = NULL;
|
||||
Trinity::AnyFriendlyNotSelfUnitInObjectRangeCheck u_check(me, me, range, playerOnly);
|
||||
Trinity::UnitLastSearcher<Trinity::AnyFriendlyNotSelfUnitInObjectRangeCheck> searcher(me, unit, u_check);
|
||||
acore::AnyFriendlyNotSelfUnitInObjectRangeCheck u_check(me, me, range, playerOnly);
|
||||
acore::UnitLastSearcher<acore::AnyFriendlyNotSelfUnitInObjectRangeCheck> searcher(me, unit, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
return unit;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_SMARTSCRIPT_H
|
||||
#define TRINITY_SMARTSCRIPT_H
|
||||
#ifndef ACORE_SMARTSCRIPT_H
|
||||
#define ACORE_SMARTSCRIPT_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
@@ -162,13 +162,13 @@ class SmartScript
|
||||
{
|
||||
GameObject* gameObject = NULL;
|
||||
|
||||
CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
|
||||
Cell cell(p);
|
||||
|
||||
Trinity::GameObjectWithDbGUIDCheck goCheck(guid);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(searchObject, gameObject, goCheck);
|
||||
acore::GameObjectWithDbGUIDCheck goCheck(guid);
|
||||
acore::GameObjectSearcher<acore::GameObjectWithDbGUIDCheck> checker(searchObject, gameObject, goCheck);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > objectChecker(checker);
|
||||
TypeContainerVisitor<acore::GameObjectSearcher<acore::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > objectChecker(checker);
|
||||
cell.Visit(p, objectChecker, *searchObject->GetMap(), *searchObject, searchObject->GetVisibilityRange());
|
||||
|
||||
return gameObject;
|
||||
@@ -177,13 +177,13 @@ class SmartScript
|
||||
Creature* FindCreatureNear(WorldObject* searchObject, uint32 guid) const
|
||||
{
|
||||
Creature* creature = NULL;
|
||||
CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
|
||||
Cell cell(p);
|
||||
|
||||
Trinity::CreatureWithDbGUIDCheck target_check(guid);
|
||||
Trinity::CreatureSearcher<Trinity::CreatureWithDbGUIDCheck> checker(searchObject, creature, target_check);
|
||||
acore::CreatureWithDbGUIDCheck target_check(guid);
|
||||
acore::CreatureSearcher<acore::CreatureWithDbGUIDCheck> checker(searchObject, creature, target_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureSearcher <Trinity::CreatureWithDbGUIDCheck>, GridTypeMapContainer > unit_checker(checker);
|
||||
TypeContainerVisitor<acore::CreatureSearcher <acore::CreatureWithDbGUIDCheck>, GridTypeMapContainer > unit_checker(checker);
|
||||
cell.Visit(p, unit_checker, *searchObject->GetMap(), *searchObject, searchObject->GetVisibilityRange());
|
||||
|
||||
return creature;
|
||||
|
||||
@@ -1097,7 +1097,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
}
|
||||
case SMART_ACTION_LOAD_GRID:
|
||||
{
|
||||
if (!Trinity::IsValidMapCoord(e.target.x, e.target.y))
|
||||
if (!acore::IsValidMapCoord(e.target.x, e.target.y))
|
||||
{
|
||||
sLog->outError("SmartScript: SMART_ACTION_LOAD_GRID uses invalid map coords: %u, skipped.", e.entryOrGuid);
|
||||
return false;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#ifndef TRINITY_SMARTSCRIPTMGR_H
|
||||
#define TRINITY_SMARTSCRIPTMGR_H
|
||||
#ifndef ACORE_SMARTSCRIPTMGR_H
|
||||
#define ACORE_SMARTSCRIPTMGR_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
|
||||
Reference in New Issue
Block a user