*apply trinity style to whole source
*comment out all mangos to trinity defines *this will make merging a little harder, but code will be more clear --HG-- branch : trunk
This commit is contained in:
@@ -50,7 +50,7 @@ enum eOOX
|
||||
FACTION_ESCORTEE_H = 775
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI
|
||||
struct TRINITY_DLL_DECL npc_00x09hlAI : public npc_escortAI
|
||||
{
|
||||
npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { }
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ enum Creatures
|
||||
#define NPC_POISONOUS_MUSHROOM 30435
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
{
|
||||
boss_amanitarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
@@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_amanitar_mushroomsAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
|
||||
@@ -242,7 +242,7 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL mob_nadox_eggsAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL mob_nadox_eggsAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_nadox_eggsAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
|
||||
+3
-3
@@ -63,7 +63,7 @@ float JEDOGA_POS[2][4] =
|
||||
{372.330994f, -705.278015f, -16.179716f, 5.427970f}
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
{
|
||||
boss_jedoga_shadowseekerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
@@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL mob_jedoga_initiandAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL mob_jedoga_initiandAI : public ScriptedAI
|
||||
{
|
||||
mob_jedoga_initiandAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
@@ -487,7 +487,7 @@ enum AufseherSpell
|
||||
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2 = 56312
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
|
||||
{
|
||||
npc_jedogas_aufseher_triggerAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ This is the timed gauntlet - waves of non-elite spiders
|
||||
#define SPELL_LEECH_POISON_H 59417
|
||||
#define SPELL_WEB_GRAB_H 59421
|
||||
|
||||
struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI
|
||||
{
|
||||
boss_hadronoxAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
|
||||
@@ -137,10 +137,14 @@ typedef uint32 DWORD;
|
||||
|
||||
typedef uint64 OBJECT_HANDLE;
|
||||
|
||||
#define MaNGOS Trinity
|
||||
#define MANGOS_DLL_DECL TRINITY_DLL_DECL
|
||||
#define MANGOS_DLL_SPEC TRINITY_DLL_SPEC
|
||||
#define GetMangosString GetTrinityString
|
||||
//commented out
|
||||
//so all future merges with invalid style will drop build errors
|
||||
//this way devs will at least read thru what they merge to find the error
|
||||
|
||||
//#define MaNGOS Trinity
|
||||
//#define MANGOS_DLL_DECL TRINITY_DLL_DECL
|
||||
//#define MANGOS_DLL_SPEC TRINITY_DLL_SPEC
|
||||
//#define GetMangosString GetTrinityString
|
||||
|
||||
#if defined(MANGOS_DEBUG) || defined(TRINITY_DEBUG)
|
||||
# ifndef TRINITY_DEBUG
|
||||
|
||||
+10
-10
@@ -41,7 +41,7 @@
|
||||
|
||||
INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
|
||||
|
||||
namespace MaNGOS
|
||||
namespace Trinity
|
||||
{
|
||||
class AchievementChatBuilder
|
||||
{
|
||||
@@ -50,7 +50,7 @@ namespace MaNGOS
|
||||
: i_player(pl), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
|
||||
void operator()(WorldPacket& data, int32 loc_idx)
|
||||
{
|
||||
char const* text = objmgr.GetMangosString(i_textId,loc_idx);
|
||||
char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
data << uint8(i_msgtype);
|
||||
data << uint32(LANG_UNIVERSAL);
|
||||
@@ -69,7 +69,7 @@ namespace MaNGOS
|
||||
int32 i_textId;
|
||||
uint32 i_achievementId;
|
||||
};
|
||||
} // namespace MaNGOS
|
||||
} // namespace Trinity
|
||||
|
||||
bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
{
|
||||
@@ -577,8 +577,8 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
||||
|
||||
if(Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId()))
|
||||
{
|
||||
MaNGOS::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> say_do(say_builder);
|
||||
Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
|
||||
Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> say_do(say_builder);
|
||||
guild->BroadcastWorker(say_do,GetPlayer());
|
||||
}
|
||||
|
||||
@@ -595,16 +595,16 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
||||
// if player is in world he can tell his friends about new achievement
|
||||
else if (GetPlayer()->IsInWorld())
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
|
||||
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> say_do(say_builder);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
|
||||
Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> say_do(say_builder);
|
||||
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
|
||||
}
|
||||
|
||||
+13
-13
@@ -36,7 +36,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "Util.h"
|
||||
|
||||
namespace MaNGOS
|
||||
namespace Trinity
|
||||
{
|
||||
class BattleGroundChatBuilder
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace MaNGOS
|
||||
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_args(args) {}
|
||||
void operator()(WorldPacket& data, int32 loc_idx)
|
||||
{
|
||||
char const* text = objmgr.GetMangosString(i_textId,loc_idx);
|
||||
char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
if (i_args)
|
||||
{
|
||||
@@ -90,9 +90,9 @@ namespace MaNGOS
|
||||
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_arg1(arg1), i_arg2(arg2) {}
|
||||
void operator()(WorldPacket& data, int32 loc_idx)
|
||||
{
|
||||
char const* text = objmgr.GetMangosString(i_textId,loc_idx);
|
||||
char const* arg1str = i_arg1 ? objmgr.GetMangosString(i_arg1,loc_idx) : "";
|
||||
char const* arg2str = i_arg2 ? objmgr.GetMangosString(i_arg2,loc_idx) : "";
|
||||
char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
|
||||
char const* arg1str = i_arg1 ? objmgr.GetTrinityString(i_arg1,loc_idx) : "";
|
||||
char const* arg2str = i_arg2 ? objmgr.GetTrinityString(i_arg2,loc_idx) : "";
|
||||
|
||||
char str [2048];
|
||||
snprintf(str,2048,text, arg1str, arg2str );
|
||||
@@ -116,7 +116,7 @@ namespace MaNGOS
|
||||
int32 i_arg1;
|
||||
int32 i_arg2;
|
||||
};
|
||||
} // namespace MaNGOS
|
||||
} // namespace Trinity
|
||||
|
||||
template<class Do>
|
||||
void BattleGround::BroadcastWorker(Do& _do)
|
||||
@@ -820,7 +820,7 @@ void BattleGround::EndBattleGround(uint32 winner)
|
||||
uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const
|
||||
{
|
||||
//variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill)
|
||||
return MaNGOS::Honor::hk_honor_at_level(GetMaxLevel(), kills);
|
||||
return Trinity::Honor::hk_honor_at_level(GetMaxLevel(), kills);
|
||||
}
|
||||
|
||||
uint32 BattleGround::GetBattlemasterEntry() const
|
||||
@@ -1692,8 +1692,8 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float
|
||||
|
||||
void BattleGround::SendMessageToAll(int32 entry, ChatMsg type, Player const* source)
|
||||
{
|
||||
MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGroundChatBuilder> bg_do(bg_builder);
|
||||
Trinity::BattleGroundChatBuilder bg_builder(type, entry, source);
|
||||
Trinity::LocalizedPacketDo<Trinity::BattleGroundChatBuilder> bg_do(bg_builder);
|
||||
BroadcastWorker(bg_do);
|
||||
}
|
||||
|
||||
@@ -1702,8 +1702,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
|
||||
va_list ap;
|
||||
va_start(ap, source);
|
||||
|
||||
MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source, &ap);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGroundChatBuilder> bg_do(bg_builder);
|
||||
Trinity::BattleGroundChatBuilder bg_builder(type, entry, source, &ap);
|
||||
Trinity::LocalizedPacketDo<Trinity::BattleGroundChatBuilder> bg_do(bg_builder);
|
||||
BroadcastWorker(bg_do);
|
||||
|
||||
va_end(ap);
|
||||
@@ -1711,8 +1711,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
|
||||
|
||||
void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2)
|
||||
{
|
||||
MaNGOS::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGround2ChatBuilder> bg_do(bg_builder);
|
||||
Trinity::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
|
||||
Trinity::LocalizedPacketDo<Trinity::BattleGround2ChatBuilder> bg_do(bg_builder);
|
||||
BroadcastWorker(bg_do);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ INSTANTIATE_SINGLETON_1( HordeChannelMgr );
|
||||
ChannelMgr* channelMgr(uint32 team)
|
||||
{
|
||||
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
|
||||
return &MaNGOS::Singleton<AllianceChannelMgr>::Instance(); // cross-faction
|
||||
return &Trinity::Singleton<AllianceChannelMgr>::Instance(); // cross-faction
|
||||
|
||||
if(team == ALLIANCE)
|
||||
return &MaNGOS::Singleton<AllianceChannelMgr>::Instance();
|
||||
return &Trinity::Singleton<AllianceChannelMgr>::Instance();
|
||||
if(team == HORDE)
|
||||
return &MaNGOS::Singleton<HordeChannelMgr>::Instance();
|
||||
return &Trinity::Singleton<HordeChannelMgr>::Instance();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+3
-3
@@ -2081,8 +2081,8 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::GameObjectWithDbGUIDCheck go_check(*pl,lowguid);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(pl,obj,go_check);
|
||||
Trinity::GameObjectWithDbGUIDCheck go_check(*pl,lowguid);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(pl,obj,go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
@@ -2363,7 +2363,7 @@ int ChatHandler::GetSessionDbLocaleIndex() const
|
||||
return m_session->GetSessionDbLocaleIndex();
|
||||
}
|
||||
|
||||
const char *CliHandler::GetMangosString(int32 entry) const
|
||||
const char *CliHandler::GetTrinityString(int32 entry) const
|
||||
{
|
||||
return objmgr.GetTrinityStringForDBCLocale(entry);
|
||||
}
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ class TRINITY_DLL_SPEC ChatHandler
|
||||
static char* LineFromMessage(char*& pos) { char* start = strtok(pos,"\n"); pos = NULL; return start; }
|
||||
|
||||
// function with different implementation for chat/console
|
||||
virtual const char *GetMangosString(int32 entry) const;
|
||||
virtual const char *GetTrinityString(int32 entry) const;
|
||||
virtual void SendSysMessage( const char *str);
|
||||
|
||||
void SendSysMessage( int32 entry);
|
||||
|
||||
@@ -588,7 +588,7 @@ void WorldSession::HandleEmoteOpcode( WorldPacket & recv_data )
|
||||
GetPlayer()->HandleEmoteCommand(emote);
|
||||
}
|
||||
|
||||
namespace MaNGOS
|
||||
namespace Trinity
|
||||
{
|
||||
class EmoteChatBuilder
|
||||
{
|
||||
@@ -618,7 +618,7 @@ namespace MaNGOS
|
||||
uint32 i_emote_num;
|
||||
Unit const* i_target;
|
||||
};
|
||||
} // namespace MaNGOS
|
||||
} // namespace Trinity
|
||||
|
||||
void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
@@ -659,16 +659,16 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||
|
||||
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
|
||||
|
||||
CellPair p = MaNGOS::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
|
||||
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > emote_do(emote_builder);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > > emote_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),emote_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > >, WorldTypeMapContainer > message(emote_worker);
|
||||
Trinity::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
|
||||
Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > emote_do(emote_builder);
|
||||
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > > emote_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),emote_do);
|
||||
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > >, WorldTypeMapContainer > message(emote_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
|
||||
|
||||
|
||||
+10
-10
@@ -654,14 +654,14 @@ void Creature::DoFleeToGetAssistance()
|
||||
{
|
||||
Creature* pCreature = NULL;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
|
||||
MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck> searcher(this, pCreature, u_check);
|
||||
Trinity::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck> searcher(this, pCreature, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius);
|
||||
@@ -1756,8 +1756,8 @@ void Creature::CallAssistance()
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::AnyAssistCreatureInRangeCheck> searcher(this, assistList, u_check);
|
||||
Trinity::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius);
|
||||
Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck> searcher(this, assistList, u_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
@@ -1785,15 +1785,15 @@ void Creature::CallForHelp(float fRadius)
|
||||
if (fRadius <= 0.0f || !getVictim() || isPet() || isCharmed())
|
||||
return;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
|
||||
MaNGOS::CreatureWorker<MaNGOS::CallOfHelpCreatureInRangeDo> worker(this, u_do);
|
||||
Trinity::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
|
||||
Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo> worker(this, u_do);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureWorker<MaNGOS::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
|
||||
TypeContainerVisitor<Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, fRadius);
|
||||
|
||||
@@ -1171,21 +1171,21 @@ inline Unit* CreatureEventAI::GetTargetByType(uint32 Target, Unit* pActionInvoke
|
||||
|
||||
Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Unit* pUnit = NULL;
|
||||
|
||||
MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(m_creature, pUnit, u_check);
|
||||
Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(m_creature, pUnit, u_check);
|
||||
|
||||
/*
|
||||
typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes;
|
||||
This means that if we only search grid then we cannot possibly return pets or players so this is safe
|
||||
*/
|
||||
TypeContainerVisitor<MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *m_creature->GetMap(), *m_creature, range);
|
||||
@@ -1194,15 +1194,15 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
|
||||
void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::FriendlyCCedInRange u_check(m_creature, range);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(m_creature, _list, u_check);
|
||||
Trinity::FriendlyCCedInRange u_check(m_creature, range);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(m_creature, _list, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap());
|
||||
@@ -1210,15 +1210,15 @@ void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
|
||||
|
||||
void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(m_creature, _list, u_check);
|
||||
Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(m_creature, _list, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap());
|
||||
|
||||
@@ -138,7 +138,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
|
||||
temp.orientation = fields[4].GetFloat();
|
||||
temp.SpawnTimeSecs = fields[5].GetUInt32();
|
||||
|
||||
if(!MaNGOS::IsValidMapCoord(temp.position_x,temp.position_y,temp.position_z,temp.orientation))
|
||||
if(!Trinity::IsValidMapCoord(temp.position_x,temp.position_y,temp.position_z,temp.orientation))
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f,%f,%f,%f), skipping.", i,temp.position_x,temp.position_y,temp.position_z,temp.orientation);
|
||||
continue;
|
||||
|
||||
@@ -42,5 +42,5 @@ class CreatureEventAIMgr
|
||||
CreatureEventAI_TextMap m_CreatureEventAI_TextMap;
|
||||
};
|
||||
|
||||
#define CreatureEAI_Mgr MaNGOS::Singleton<CreatureEventAIMgr>::Instance()
|
||||
#define CreatureEAI_Mgr Trinity::Singleton<CreatureEventAIMgr>::Instance()
|
||||
#endif
|
||||
|
||||
@@ -128,15 +128,15 @@ void DynamicObject::Update(uint32 p_time)
|
||||
if(m_radius)
|
||||
{
|
||||
// TODO: make a timer and update this in larger intervals
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::DynamicObjectUpdater notifier(*this, caster);
|
||||
Trinity::DynamicObjectUpdater notifier(*this, caster);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier);
|
||||
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
TypeContainerVisitor<Trinity::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier);
|
||||
TypeContainerVisitor<Trinity::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *GetMap(), *this, m_radius);
|
||||
|
||||
@@ -62,7 +62,7 @@ class TRINITY_DLL_SPEC FleeingMovementGenerator
|
||||
DestinationHolder< Traveller<T> > i_destinationHolder;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC TimedFleeingMovementGenerator
|
||||
class TRINITY_DLL_SPEC TimedFleeingMovementGenerator
|
||||
: public FleeingMovementGenerator<Creature>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -358,8 +358,8 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||
// environmental damage spells already have around enemies targeting but this not help in case not existed GO casting support
|
||||
// affect only players
|
||||
Player* player = NULL;
|
||||
MaNGOS::AnyPlayerInObjectRangeCheck checker(this, radius);
|
||||
MaNGOS::PlayerSearcher<MaNGOS::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
|
||||
Trinity::AnyPlayerInObjectRangeCheck checker(this, radius);
|
||||
Trinity::PlayerSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
ok = player;
|
||||
}
|
||||
@@ -867,8 +867,8 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target)
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,range);
|
||||
MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO,go_check);
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,range);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO,go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
@@ -888,8 +888,8 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
|
||||
CellPair p(Trinity::ComputeCellPair(GetPositionX(),GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
MaNGOS::NearestGameObjectFishingHole u_check(*this, range);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectFishingHole> checker(this, ok, u_check);
|
||||
Trinity::NearestGameObjectFishingHole u_check(*this, range);
|
||||
Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole> checker(this, ok, u_check);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class Player;
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
struct MANGOS_DLL_DECL VisibleNotifier
|
||||
struct TRINITY_DLL_DECL VisibleNotifier
|
||||
{
|
||||
bool force;
|
||||
Player &i_player;
|
||||
@@ -57,7 +57,7 @@ namespace Trinity
|
||||
void SendToSelf(void);
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL Player2PlayerNotifier : public VisibleNotifier
|
||||
struct TRINITY_DLL_DECL Player2PlayerNotifier : public VisibleNotifier
|
||||
{
|
||||
Player2PlayerNotifier(Player &player, bool forced = false) :
|
||||
VisibleNotifier(player, forced) {}
|
||||
@@ -81,7 +81,7 @@ namespace Trinity
|
||||
void Notify(void);
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL PlayerRelocationNotifier
|
||||
struct TRINITY_DLL_DECL PlayerRelocationNotifier
|
||||
{
|
||||
Player &i_player;
|
||||
PlayerRelocationNotifier(Player &pl) : i_player(pl) {}
|
||||
@@ -113,7 +113,7 @@ namespace Trinity
|
||||
void Visit(DynamicObjectMapType &);
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL DelayedUnitRelocation
|
||||
struct TRINITY_DLL_DECL DelayedUnitRelocation
|
||||
{
|
||||
typedef GridReadGuard ReadGuard;
|
||||
Map &i_map;
|
||||
@@ -128,7 +128,7 @@ namespace Trinity
|
||||
void Notify(GridRefManager<T> &);
|
||||
};
|
||||
|
||||
struct MANGOS_DLL_DECL ResetNotifier
|
||||
struct TRINITY_DLL_DECL ResetNotifier
|
||||
{
|
||||
uint16 reset_mask;
|
||||
ResetNotifier(uint16 notifies) : reset_mask(notifies) {}
|
||||
@@ -480,7 +480,7 @@ namespace Trinity
|
||||
};
|
||||
|
||||
template<class Do>
|
||||
struct MANGOS_DLL_DECL CreatureWorker
|
||||
struct TRINITY_DLL_DECL CreatureWorker
|
||||
{
|
||||
uint32 i_phaseMask;
|
||||
Do& i_do;
|
||||
|
||||
@@ -98,7 +98,7 @@ Trinity::PlayerVisibilityNotifier::Visit(GridRefManager<T> &m)
|
||||
|
||||
template<class T, class VISITOR>
|
||||
inline void
|
||||
MaNGOS::DelayedUnitRelocation::Notify(GridRefManager<T> &m)
|
||||
Trinity::DelayedUnitRelocation::Notify(GridRefManager<T> &m)
|
||||
{
|
||||
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ MaNGOS::DelayedUnitRelocation::Notify(GridRefManager<T> &m)
|
||||
|
||||
template<class T>
|
||||
inline void
|
||||
MaNGOS::ResetNotifier::resetNotify(GridRefManager<T> &m)
|
||||
Trinity::ResetNotifier::resetNotify(GridRefManager<T> &m)
|
||||
{
|
||||
for(typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
iter->getSource()->ResetAllNotifiesbyMask(reset_mask);
|
||||
@@ -609,7 +609,7 @@ void Trinity::PlayerSearcher<Check>::Visit(PlayerMapType &m)
|
||||
}
|
||||
|
||||
template<class Builder>
|
||||
void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
|
||||
void Trinity::LocalizedPacketDo<Builder>::operator()( Player* p )
|
||||
{
|
||||
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
|
||||
uint32 cache_idx = loc_idx+1;
|
||||
@@ -634,7 +634,7 @@ void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
|
||||
}
|
||||
|
||||
template<class Builder>
|
||||
void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
|
||||
void Trinity::LocalizedPacketListDo<Builder>::operator()( Player* p )
|
||||
{
|
||||
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
|
||||
uint32 cache_idx = loc_idx+1;
|
||||
|
||||
+1
-1
@@ -918,7 +918,7 @@ void Group::GetDataForXPAtKill(Unit const* victim, uint32& count,uint32& sum_lev
|
||||
if(!member_with_max_level || member_with_max_level->getLevel() < member->getLevel())
|
||||
member_with_max_level = member;
|
||||
|
||||
uint32 gray_level = MaNGOS::XP::GetGrayLevel(member->getLevel());
|
||||
uint32 gray_level = Trinity::XP::GetGrayLevel(member->getLevel());
|
||||
if( victim->getLevel() > gray_level && (!not_gray_member_with_max_level
|
||||
|| not_gray_member_with_max_level->getLevel() < member->getLevel()))
|
||||
not_gray_member_with_max_level = member;
|
||||
|
||||
+5
-5
@@ -110,11 +110,11 @@ void Guild::CreateDefaultGuildRanks(int locale_idx)
|
||||
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id);
|
||||
|
||||
CreateRank(objmgr.GetMangosString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL);
|
||||
CreateRank(objmgr.GetMangosString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL);
|
||||
CreateRank(objmgr.GetMangosString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
CreateRank(objmgr.GetMangosString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
CreateRank(objmgr.GetMangosString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
CreateRank(objmgr.GetTrinityString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL);
|
||||
CreateRank(objmgr.GetTrinityString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL);
|
||||
CreateRank(objmgr.GetTrinityString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
CreateRank(objmgr.GetTrinityString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
CreateRank(objmgr.GetTrinityString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
|
||||
}
|
||||
|
||||
bool Guild::AddMember(uint64 plGuid, uint32 plRank)
|
||||
|
||||
@@ -67,7 +67,7 @@ class TRINITY_DLL_SPEC DistractMovementGenerator : public MovementGenerator
|
||||
uint32 m_timer;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator
|
||||
class TRINITY_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator
|
||||
{
|
||||
public:
|
||||
AssistanceDistractMovementGenerator(uint32 timer) :
|
||||
|
||||
@@ -115,7 +115,7 @@ class InstanceSave
|
||||
bool m_canReset;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_DECL InstanceSaveManager : public MaNGOS::Singleton<InstanceSaveManager, MaNGOS::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> >
|
||||
class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trinity::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> >
|
||||
{
|
||||
friend class InstanceSave;
|
||||
public:
|
||||
|
||||
+2
-2
@@ -745,7 +745,7 @@ bool ChatHandler::HandleGPSCommand(const char* args)
|
||||
zone_x, zone_y, ground_z, floor_z, have_map, have_vmap );
|
||||
|
||||
sLog.outDebug("Player %s GPS call for %s '%s' (%s: %u):",
|
||||
m_session ? GetNameLink().c_str() : GetMangosString(LANG_CONSOLE_COMMAND),
|
||||
m_session ? GetNameLink().c_str() : GetTrinityString(LANG_CONSOLE_COMMAND),
|
||||
(obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(),
|
||||
(obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry()) );
|
||||
sLog.outDebug(GetTrinityString(LANG_MAP_POSITION),
|
||||
@@ -2526,7 +2526,7 @@ bool ChatHandler::HandleTeleNameCommand(const char * args)
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetMangosString(LANG_OFFLINE), tele->name.c_str());
|
||||
PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetTrinityString(LANG_OFFLINE), tele->name.c_str());
|
||||
Player::SavePositionInDB(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation,
|
||||
MapManager::Instance().GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid);
|
||||
}
|
||||
|
||||
+8
-8
@@ -780,7 +780,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog.outDebug(GetMangosString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
|
||||
sLog.outDebug(GetTrinityString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
|
||||
|
||||
map->Add(pGameObj);
|
||||
|
||||
@@ -3289,7 +3289,7 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args)
|
||||
FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID);
|
||||
char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#";
|
||||
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
|
||||
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]);
|
||||
std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]);
|
||||
std::ostringstream ss;
|
||||
if (m_session)
|
||||
ss << itr->second.ID << " - |cffffffff|Hfaction:" << itr->second.ID << "|h[" << factionName << " " << localeNames[loc] << "]|h|r";
|
||||
@@ -3299,17 +3299,17 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args)
|
||||
ss << " " << rankName << " (" << target->GetReputationMgr().GetReputation(factionEntry) << ")";
|
||||
|
||||
if(itr->second.Flags & FACTION_FLAG_VISIBLE)
|
||||
ss << GetMangosString(LANG_FACTION_VISIBLE);
|
||||
ss << GetTrinityString(LANG_FACTION_VISIBLE);
|
||||
if(itr->second.Flags & FACTION_FLAG_AT_WAR)
|
||||
ss << GetMangosString(LANG_FACTION_ATWAR);
|
||||
ss << GetTrinityString(LANG_FACTION_ATWAR);
|
||||
if(itr->second.Flags & FACTION_FLAG_PEACE_FORCED)
|
||||
ss << GetMangosString(LANG_FACTION_PEACE_FORCED);
|
||||
ss << GetTrinityString(LANG_FACTION_PEACE_FORCED);
|
||||
if(itr->second.Flags & FACTION_FLAG_HIDDEN)
|
||||
ss << GetMangosString(LANG_FACTION_HIDDEN);
|
||||
ss << GetTrinityString(LANG_FACTION_HIDDEN);
|
||||
if(itr->second.Flags & FACTION_FLAG_INVISIBLE_FORCED)
|
||||
ss << GetMangosString(LANG_FACTION_INVISIBLE_FORCED);
|
||||
ss << GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
|
||||
if(itr->second.Flags & FACTION_FLAG_INACTIVE)
|
||||
ss << GetMangosString(LANG_FACTION_INACTIVE);
|
||||
ss << GetTrinityString(LANG_FACTION_INACTIVE);
|
||||
|
||||
SendSysMessage(ss.str().c_str());
|
||||
}
|
||||
|
||||
+5
-5
@@ -1691,13 +1691,13 @@ bool ChatHandler::HandleCooldownCommand(const char *args)
|
||||
|
||||
if (!sSpellStore.LookupEntry(spell_id))
|
||||
{
|
||||
PSendSysMessage(LANG_UNKNOWN_SPELL, target==m_session->GetPlayer() ? GetMangosString(LANG_YOU) : tNameLink.c_str());
|
||||
PSendSysMessage(LANG_UNKNOWN_SPELL, target==m_session->GetPlayer() ? GetTrinityString(LANG_YOU) : tNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
target->RemoveSpellCooldown(spell_id,true);
|
||||
PSendSysMessage(LANG_REMOVE_COOLDOWN, spell_id, target==m_session->GetPlayer() ? GetMangosString(LANG_YOU) : tNameLink.c_str());
|
||||
PSendSysMessage(LANG_REMOVE_COOLDOWN, spell_id, target==m_session->GetPlayer() ? GetTrinityString(LANG_YOU) : tNameLink.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -3837,7 +3837,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
|
||||
if (repState) // and then target!=NULL also
|
||||
{
|
||||
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
|
||||
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]);
|
||||
std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]);
|
||||
|
||||
ss << " " << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ")";
|
||||
|
||||
@@ -6230,8 +6230,8 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::RespawnDo u_do;
|
||||
MaNGOS::WorldObjectWorker<MaNGOS::RespawnDo> worker(pl,u_do);
|
||||
Trinity::RespawnDo u_do;
|
||||
Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(pl,u_do);
|
||||
|
||||
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
|
||||
+30
-30
@@ -505,7 +505,7 @@ Map::Add(T *obj)
|
||||
/*
|
||||
void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
|
||||
|
||||
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
|
||||
{
|
||||
@@ -520,15 +520,15 @@ void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
|
||||
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
||||
return;
|
||||
|
||||
MaNGOS::MessageDeliverer post_man(*player, msg, to_self);
|
||||
TypeContainerVisitor<MaNGOS::MessageDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
Trinity::MessageDeliverer post_man(*player, msg, to_self);
|
||||
TypeContainerVisitor<Trinity::MessageDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
CellLock<ReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *this, *player, GetVisibilityDistance());
|
||||
}
|
||||
|
||||
void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
|
||||
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
|
||||
{
|
||||
@@ -545,15 +545,15 @@ void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
|
||||
|
||||
//TODO: currently on continents when Visibility.Distance.InFlight > Visibility.Distance.Continents
|
||||
//we have alot of blinking mobs because monster move packet send is broken...
|
||||
MaNGOS::ObjectMessageDeliverer post_man(*obj,msg);
|
||||
TypeContainerVisitor<MaNGOS::ObjectMessageDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
Trinity::ObjectMessageDeliverer post_man(*obj,msg);
|
||||
TypeContainerVisitor<Trinity::ObjectMessageDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
CellLock<ReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *this, *obj, GetVisibilityDistance());
|
||||
}
|
||||
|
||||
void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, bool to_self, bool own_team_only)
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
|
||||
|
||||
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
|
||||
{
|
||||
@@ -568,15 +568,15 @@ void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, boo
|
||||
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
||||
return;
|
||||
|
||||
MaNGOS::MessageDistDeliverer post_man(*player, msg, dist, to_self, own_team_only);
|
||||
TypeContainerVisitor<MaNGOS::MessageDistDeliverer , WorldTypeMapContainer > message(post_man);
|
||||
Trinity::MessageDistDeliverer post_man(*player, msg, dist, to_self, own_team_only);
|
||||
TypeContainerVisitor<Trinity::MessageDistDeliverer , WorldTypeMapContainer > message(post_man);
|
||||
CellLock<ReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *this, *player, dist);
|
||||
}
|
||||
|
||||
void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
|
||||
|
||||
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
|
||||
{
|
||||
@@ -591,8 +591,8 @@ void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
|
||||
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
|
||||
return;
|
||||
|
||||
MaNGOS::ObjectMessageDistDeliverer post_man(*obj, msg, dist);
|
||||
TypeContainerVisitor<MaNGOS::ObjectMessageDistDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
Trinity::ObjectMessageDistDeliverer post_man(*obj, msg, dist);
|
||||
TypeContainerVisitor<Trinity::ObjectMessageDistDeliverer, WorldTypeMapContainer > message(post_man);
|
||||
CellLock<ReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *this, *obj, dist);
|
||||
}
|
||||
@@ -2349,11 +2349,11 @@ void Map::UpdateObjectsVisibilityFor( Player* player, Cell cell, CellPair cellpa
|
||||
void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
|
||||
{
|
||||
CellLock<ReadGuard> cell_lock(cell, cellpair);
|
||||
MaNGOS::PlayerRelocationNotifier relocationNotifier(*player);
|
||||
Trinity::PlayerRelocationNotifier relocationNotifier(*player);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, GridTypeMapContainer > p2grid_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, WorldTypeMapContainer > p2world_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<Trinity::PlayerRelocationNotifier, GridTypeMapContainer > p2grid_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<Trinity::PlayerRelocationNotifier, WorldTypeMapContainer > p2world_relocation(relocationNotifier);
|
||||
|
||||
cell_lock->Visit(cell_lock, p2grid_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
|
||||
cell_lock->Visit(cell_lock, p2world_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
|
||||
@@ -2362,12 +2362,12 @@ void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
|
||||
void Map::CreatureRelocationNotify(Creature *creature, Cell cell, CellPair cellpair)
|
||||
{
|
||||
CellLock<ReadGuard> cell_lock(cell, cellpair);
|
||||
MaNGOS::CreatureRelocationNotifier relocationNotifier(*creature);
|
||||
Trinity::CreatureRelocationNotifier relocationNotifier(*creature);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate(); // not trigger load unloaded grids at notifier call
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, WorldTypeMapContainer > c2world_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, GridTypeMapContainer > c2grid_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<Trinity::CreatureRelocationNotifier, WorldTypeMapContainer > c2world_relocation(relocationNotifier);
|
||||
TypeContainerVisitor<Trinity::CreatureRelocationNotifier, GridTypeMapContainer > c2grid_relocation(relocationNotifier);
|
||||
|
||||
cell_lock->Visit(cell_lock, c2world_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
|
||||
cell_lock->Visit(cell_lock, c2grid_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
|
||||
@@ -3515,14 +3515,14 @@ void Map::ScriptsProcess()
|
||||
GameObject *go = NULL;
|
||||
int32 time_to_despawn = step.script->datalong2<5 ? 5 : (int32)step.script->datalong2;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(summoner->GetPositionX(), summoner->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(summoner->GetPositionX(), summoner->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::GameObjectWithDbGUIDCheck go_check(*summoner,step.script->datalong);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(summoner, go,go_check);
|
||||
Trinity::GameObjectWithDbGUIDCheck go_check(*summoner,step.script->datalong);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(summoner, go,go_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *summoner->GetMap());
|
||||
|
||||
@@ -3575,14 +3575,14 @@ void Map::ScriptsProcess()
|
||||
GameObject *door = NULL;
|
||||
int32 time_to_close = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
|
||||
Trinity::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
|
||||
|
||||
@@ -3631,14 +3631,14 @@ void Map::ScriptsProcess()
|
||||
GameObject *door = NULL;
|
||||
int32 time_to_open = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
|
||||
Trinity::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
|
||||
|
||||
|
||||
+3
-3
@@ -71,7 +71,7 @@ struct WGuard
|
||||
|
||||
typedef RGuard<GridRWLock, ACE_Thread_Mutex> GridReadGuard;
|
||||
typedef WGuard<GridRWLock, ACE_Thread_Mutex> GridWriteGuard;
|
||||
typedef MaNGOS::SingleThreaded<GridRWLock>::Lock NullGuard;
|
||||
typedef Trinity::SingleThreaded<GridRWLock>::Lock NullGuard;
|
||||
|
||||
//******************************************
|
||||
// Map file format defines
|
||||
@@ -257,7 +257,7 @@ typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
|
||||
|
||||
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
|
||||
|
||||
class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::ObjectLevelLockable<Map, ACE_Thread_Mutex>
|
||||
class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>
|
||||
{
|
||||
friend class MapReference;
|
||||
public:
|
||||
@@ -508,7 +508,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
||||
protected:
|
||||
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
|
||||
|
||||
typedef MaNGOS::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard;
|
||||
typedef Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard;
|
||||
|
||||
MapEntry const* i_mapEntry;
|
||||
uint8 i_spawnMode;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Language.h"
|
||||
|
||||
#define CLASS_LOCK MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex>
|
||||
#define CLASS_LOCK Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>
|
||||
INSTANTIATE_SINGLETON_2(MapManager, CLASS_LOCK);
|
||||
INSTANTIATE_CLASS_MUTEX(MapManager, ACE_Thread_Mutex);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class Transport;
|
||||
|
||||
#define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000
|
||||
|
||||
class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex> >
|
||||
class TRINITY_DLL_DECL MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex> >
|
||||
{
|
||||
|
||||
friend class Trinity::OperatorNew<MapManager>;
|
||||
@@ -149,7 +149,7 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
||||
return (iter == i_maps.end() ? NULL : iter->second);
|
||||
}
|
||||
|
||||
typedef MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex>::Lock Guard;
|
||||
typedef Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>::Lock Guard;
|
||||
uint32 i_gridCleanUpDelay;
|
||||
MapMapType i_maps;
|
||||
IntervalTimer i_timer;
|
||||
|
||||
+22
-22
@@ -1513,7 +1513,7 @@ namespace Trinity
|
||||
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
|
||||
void operator()(WorldPacket& data, int32 loc_idx)
|
||||
{
|
||||
char const* text = objmgr.GetMangosString(i_textId,loc_idx);
|
||||
char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
// TODO: i_object.GetName() also must be localized?
|
||||
i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID);
|
||||
@@ -1536,10 +1536,10 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid);
|
||||
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
|
||||
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
|
||||
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
|
||||
}
|
||||
@@ -1552,18 +1552,18 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
|
||||
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
|
||||
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
|
||||
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL));
|
||||
}
|
||||
|
||||
void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid)
|
||||
{
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
|
||||
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
|
||||
|
||||
uint32 zoneid = GetZoneId();
|
||||
|
||||
@@ -1581,10 +1581,10 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid);
|
||||
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build);
|
||||
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
|
||||
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid);
|
||||
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
|
||||
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
|
||||
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
|
||||
}
|
||||
@@ -1998,7 +1998,7 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, ui
|
||||
}
|
||||
|
||||
/*
|
||||
namespace MaNGOS
|
||||
namespace Trinity
|
||||
{
|
||||
class NearUsedPosDo
|
||||
{
|
||||
@@ -2067,7 +2067,7 @@ namespace MaNGOS
|
||||
float i_angle;
|
||||
ObjectPosSelector& i_selector;
|
||||
};
|
||||
} // namespace MaNGOS
|
||||
} // namespace Trinity
|
||||
*/
|
||||
|
||||
//===================================================================================================
|
||||
@@ -2105,16 +2105,16 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y,
|
||||
|
||||
// adding used positions around object
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::NearUsedPosDo u_do(*this,searcher,absAngle,selector);
|
||||
MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo> worker(this,u_do);
|
||||
Trinity::NearUsedPosDo u_do(*this,searcher,absAngle,selector);
|
||||
Trinity::WorldObjectWorker<Trinity::NearUsedPosDo> worker(this,u_do);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, GridTypeMapContainer > grid_obj_worker(worker);
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker);
|
||||
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, GridTypeMapContainer > grid_obj_worker(worker);
|
||||
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#define CLASS_LOCK MaNGOS::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex>
|
||||
#define CLASS_LOCK Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex>
|
||||
INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK);
|
||||
INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class HashMapHolder
|
||||
|
||||
typedef UNORDERED_MAP< uint64, T* > MapType;
|
||||
typedef ACE_Thread_Mutex LockType;
|
||||
typedef MaNGOS::GeneralLock<LockType > Guard;
|
||||
typedef Trinity::GeneralLock<LockType > Guard;
|
||||
|
||||
static void Insert(T* o)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ class HashMapHolder
|
||||
static MapType m_objectMap;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor, MaNGOS::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> >
|
||||
class TRINITY_DLL_DECL ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> >
|
||||
{
|
||||
|
||||
friend class Trinity::OperatorNew<ObjectAccessor>;
|
||||
@@ -255,7 +255,7 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
|
||||
Player2CorpsesMapType i_player2corpse;
|
||||
|
||||
typedef ACE_Thread_Mutex LockType;
|
||||
typedef MaNGOS::GeneralLock<LockType > Guard;
|
||||
typedef Trinity::GeneralLock<LockType > Guard;
|
||||
|
||||
static void _buildChangeObjectForPlayer(WorldObject *, UpdateDataMapType &);
|
||||
static void _buildPacket(Player *, Object *, UpdateDataMapType &);
|
||||
|
||||
@@ -6725,7 +6725,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
||||
POI.data = fields[5].GetUInt32();
|
||||
POI.icon_name = fields[6].GetCppString();
|
||||
|
||||
if (!MaNGOS::IsValidMapCoord(POI.x,POI.y))
|
||||
if (!Trinity::IsValidMapCoord(POI.x,POI.y))
|
||||
{
|
||||
sLog.outErrorDb("Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.",point_id,POI.x,POI.y);
|
||||
continue;
|
||||
|
||||
+5
-5
@@ -6163,7 +6163,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
|
||||
|
||||
float rate = for_quest ? sWorld.getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld.getRate(RATE_REPUTATION_LOWLEVEL_KILL);
|
||||
|
||||
if (rate != 1.0f && creatureOrQuestLevel <= MaNGOS::XP::GetGrayLevel(getLevel()))
|
||||
if (rate != 1.0f && creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))
|
||||
percent *= rate;
|
||||
|
||||
float repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
|
||||
@@ -13717,7 +13717,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
||||
|
||||
// honor reward
|
||||
if (pQuest->GetRewHonorableKills())
|
||||
RewardHonor(NULL, 0, MaNGOS::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills()));
|
||||
RewardHonor(NULL, 0, Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills()));
|
||||
|
||||
// title reward
|
||||
if (pQuest->GetCharTitleId())
|
||||
@@ -15351,7 +15351,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
m_movementInfo.t_z = fields[29].GetFloat();
|
||||
m_movementInfo.t_o = fields[30].GetFloat();
|
||||
|
||||
if( !MaNGOS::IsValidMapCoord(
|
||||
if( !Trinity::IsValidMapCoord(
|
||||
GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y,
|
||||
GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o) ||
|
||||
// transport size limited
|
||||
@@ -16061,7 +16061,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
|
||||
// send by mail problematic items
|
||||
while (!problematicItems.empty())
|
||||
{
|
||||
std::string subject = GetSession()->GetMangosString(LANG_NOT_EQUIPPED_ITEM);
|
||||
std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
|
||||
|
||||
// fill mail
|
||||
MailDraft draft(subject);
|
||||
@@ -20569,7 +20569,7 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/)
|
||||
offItem->SaveToDB(); // recursive and not have transaction guard into self, item not in inventory and can be save standalone
|
||||
CharacterDatabase.CommitTransaction();
|
||||
|
||||
std::string subject = GetSession()->GetMangosString(LANG_NOT_EQUIPPED_ITEM);
|
||||
std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
|
||||
MailDraft(subject).AddItem(offItem).SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -960,7 +960,7 @@ struct BGData
|
||||
bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; }
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC Player : public Unit
|
||||
class TRINITY_DLL_SPEC Player : public Unit
|
||||
{
|
||||
friend class WorldSession;
|
||||
friend void Item::AddToUpdateQueueOf(Player *player);
|
||||
|
||||
@@ -52,7 +52,7 @@ class TRINITY_DLL_SPEC PointMovementGenerator
|
||||
bool arrived;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC AssistanceMovementGenerator
|
||||
class TRINITY_DLL_SPEC AssistanceMovementGenerator
|
||||
: public PointMovementGenerator<Creature>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -99,5 +99,5 @@ class PoolHandler
|
||||
|
||||
};
|
||||
|
||||
#define poolhandler MaNGOS::Singleton<PoolHandler>::Instance()
|
||||
#define poolhandler Trinity::Singleton<PoolHandler>::Instance()
|
||||
#endif
|
||||
|
||||
+16
-16
@@ -505,7 +505,7 @@ WorldObject* Spell::FindCorpseUsing()
|
||||
// non-standard target selection
|
||||
float max_range = GetSpellMaxRange(m_spellInfo, false);
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
@@ -513,15 +513,15 @@ WorldObject* Spell::FindCorpseUsing()
|
||||
WorldObject* result = NULL;
|
||||
|
||||
T u_check(m_caster, max_range);
|
||||
MaNGOS::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
|
||||
Trinity::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap(), *m_caster, max_range);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
|
||||
cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap(), *m_caster, max_range);
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ void Spell::SelectSpellTargets()
|
||||
{
|
||||
case 20577: // Cannibalize
|
||||
{
|
||||
WorldObject* result = FindCorpseUsing<MaNGOS::CannibalizeObjectCheck> ();
|
||||
WorldObject* result = FindCorpseUsing<Trinity::CannibalizeObjectCheck> ();
|
||||
|
||||
if(result)
|
||||
{
|
||||
@@ -2288,7 +2288,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
case 46584: // Raise Dead
|
||||
{
|
||||
m_targets.m_targetMask &= ~TARGET_FLAG_DEST_LOCATION;
|
||||
if (WorldObject* result = FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck> ())
|
||||
if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck> ())
|
||||
{
|
||||
switch(result->GetTypeId())
|
||||
{
|
||||
@@ -4640,14 +4640,14 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
if (i_spellST->second.targetEntry)
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range);
|
||||
MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> checker(m_caster, p_GameObject,go_check);
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(m_caster, p_GameObject,go_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap());
|
||||
|
||||
@@ -4677,15 +4677,15 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
Creature *p_Creature = NULL;
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate(); // Really don't know what is that???
|
||||
|
||||
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range);
|
||||
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap(), *m_caster, range);
|
||||
@@ -5622,8 +5622,8 @@ SpellCastResult Spell::CheckItems()
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
GameObject* ok = NULL;
|
||||
MaNGOS::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(m_caster, ok, go_check);
|
||||
Trinity::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck> checker(m_caster, ok, go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
|
||||
+1
-1
@@ -425,7 +425,7 @@ class Spell
|
||||
void CheckSrc() { if(!m_targets.HasSrc()) m_targets.setSrc(m_caster); }
|
||||
void CheckDst() { if(!m_targets.HasDst()) m_targets.setDst(m_caster); }
|
||||
|
||||
static void MANGOS_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result);
|
||||
static void TRINITY_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result);
|
||||
void SendCastResult(SpellCastResult result);
|
||||
void SendSpellStart();
|
||||
void SendSpellGo();
|
||||
|
||||
@@ -6776,15 +6776,15 @@ void AuraEffect::PeriodicDummyTick()
|
||||
// eff_radius ==0
|
||||
float radius = GetSpellMaxRange(spell, false);
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(caster, caster, radius);
|
||||
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster,targets, u_check);
|
||||
Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(caster, caster, radius);
|
||||
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster,targets, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, WorldTypeMapContainer > world_object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, WorldTypeMapContainer > world_object_checker(checker);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
|
||||
|
||||
@@ -3965,7 +3965,7 @@ void Spell::EffectAddHonor(uint32 /*i*/)
|
||||
// do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80
|
||||
if (damage <= 50)
|
||||
{
|
||||
uint32 honor_reward = MaNGOS::Honor::hk_honor_at_level(unitTarget->getLevel(), damage);
|
||||
uint32 honor_reward = Trinity::Honor::hk_honor_at_level(unitTarget->getLevel(), damage);
|
||||
((Player*)unitTarget)->RewardHonor(NULL, 1, honor_reward);
|
||||
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
|
||||
}
|
||||
|
||||
+7
-7
@@ -2026,7 +2026,7 @@ void World::SendGlobalGMMessage(WorldPacket *packet, WorldSession *self, uint32
|
||||
}
|
||||
}
|
||||
|
||||
namespace MaNGOS
|
||||
namespace Trinity
|
||||
{
|
||||
class WorldWorldTextBuilder
|
||||
{
|
||||
@@ -2035,7 +2035,7 @@ namespace MaNGOS
|
||||
explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
|
||||
void operator()(WorldPacketList& data_list, int32 loc_idx)
|
||||
{
|
||||
char const* text = objmgr.GetMangosString(i_textId,loc_idx);
|
||||
char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
if (i_args)
|
||||
{
|
||||
@@ -2081,7 +2081,7 @@ namespace MaNGOS
|
||||
int32 i_textId;
|
||||
va_list* i_args;
|
||||
};
|
||||
} // namespace MaNGOS
|
||||
} // namespace Trinity
|
||||
|
||||
/// Send a System Message to all players (except self if mentioned)
|
||||
void World::SendWorldText(int32 string_id, ...)
|
||||
@@ -2089,8 +2089,8 @@ void World::SendWorldText(int32 string_id, ...)
|
||||
va_list ap;
|
||||
va_start(ap, string_id);
|
||||
|
||||
MaNGOS::WorldWorldTextBuilder wt_builder(string_id, &ap);
|
||||
MaNGOS::LocalizedPacketListDo<MaNGOS::WorldWorldTextBuilder> wt_do(wt_builder);
|
||||
Trinity::WorldWorldTextBuilder wt_builder(string_id, &ap);
|
||||
Trinity::LocalizedPacketListDo<Trinity::WorldWorldTextBuilder> wt_do(wt_builder);
|
||||
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
{
|
||||
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
|
||||
@@ -2108,8 +2108,8 @@ void World::SendGMText(int32 string_id, ...)
|
||||
va_list ap;
|
||||
va_start(ap, string_id);
|
||||
|
||||
MaNGOS::WorldWorldTextBuilder wt_builder(string_id, &ap);
|
||||
MaNGOS::LocalizedPacketListDo<MaNGOS::WorldWorldTextBuilder> wt_do(wt_builder);
|
||||
Trinity::WorldWorldTextBuilder wt_builder(string_id, &ap);
|
||||
Trinity::LocalizedPacketListDo<Trinity::WorldWorldTextBuilder> wt_do(wt_builder);
|
||||
for (SessionMap::iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
{
|
||||
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "Config/ConfigEnv.h"
|
||||
#include "Log.h"
|
||||
|
||||
#define CLASS_LOCK MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>
|
||||
#define CLASS_LOCK Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>
|
||||
INSTANTIATE_SINGLETON_2(WorldLog, CLASS_LOCK);
|
||||
INSTANTIATE_CLASS_MUTEX(WorldLog, ACE_Thread_Mutex);
|
||||
|
||||
|
||||
+2
-2
@@ -32,13 +32,13 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
/// %Log packets to a file
|
||||
class MANGOS_DLL_DECL WorldLog : public MaNGOS::Singleton<WorldLog, MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> >
|
||||
class TRINITY_DLL_DECL WorldLog : public Trinity::Singleton<WorldLog, Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> >
|
||||
{
|
||||
friend class Trinity::OperatorNew<WorldLog>;
|
||||
WorldLog();
|
||||
WorldLog(const WorldLog &);
|
||||
WorldLog& operator=(const WorldLog &);
|
||||
typedef MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>::Lock Guard;
|
||||
typedef Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>::Lock Guard;
|
||||
|
||||
/// Close the file in destructor
|
||||
~WorldLog();
|
||||
|
||||
@@ -46,7 +46,7 @@ class TRINITY_DLL_SPEC QueryResult
|
||||
|
||||
typedef std::vector<std::string> QueryFieldNames;
|
||||
|
||||
class MANGOS_DLL_SPEC QueryNamedResult
|
||||
class TRINITY_DLL_SPEC QueryNamedResult
|
||||
{
|
||||
public:
|
||||
explicit QueryNamedResult(QueryResult* query, QueryFieldNames const& names) : mQuery(query), mFieldNames(names) {}
|
||||
|
||||
@@ -71,7 +71,7 @@ class SqlResultQueue; /// queue for thread
|
||||
class SqlQueryHolder; /// groups several async quries
|
||||
class SqlQueryHolderEx; /// points to a holder, added to the delay thread
|
||||
|
||||
class SqlResultQueue : public ACE_Based::LockedQueue<MaNGOS::IQueryCallback* , ACE_Thread_Mutex>
|
||||
class SqlResultQueue : public ACE_Based::LockedQueue<Trinity::IQueryCallback* , ACE_Thread_Mutex>
|
||||
{
|
||||
public:
|
||||
SqlResultQueue() {}
|
||||
|
||||
Reference in New Issue
Block a user