aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/6648_world_gameobject_template.sql1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp2
-rw-r--r--src/bindings/scripts/scripts/world/go_scripts.cpp62
-rw-r--r--src/framework/Platform/Define.h12
-rw-r--r--src/game/AchievementMgr.cpp20
-rw-r--r--src/game/BattleGround.cpp26
-rw-r--r--src/game/ChannelMgr.cpp6
-rw-r--r--src/game/Chat.cpp6
-rw-r--r--src/game/Chat.h2
-rw-r--r--src/game/ChatHandler.cpp14
-rw-r--r--src/game/Creature.cpp20
-rw-r--r--src/game/CreatureEventAI.cpp24
-rw-r--r--src/game/CreatureEventAIMgr.cpp2
-rw-r--r--src/game/CreatureEventAIMgr.h2
-rw-r--r--src/game/DynamicObject.cpp8
-rw-r--r--src/game/FleeingMovementGenerator.h2
-rw-r--r--src/game/GameObject.cpp12
-rw-r--r--src/game/GridNotifiers.h12
-rw-r--r--src/game/GridNotifiersImpl.h8
-rw-r--r--src/game/Group.cpp2
-rw-r--r--src/game/Guild.cpp10
-rw-r--r--src/game/IdleMovementGenerator.h2
-rw-r--r--src/game/InstanceSaveMgr.h2
-rw-r--r--src/game/Level1.cpp4
-rw-r--r--src/game/Level2.cpp16
-rw-r--r--src/game/Level3.cpp10
-rw-r--r--src/game/Map.cpp60
-rw-r--r--src/game/Map.h6
-rw-r--r--src/game/MapManager.cpp2
-rw-r--r--src/game/MapManager.h4
-rw-r--r--src/game/Object.cpp44
-rw-r--r--src/game/ObjectAccessor.cpp2
-rw-r--r--src/game/ObjectAccessor.h6
-rw-r--r--src/game/ObjectMgr.cpp2
-rw-r--r--src/game/Player.cpp10
-rw-r--r--src/game/Player.h2
-rw-r--r--src/game/PointMovementGenerator.h2
-rw-r--r--src/game/PoolHandler.h2
-rw-r--r--src/game/Spell.cpp32
-rw-r--r--src/game/Spell.h2
-rw-r--r--src/game/SpellAuras.cpp10
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/World.cpp14
-rw-r--r--src/game/WorldLog.cpp2
-rw-r--r--src/game/WorldLog.h4
-rw-r--r--src/shared/Database/QueryResult.h2
-rw-r--r--src/shared/Database/SqlOperations.h2
52 files changed, 288 insertions, 226 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 5bc728b6ee4..4488b8af8db 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -41,6 +41,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_the_blue_flight' WHERE
UPDATE `gameobject_template` SET `ScriptName`='go_acherus_soul_prison' WHERE `entry` IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590);
UPDATE `gameobject_template` SET `ScriptName`='go_shrine_of_the_birds' WHERE `entry` IN (185547,185553,185551);
UPDATE `gameobject_template` SET `ScriptName`='go_matrix_punchograph' WHERE `entry` IN (142345,142475,142476,142696);
+UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
/* GUARD */
diff --git a/sql/updates/6648_world_gameobject_template.sql b/sql/updates/6648_world_gameobject_template.sql
new file mode 100644
index 00000000000..470c2e2e036
--- /dev/null
+++ b/sql/updates/6648_world_gameobject_template.sql
@@ -0,0 +1 @@
+UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
index 9ef00a73f3d..27779821fe7 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
@@ -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) { }
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp
index f33ebdf15ff..70a97475f76 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp
@@ -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)
{
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
index e3331db689d..7059b393502 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
@@ -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)
{
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp
index f8fc8285819..f3c71ab2605 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -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)
{
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp
index f9a8b1ccafb..72269f5b440 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp
@@ -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)
{
diff --git a/src/bindings/scripts/scripts/world/go_scripts.cpp b/src/bindings/scripts/scripts/world/go_scripts.cpp
index 052310ad057..06d7a1b44b5 100644
--- a/src/bindings/scripts/scripts/world/go_scripts.cpp
+++ b/src/bindings/scripts/scripts/world/go_scripts.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: GO_Scripts
SD%Complete: 100
-SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843
+SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843,12982
SDCategory: Game Objects
EndScriptData */
@@ -41,6 +41,7 @@ go_tele_to_dalaran_crystal
go_tele_to_violet_stand
go_rusty_cage
go_scourge_cage
+go_jotunheim_cage
EndContentData */
#include "precompiled.h"
@@ -568,7 +569,7 @@ bool GOHello_go_scourge_cage(Player *pPlayer, GameObject *pGO)
pPlayer->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID());
pNearestPrisoner->DisappearAndDie();
}
-
+
return true;
}
@@ -607,6 +608,57 @@ bool GOHello_go_blood_filled_orb(Player *pPlayer, GameObject *pGO)
return true;
}
+/*######
+## go_jotunheim_cage
+######*/
+
+enum eJotunheimCage
+{
+ NPC_EBON_BLADE_PRISONER_HUMAN = 30186,
+ NPC_EBON_BLADE_PRISONER_NE = 30194,
+ NPC_EBON_BLADE_PRISONER_TROLL = 30196,
+ NPC_EBON_BLADE_PRISONER_ORC = 30195,
+
+ SPELL_SUMMON_BLADE_KNIGHT_H = 56207,
+ SPELL_SUMMON_BLADE_KNIGHT_NE = 56209,
+ SPELL_SUMMON_BLADE_KNIGHT_ORC = 56212,
+ SPELL_SUMMON_BLADE_KNIGHT_TROLL = 56214
+};
+
+bool GOHello_go_jotunheim_cage(Player* pPlayer, GameObject* pGO)
+{
+ Creature* pPrisoner;
+ pPrisoner = NULL;
+
+ if ((pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_TROLL, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_ORC, 5.0f, true)) ||
+ (pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_NE, 5.0f, true)))
+ {
+ if (pPrisoner && pPrisoner->isAlive())
+ {
+ pPrisoner->DisappearAndDie();
+ pPlayer->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
+ switch(pPrisoner->GetEntry())
+ {
+ case NPC_EBON_BLADE_PRISONER_HUMAN:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_H,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_NE:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_NE,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_TROLL:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_TROLL,true);
+ break;
+ case NPC_EBON_BLADE_PRISONER_ORC:
+ pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_ORC,true);
+ break;
+ }
+ }
+ }
+ return true;
+}
+
void AddSC_go_scripts()
{
Script *newscript;
@@ -741,5 +793,9 @@ void AddSC_go_scripts()
newscript->Name = "go_blood_filled_orb";
newscript->pGOHello = &GOHello_go_blood_filled_orb;
newscript->RegisterSelf();
-}
+ newscript = new Script;
+ newscript->Name = "go_jotunheim_cage";
+ newscript->pGOHello = &GOHello_go_jotunheim_cage;
+ newscript->RegisterSelf();
+}
diff --git a/src/framework/Platform/Define.h b/src/framework/Platform/Define.h
index 9536098258a..95e7c0d7b66 100644
--- a/src/framework/Platform/Define.h
+++ b/src/framework/Platform/Define.h
@@ -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
diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index afd51d1f55e..b7175a09af3 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -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));
}
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index de9c0f6125d..554f8555627 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -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);
}
diff --git a/src/game/ChannelMgr.cpp b/src/game/ChannelMgr.cpp
index 16a236a1f95..90c1b62f69a 100644
--- a/src/game/ChannelMgr.cpp
+++ b/src/game/ChannelMgr.cpp
@@ -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;
}
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 2bb7533c4ae..b93462802b8 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -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);
}
diff --git a/src/game/Chat.h b/src/game/Chat.h
index fd851a559b5..34f59a0095f 100644
--- a/src/game/Chat.h
+++ b/src/game/Chat.h
@@ -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);
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index 44eba0e8ccd..dd39dd72190 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -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));
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 579e8fd28bc..59ad2930c30 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -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);
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 07de3fa0efc..d069f7f4348 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -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());
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp
index 2d4c92ad7bf..d25862afd29 100644
--- a/src/game/CreatureEventAIMgr.cpp
+++ b/src/game/CreatureEventAIMgr.cpp
@@ -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;
diff --git a/src/game/CreatureEventAIMgr.h b/src/game/CreatureEventAIMgr.h
index b4672460cc6..847b1daa2ac 100644
--- a/src/game/CreatureEventAIMgr.h
+++ b/src/game/CreatureEventAIMgr.h
@@ -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
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp
index be56b9f5069..1cd85fa0946 100644
--- a/src/game/DynamicObject.cpp
+++ b/src/game/DynamicObject.cpp
@@ -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);
diff --git a/src/game/FleeingMovementGenerator.h b/src/game/FleeingMovementGenerator.h
index 0bc4bdb9757..5d4603b5aec 100644
--- a/src/game/FleeingMovementGenerator.h
+++ b/src/game/FleeingMovementGenerator.h
@@ -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:
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 5110d2e23d9..e3794de8a8e 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -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);
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h
index 97bba42fe93..d728245791c 100644
--- a/src/game/GridNotifiers.h
+++ b/src/game/GridNotifiers.h
@@ -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;
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index e1738af4324..c19dc66139c 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -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;
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index 299b9cdf888..ea561df6df9 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -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;
diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp
index 76c93a07956..9f6a0b62055 100644
--- a/src/game/Guild.cpp
+++ b/src/game/Guild.cpp
@@ -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)
diff --git a/src/game/IdleMovementGenerator.h b/src/game/IdleMovementGenerator.h
index 7251e8b011f..4ffe3601b09 100644
--- a/src/game/IdleMovementGenerator.h
+++ b/src/game/IdleMovementGenerator.h
@@ -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) :
diff --git a/src/game/InstanceSaveMgr.h b/src/game/InstanceSaveMgr.h
index 6d031af752d..7f8a2a74e60 100644
--- a/src/game/InstanceSaveMgr.h
+++ b/src/game/InstanceSaveMgr.h
@@ -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:
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp
index bb99299e060..51424a48421 100644
--- a/src/game/Level1.cpp
+++ b/src/game/Level1.cpp
@@ -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);
}
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index f22a3dedfbb..49ebc05e1d5 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -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());
}
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index ae4aecae0d8..04705c880b4 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -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);
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index c0556ecc5ee..8e72be7ad5e 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -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());
diff --git a/src/game/Map.h b/src/game/Map.h
index 9144624b23d..494618baa8e 100644
--- a/src/game/Map.h
+++ b/src/game/Map.h
@@ -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;
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 4312c7a3b16..c34f040514d 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -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);
diff --git a/src/game/MapManager.h b/src/game/MapManager.h
index df90add4d57..3be92a35a9f 100644
--- a/src/game/MapManager.h
+++ b/src/game/MapManager.h
@@ -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;
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 1314c6a7a11..ca622edb9c6 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1518,7 +1518,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);
@@ -1541,10 +1541,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));
}
@@ -1557,18 +1557,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();
@@ -1586,10 +1586,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));
}
@@ -2003,7 +2003,7 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, ui
}
/*
-namespace MaNGOS
+namespace Trinity
{
class NearUsedPosDo
{
@@ -2072,7 +2072,7 @@ namespace MaNGOS
float i_angle;
ObjectPosSelector& i_selector;
};
-} // namespace MaNGOS
+} // namespace Trinity
*/
//===================================================================================================
@@ -2110,16 +2110,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);
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index e52423eabd8..03c4f99eacc 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -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);
diff --git a/src/game/ObjectAccessor.h b/src/game/ObjectAccessor.h
index 780c108e5e4..43a613d1be0 100644
--- a/src/game/ObjectAccessor.h
+++ b/src/game/ObjectAccessor.h
@@ -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 &);
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 194b68b65c4..1e6c6a27ee2 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -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;
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 329e605ec0e..677114a6c87 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -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));
}
}
diff --git a/src/game/Player.h b/src/game/Player.h
index 2045d9686f5..284a9c8e79b 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -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);
diff --git a/src/game/PointMovementGenerator.h b/src/game/PointMovementGenerator.h
index baeb8b26dbd..2dfe2a46cfc 100644
--- a/src/game/PointMovementGenerator.h
+++ b/src/game/PointMovementGenerator.h
@@ -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:
diff --git a/src/game/PoolHandler.h b/src/game/PoolHandler.h
index a3f6755bfde..181da09237c 100644
--- a/src/game/PoolHandler.h
+++ b/src/game/PoolHandler.h
@@ -99,5 +99,5 @@ class PoolHandler
};
-#define poolhandler MaNGOS::Singleton<PoolHandler>::Instance()
+#define poolhandler Trinity::Singleton<PoolHandler>::Instance()
#endif
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 2916b955a01..d43b0b16dd1 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -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);
@@ -5650,8 +5650,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);
diff --git a/src/game/Spell.h b/src/game/Spell.h
index dc640438032..15af2664fa4 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -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();
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f1e8fdba7b3..c9867e1b2c5 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6786,15 +6786,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);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index c037eb9160d..c738fcc13ef 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3960,7 +3960,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());
}
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 563da29ab2d..f00ed177a3b 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -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())
diff --git a/src/game/WorldLog.cpp b/src/game/WorldLog.cpp
index 435e3279948..3161608bfea 100644
--- a/src/game/WorldLog.cpp
+++ b/src/game/WorldLog.cpp
@@ -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);
diff --git a/src/game/WorldLog.h b/src/game/WorldLog.h
index e6b72e654f7..632d2c86b34 100644
--- a/src/game/WorldLog.h
+++ b/src/game/WorldLog.h
@@ -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();
diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h
index 7f213850aa6..df20dc8578e 100644
--- a/src/shared/Database/QueryResult.h
+++ b/src/shared/Database/QueryResult.h
@@ -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) {}
diff --git a/src/shared/Database/SqlOperations.h b/src/shared/Database/SqlOperations.h
index e91d83b6611..51cafd20b9f 100644
--- a/src/shared/Database/SqlOperations.h
+++ b/src/shared/Database/SqlOperations.h
@@ -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() {}